- gdk_pointer_grab( widget->window, FALSE,
- (GdkEventMask)
- (GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK |
- GDK_POINTER_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK |
- GDK_BUTTON_MOTION_MASK |
- GDK_BUTTON1_MOTION_MASK),
- (GdkWindow *) NULL,
- (GdkCursor *) NULL,
- (unsigned int) GDK_CURRENT_TIME );
+ const GdkEventMask mask = GdkEventMask(
+ GDK_BUTTON_PRESS_MASK |
+ GDK_BUTTON_RELEASE_MASK |
+ GDK_POINTER_MOTION_MASK |
+ GDK_POINTER_MOTION_HINT_MASK |
+ GDK_BUTTON_MOTION_MASK |
+ GDK_BUTTON1_MOTION_MASK);
+#ifdef __WXGTK3__
+ gdk_device_grab(
+ gdk_event->device, gdk_event->window, GDK_OWNERSHIP_NONE,
+ false, mask, NULL, gdk_event->time);
+#else
+ gdk_pointer_grab(gdk_event->window, false, mask, NULL, NULL, gdk_event->time);
+#endif