Resizing and crossing events



Hi,

For some reason Metacity no longer handles crossing events during resize and move. Does anybody know why, or mind if I put them back? Crossing events need to be handled since X sends them *instead* of motion events, so not handling them means ignoring a lot of mouse motion. See
bug 93384.

I think this should go into the stable branch as well. Patch attached.

Soren

Index: window.c
===================================================================
RCS file: /cvs/gnome/metacity/src/window.c,v
retrieving revision 1.424
diff -u -p -u -r1.424 window.c
--- window.c	14 Mar 2006 17:00:56 -0000	1.424
+++ window.c	15 Mar 2006 19:04:37 -0000
@@ -7268,6 +7268,31 @@ meta_window_handle_mouse_grab_op_event (
         }
       break;
 
+    case EnterNotify:
+    case LeaveNotify:
+      if (meta_grab_op_is_moving (window->display->grab_op))
+	{
+	  if (event->xcrossing.root == window->screen->xroot)
+	    {
+	      update_move (window,
+			   event->xcrossing.state & ShiftMask,
+			   event->xcrossing.x_root,
+			   event->xcrossing.y_root);
+	    }
+        }
+      else if (meta_grab_op_is_resizing (window->display->grab_op))
+        {
+          if (event->xcrossing.root == window->screen->xroot)
+            {
+	      update_resize (window,
+			     event->xcrossing.state & ShiftMask,
+			     event->xcrossing.x_root,
+			     event->xcrossing.y_root,
+			     FALSE);
+	    }
+        }
+      break;
+
     default:
       break;
     }


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