Backported fixes from 2.8:

2005-08-15  Matthias Clasen  <mclasen@redhat.com>

	Backported fixes from 2.8:

	* gtk/gtkmenu.c (gtk_menu_grab_notify): Take window
	groups into account.  (#309473, Diego Gonzalez)

	* gtk/gtkwindow.[hc]: Add a non-exported function to
	get the grab widget of a window group.
This commit is contained in:
Matthias Clasen
2005-08-15 04:48:03 +00:00
committed by Matthias Clasen
parent cd62896f35
commit 008608e6cf
6 changed files with 39 additions and 3 deletions

View File

@@ -1,7 +1,13 @@
2005-08-15 Matthias Clasen <mclasen@redhat.com>
Backported fix from 2.8:
Backported fixes from 2.8:
* gtk/gtkmenu.c (gtk_menu_grab_notify): Take window
groups into account. (#309473, Diego Gonzalez)
* gtk/gtkwindow.[hc]: Add a non-exported function to
get the grab widget of a window group.
* gtk/gtkicontheme.c: When changing the icon theme, defer
the resetting of rc styles to an idle, so that it does
not happen e.g during expose handling (which is problematic,

View File

@@ -1,7 +1,13 @@
2005-08-15 Matthias Clasen <mclasen@redhat.com>
Backported fix from 2.8:
Backported fixes from 2.8:
* gtk/gtkmenu.c (gtk_menu_grab_notify): Take window
groups into account. (#309473, Diego Gonzalez)
* gtk/gtkwindow.[hc]: Add a non-exported function to
get the grab widget of a window group.
* gtk/gtkicontheme.c: When changing the icon theme, defer
the resetting of rc styles to an idle, so that it does
not happen e.g during expose handling (which is problematic,

View File

@@ -1,7 +1,13 @@
2005-08-15 Matthias Clasen <mclasen@redhat.com>
Backported fix from 2.8:
Backported fixes from 2.8:
* gtk/gtkmenu.c (gtk_menu_grab_notify): Take window
groups into account. (#309473, Diego Gonzalez)
* gtk/gtkwindow.[hc]: Add a non-exported function to
get the grab widget of a window group.
* gtk/gtkicontheme.c: When changing the icon theme, defer
the resetting of rc styles to an idle, so that it does
not happen e.g during expose handling (which is problematic,

View File

@@ -4385,6 +4385,14 @@ static void
gtk_menu_grab_notify (GtkWidget *widget,
gboolean was_grabbed)
{
GtkWidget *toplevel;
GtkWindowGroup *group;
GtkWidget *grab;
toplevel = gtk_widget_get_toplevel (widget);
group = _gtk_window_get_group (GTK_WINDOW (toplevel));
grab = _gtk_window_group_get_current_grab (group);
if (!was_grabbed)
{
if (!GTK_IS_MENU (gtk_grab_get_current ()))

View File

@@ -6844,6 +6844,15 @@ _gtk_window_get_group (GtkWindow *window)
}
}
/* Return the current grab widget of the given group
*/
GtkWidget *
_gtk_window_group_get_current_grab (GtkWindowGroup *window_group)
{
if (window_group->grabs)
return GTK_WIDGET (window_group->grabs->data);
return NULL;
}
/*
Derived from XParseGeometry() in XFree86

View File

@@ -386,6 +386,7 @@ void _gtk_window_constrain_size (GtkWindow *window,
gint *new_width,
gint *new_height);
GtkWindowGroup *_gtk_window_get_group (GtkWindow *window);
GtkWidget *_gtk_window_group_get_current_grab (GtkWindowGroup *window_group);
void _gtk_window_set_has_toplevel_focus (GtkWindow *window,
gboolean has_toplevel_focus);