updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / gtk2-ubuntu / 071_no_offscreen_widgets_grabbing.patch
blob5f3ab243ea9d2b8906e33b10cb9662b342c438b9
1 # Description: don't let offscreen widget do grabbing
2 # Upstream: https://bugzilla.gnome.org/show_bug.cgi?id=607668
3 # Ubuntu: https://bugs.launchpad.net/bugs/512427
4 Index: gtk+-2.24.4/gtk/gtkmain.c
5 ===================================================================
6 --- gtk+-2.24.4.orig/gtk/gtkmain.c 2011-03-18 11:14:36.000000000 +1100
7 +++ gtk+-2.24.4/gtk/gtkmain.c 2011-04-04 10:58:07.816596965 +1000
8 @@ -1861,9 +1861,14 @@
10 GtkWindowGroup *group;
11 GtkWidget *old_grab_widget;
13 + GtkWidget *toplevel;
15 g_return_if_fail (widget != NULL);
18 + toplevel = gtk_widget_get_toplevel (widget);
19 + if (toplevel && gdk_window_get_window_type (toplevel->window) == GDK_WINDOW_OFFSCREEN)
20 + return;
22 if (!gtk_widget_has_grab (widget) && gtk_widget_is_sensitive (widget))
24 _gtk_widget_set_has_grab (widget, TRUE);