--- old/modules/javafx.graphics/src/main/native-glass/gtk/glass_general.cpp 2017-04-05 13:21:38.017019819 -0700 +++ new/modules/javafx.graphics/src/main/native-glass/gtk/glass_general.cpp 2017-04-05 13:21:37.841021782 -0700 @@ -503,9 +503,6 @@ static gboolean configure_transparent_window(GtkWidget *window); static void configure_opaque_window(GtkWidget *window); -static void grab_mouse_device(GdkDevice *device, DeviceGrabContext *context); -static void ungrab_mouse_device(GdkDevice *device); - gint glass_gdk_visual_get_depth (GdkVisual * visual) { // gdk_visual_get_depth is GTK 2.2 + @@ -524,24 +521,7 @@ gboolean glass_gdk_mouse_devices_grab(GdkWindow *gdkWindow) { -#ifdef GLASS_GTK3 - if (disableGrab) { - return TRUE; - } - DeviceGrabContext context; - GList *devices = gdk_device_manager_list_devices ( - gdk_display_get_device_manager( - gdk_display_get_default()), - GDK_DEVICE_TYPE_MASTER); - - context.window = gdkWindow; - context.grabbed = FALSE; - g_list_foreach(devices, (GFunc) grab_mouse_device, &context); - - return context.grabbed; -#else return glass_gdk_mouse_devices_grab_with_cursor(gdkWindow, NULL, TRUE); -#endif } gboolean @@ -565,15 +545,7 @@ void glass_gdk_mouse_devices_ungrab() { -#ifdef GLASS_GTK3 - GList *devices = gdk_device_manager_list_devices( - gdk_display_get_device_manager( - gdk_display_get_default()), - GDK_DEVICE_TYPE_MASTER); - g_list_foreach(devices, (GFunc) ungrab_mouse_device, NULL); -#else - gdk_pointer_ungrab(GDK_CURRENT_TIME); -#endif + gdk_pointer_ungrab(GDK_CURRENT_TIME); } void @@ -752,49 +724,6 @@ return FALSE; } -static void -grab_mouse_device(GdkDevice *device, DeviceGrabContext *context) { - GdkInputSource source = gdk_device_get_source(device); - if (source == GDK_SOURCE_MOUSE) { -#ifdef GLASS_GTK3 - GdkGrabStatus status = gdk_device_grab(device, - context->window, - GDK_OWNERSHIP_NONE, - TRUE, - GDK_ALL_EVENTS_MASK, - NULL, - GDK_CURRENT_TIME); -#else - GdkGrabStatus status = GDK_GRAB_SUCCESS; -/* FIXME reachable by 2? - GdkGrabStatus status = gdk_device_grab(device, - context->window, - GDK_OWNERSHIP_NONE, - TRUE, - GDK_ALL_EVENTS_MASK, - NULL, - GDK_CURRENT_TIME); - */ -#endif - if (status == GDK_GRAB_SUCCESS) { - context->grabbed = TRUE; - } - } -} - -static void -ungrab_mouse_device(GdkDevice *device) { -#ifdef GLASS_GTK3 - GdkInputSource source = gdk_device_get_source(device); - if (source == GDK_SOURCE_MOUSE) { - gdk_device_ungrab(device, GDK_CURRENT_TIME); - } -#else - (void) device; - // not used on the GTK2 path -#endif -} - GdkPixbuf * glass_pixbuf_from_window(GdkWindow *window, gint srcx, gint srcy,