Queue the resize before setting the tearoff state, to make sure the

2004-11-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktearoffmenuitem.c (gtk_tearoff_menu_item_activate):
	Queue the resize before setting the tearoff state, to
	make sure the torn-off menu picks up the size increase due
	to the arrow in the torn off menu item.  (#157286, Adam
	Hooper, fix proposed by Owen Taylor)
This commit is contained in:
Matthias Clasen 2004-11-05 20:11:48 +00:00 committed by Matthias Clasen
parent f7cc8cbb77
commit 410e0bd2c3
5 changed files with 25 additions and 2 deletions

View File

@ -1,5 +1,11 @@
2004-11-05 Matthias Clasen <mclasen@redhat.com> 2004-11-05 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktearoffmenuitem.c (gtk_tearoff_menu_item_activate):
Queue the resize before setting the tearoff state, to
make sure the torn-off menu picks up the size increase due
to the arrow in the torn off menu item. (#157286, Adam
Hooper, fix proposed by Owen Taylor)
* gtk/gtkmenu.c (menu_change_screen): Don't unnecessarily * gtk/gtkmenu.c (menu_change_screen): Don't unnecessarily
call gtk_menu_position(), since that function has issues call gtk_menu_position(), since that function has issues
when called on a menu whose parent is unrealized. (#157354, when called on a menu whose parent is unrealized. (#157354,

View File

@ -1,5 +1,11 @@
2004-11-05 Matthias Clasen <mclasen@redhat.com> 2004-11-05 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktearoffmenuitem.c (gtk_tearoff_menu_item_activate):
Queue the resize before setting the tearoff state, to
make sure the torn-off menu picks up the size increase due
to the arrow in the torn off menu item. (#157286, Adam
Hooper, fix proposed by Owen Taylor)
* gtk/gtkmenu.c (menu_change_screen): Don't unnecessarily * gtk/gtkmenu.c (menu_change_screen): Don't unnecessarily
call gtk_menu_position(), since that function has issues call gtk_menu_position(), since that function has issues
when called on a menu whose parent is unrealized. (#157354, when called on a menu whose parent is unrealized. (#157354,

View File

@ -1,5 +1,11 @@
2004-11-05 Matthias Clasen <mclasen@redhat.com> 2004-11-05 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktearoffmenuitem.c (gtk_tearoff_menu_item_activate):
Queue the resize before setting the tearoff state, to
make sure the torn-off menu picks up the size increase due
to the arrow in the torn off menu item. (#157286, Adam
Hooper, fix proposed by Owen Taylor)
* gtk/gtkmenu.c (menu_change_screen): Don't unnecessarily * gtk/gtkmenu.c (menu_change_screen): Don't unnecessarily
call gtk_menu_position(), since that function has issues call gtk_menu_position(), since that function has issues
when called on a menu whose parent is unrealized. (#157354, when called on a menu whose parent is unrealized. (#157354,

View File

@ -1,5 +1,11 @@
2004-11-05 Matthias Clasen <mclasen@redhat.com> 2004-11-05 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktearoffmenuitem.c (gtk_tearoff_menu_item_activate):
Queue the resize before setting the tearoff state, to
make sure the torn-off menu picks up the size increase due
to the arrow in the torn off menu item. (#157286, Adam
Hooper, fix proposed by Owen Taylor)
* gtk/gtkmenu.c (menu_change_screen): Don't unnecessarily * gtk/gtkmenu.c (menu_change_screen): Don't unnecessarily
call gtk_menu_position(), since that function has issues call gtk_menu_position(), since that function has issues
when called on a menu whose parent is unrealized. (#157354, when called on a menu whose parent is unrealized. (#157354,

View File

@ -249,11 +249,10 @@ gtk_tearoff_menu_item_activate (GtkMenuItem *menu_item)
{ {
GtkMenu *menu = GTK_MENU (GTK_WIDGET (menu_item)->parent); GtkMenu *menu = GTK_MENU (GTK_WIDGET (menu_item)->parent);
gtk_widget_queue_resize (GTK_WIDGET (menu_item));
gtk_menu_set_tearoff_state (GTK_MENU (GTK_WIDGET (menu_item)->parent), gtk_menu_set_tearoff_state (GTK_MENU (GTK_WIDGET (menu_item)->parent),
!menu->torn_off); !menu->torn_off);
} }
gtk_widget_queue_resize (GTK_WIDGET (menu_item));
} }
static void static void