]> git.saurik.com Git - wxWidgets.git/commitdiff
Another attempt to fix the freeze while mouse capturing.
authorRobert Roebling <robert@roebling.de>
Thu, 24 Apr 2003 17:41:10 +0000 (17:41 +0000)
committerRobert Roebling <robert@roebling.de>
Thu, 24 Apr 2003 17:41:10 +0000 (17:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp
src/gtk1/window.cpp

index 2a4c1375d1eb0ef7200bcc483a61f94a8509be78..2a66dac87f0fff582faf78b335223c4ac0988f01 100644 (file)
@@ -1831,10 +1831,14 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget,
     wxMouseEvent event( wxEVT_MOTION );
     InitMouseEvent(win, event, gdk_event);
 
-    if ( !g_captureWindow )
+    if ( g_captureWindow )
     {
         // synthetize a mouse enter or leave event if needed
         GdkWindow *winUnderMouse = gdk_window_at_pointer(NULL, NULL);
+        // This seems to be necessary and actually been added to 
+        // GDK itself in version 2.0.X
+        gdk_flush();
+        
         bool hasMouse = winUnderMouse == gdk_event->window;
         if ( hasMouse != g_captureWindowHasMouse )
         {
index 2a4c1375d1eb0ef7200bcc483a61f94a8509be78..2a66dac87f0fff582faf78b335223c4ac0988f01 100644 (file)
@@ -1831,10 +1831,14 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget,
     wxMouseEvent event( wxEVT_MOTION );
     InitMouseEvent(win, event, gdk_event);
 
-    if ( !g_captureWindow )
+    if ( g_captureWindow )
     {
         // synthetize a mouse enter or leave event if needed
         GdkWindow *winUnderMouse = gdk_window_at_pointer(NULL, NULL);
+        // This seems to be necessary and actually been added to 
+        // GDK itself in version 2.0.X
+        gdk_flush();
+        
         bool hasMouse = winUnderMouse == gdk_event->window;
         if ( hasMouse != g_captureWindowHasMouse )
         {