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
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)
22 if (!gtk_widget_has_grab (widget) && gtk_widget_is_sensitive (widget))
24 _gtk_widget_set_has_grab (widget, TRUE);