updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / gtk3-ubuntu / 017_no_offscreen_device_grabbing.patch
blob150edf16535c654de1a6c64a10648662b9cdad09
1 Description: Do not allow devices in an offscreen hierarchy to take grabs.
2 Author: Robert Carr <racarr@canonical.com>
3 Bug: https://bugzilla.gnome.org/show_bug.cgi?id=658563
4 Bug-Ubuntu: https://launchpad.net/bugs/804009
6 Index: gtk+3.0-3.1.12/gtk/gtkmain.c
7 ===================================================================
8 --- gtk+3.0-3.1.12.orig/gtk/gtkmain.c 2011-09-02 14:39:44.225887145 -0400
9 +++ gtk+3.0-3.1.12/gtk/gtkmain.c 2011-09-02 14:39:36.415886932 -0400
10 @@ -2303,9 +2303,14 @@
12 GtkWindowGroup *group;
13 GtkWidget *old_grab_widget;
14 + GdkWindow *toplevel;
16 g_return_if_fail (GTK_IS_WIDGET (widget));
17 g_return_if_fail (GDK_IS_DEVICE (device));
19 + toplevel = gdk_window_get_toplevel (gtk_widget_get_window (widget));
20 + if (toplevel && gdk_window_get_window_type (toplevel) == GDK_WINDOW_OFFSCREEN)
21 + return;
23 group = gtk_main_get_window_group (widget);
24 old_grab_widget = gtk_window_group_get_current_device_grab (group, device);