]> git.saurik.com Git - wxWidgets.git/commitdiff
Lock whole screen when popup is open under GTK+.
authorRobert Roebling <robert@roebling.de>
Mon, 7 Feb 2005 21:48:06 +0000 (21:48 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 7 Feb 2005 21:48:06 +0000 (21:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/popupcmn.cpp

index c1961f1973b2c7fcc9f370d64e2fa0fed2293b69..8dc2f18ebbfcf94afa7525ffd04387c0a7445677 100644 (file)
@@ -198,8 +198,7 @@ void wxPopupTransientWindow::PopHandlers()
             m_handlerPopup = NULL;
         }
 
-        if (m_child->HasCapture())
-            m_child->ReleaseMouse();
+        // m_child->ReleaseMouse();
         m_child = NULL;
     }
 
@@ -278,14 +277,30 @@ bool wxPopupTransientWindow::Show( bool show )
 {
 #ifdef __WXGTK__
     if (!show)
+    {
+        gdk_pointer_ungrab( (guint32)GDK_CURRENT_TIME );
+    
         gtk_grab_remove( m_widget );
+    }
 #endif
 
     bool ret = wxPopupWindow::Show( show );
     
 #ifdef __WXGTK__
     if (show)
+    {
         gtk_grab_add( m_widget );
+        
+        gdk_pointer_grab( m_widget->window, TRUE,
+                          (GdkEventMask)
+                            (GDK_BUTTON_PRESS_MASK |
+                             GDK_BUTTON_RELEASE_MASK |
+                             GDK_POINTER_MOTION_HINT_MASK |
+                             GDK_POINTER_MOTION_MASK),
+                          (GdkWindow *) NULL,
+                          (GdkCursor *) NULL,
+                          (guint32)GDK_CURRENT_TIME );
+    }
 #endif
 
     return ret;