Skip to content
Browse files

cvsimport

  • Loading branch information...
2 parents ff0f7f8 + e932859 commit 90af8804d30032320c54167e718277f1f045574b tcunha committed May 5, 2011
Showing with 19 additions and 6 deletions.
  1. +2 −2 screen.c
  2. +17 −4 server-client.c
View
4 screen.c
@@ -1,4 +1,4 @@
-/* $Id: screen.c,v 1.103 2010/12/11 17:57:28 nicm Exp $ */
+/* $Id: screen.c,v 1.104 2011/05/05 10:10:57 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -96,7 +96,7 @@ screen_set_title(struct screen *s, const char *title)
{
char tmp[BUFSIZ];
- strnvis(tmp, title, sizeof tmp, VIS_OCTAL|VIS_TAB|VIS_NL);
+ strlcpy(tmp, title, sizeof tmp);
xfree(s->title);
s->title = xstrdup(tmp);
View
21 server-client.c
@@ -1,4 +1,4 @@
-/* $Id: server-client.c,v 1.58 2011/05/05 10:03:05 tcunha Exp $ */
+/* $Id: server-client.c,v 1.59 2011/05/05 10:12:33 tcunha Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -324,11 +324,24 @@ server_client_handle_key(int key, struct mouse_event *mouse, void *data)
server_redraw_window_borders(w);
wp = w->active;
}
- if (mouse->y + 1 == c->tty.sy && mouse->b == MOUSE_UP &&
+ if (mouse->y + 1 == c->tty.sy &&
options_get_number(oo, "mouse-select-window") &&
options_get_number(oo, "status")) {
- status_set_window_at(c, mouse->x);
- return;
+ if (mouse->b == MOUSE_UP) {
+ status_set_window_at(c, mouse->x);
+ return;
+ }
+ if (mouse->b & MOUSE_45) {
+ if ((mouse->b & MOUSE_BUTTON) == MOUSE_1) {
+ session_previous(c->session, 0);
+ server_redraw_session(s);
+ }
+ if ((mouse->b & MOUSE_BUTTON) == MOUSE_2) {
+ session_next(c->session, 0);
+ server_redraw_session(s);
+ }
+ return;
+ }
}
window_pane_mouse(wp, c->session, mouse);
return;

0 comments on commit 90af880

Please sign in to comment.
Something went wrong with that request. Please try again.