]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/popupcmn.cpp
Set the correct svn properties on the new files. Correct a minor date typo.
[wxWidgets.git] / src / common / popupcmn.cpp
index fdcc5a88705330f2ca83f242b396084f6ff8fd81..f4b812330e39a3352990b41dd7cb979c6cd2d188 100644 (file)
 
 #ifdef __WXGTK__
     #include <gtk/gtk.h>
+    #if GTK_CHECK_VERSION(2,0,0)
+        #include "wx/gtk/private/gtk2-compat.h"
+    #else
+        #define gtk_widget_get_window(x) x->window
+    #endif
 #elif defined(__WXMSW__)
     #include "wx/msw/private.h"
 #elif defined(__WXX11__)
@@ -343,7 +348,7 @@ bool wxPopupTransientWindow::Show( bool show )
     {
         gtk_grab_add( m_widget );
 
-        gdk_pointer_grab( m_widget->window, TRUE,
+        gdk_pointer_grab( gtk_widget_get_window(m_widget), true,
                           (GdkEventMask)
                             (GDK_BUTTON_PRESS_MASK |
                              GDK_BUTTON_RELEASE_MASK |