ZVT update to get button 1 press to deselect...



Here is a patch to let a button 1 press deselect like xterm does:

Index: zvt/zvtterm.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/zvt/zvtterm.c,v
retrieving revision 1.94
diff -u -r1.94 zvtterm.c
--- zvt/zvtterm.c	1999/02/24 05:52:43	1.94
+++ zvt/zvtterm.c	1999/03/05 17:26:13
@@ -1368,6 +1368,7 @@
   gint x, y;
   GdkModifierType mask;
   struct _vtx *vx;
+  gboolean deselect;
   
   d(printf("button released\n"));
 
@@ -1393,6 +1394,12 @@
     return FALSE;
   }
 
+  if (event->button == 1 && vx->selected == 1 && vx->selstartx == x && vx->selstarty == y) {
+    deselect = TRUE;
+  } else {
+    deselect = FALSE;
+  }
+
   if (vx->selectiontype & VT_SELTYPE_BYSTART) {
     vx->selendx = x;
     vx->selendy = y;
@@ -1409,8 +1416,13 @@
 
     gtk_grab_remove (widget);
     gdk_pointer_ungrab (0);
+
+    if (deselect == TRUE) {
+      vtx_unrender_selection(vx);
+      vt_clear_selection(vx);
+    }
 
-    if (vx->selectiontype & VT_SELTYPE_MOVED) {
+    else if (vx->selectiontype & VT_SELTYPE_MOVED) {
       vt_fix_selection(vx);
       vt_draw_selection(vx);
           



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]