+Fri Dec 13 22:55:27 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenu.c (menu_change_screen): If the screen
+ for the menu changes while the menu is torn off, move
+ the tearoff along with it. (#85669)
+
+ * gtk/gtkmenu.c (gtk_menu_set_tearoff_state): When
+ reattaching, get rid of the get rid of the tearoff window.
+
Fri Dec 13 21:35:12 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkhandlebox.c (gtk_handle_box_motion): Handle
+Fri Dec 13 22:55:27 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenu.c (menu_change_screen): If the screen
+ for the menu changes while the menu is torn off, move
+ the tearoff along with it. (#85669)
+
+ * gtk/gtkmenu.c (gtk_menu_set_tearoff_state): When
+ reattaching, get rid of the get rid of the tearoff window.
+
Fri Dec 13 21:35:12 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkhandlebox.c (gtk_handle_box_motion): Handle
+Fri Dec 13 22:55:27 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenu.c (menu_change_screen): If the screen
+ for the menu changes while the menu is torn off, move
+ the tearoff along with it. (#85669)
+
+ * gtk/gtkmenu.c (gtk_menu_set_tearoff_state): When
+ reattaching, get rid of the get rid of the tearoff window.
+
Fri Dec 13 21:35:12 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkhandlebox.c (gtk_handle_box_motion): Handle
+Fri Dec 13 22:55:27 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenu.c (menu_change_screen): If the screen
+ for the menu changes while the menu is torn off, move
+ the tearoff along with it. (#85669)
+
+ * gtk/gtkmenu.c (gtk_menu_set_tearoff_state): When
+ reattaching, get rid of the get rid of the tearoff window.
+
Fri Dec 13 21:35:12 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkhandlebox.c (gtk_handle_box_motion): Handle
+Fri Dec 13 22:55:27 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenu.c (menu_change_screen): If the screen
+ for the menu changes while the menu is torn off, move
+ the tearoff along with it. (#85669)
+
+ * gtk/gtkmenu.c (gtk_menu_set_tearoff_state): When
+ reattaching, get rid of the get rid of the tearoff window.
+
Fri Dec 13 21:35:12 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkhandlebox.c (gtk_handle_box_motion): Handle
+Fri Dec 13 22:55:27 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenu.c (menu_change_screen): If the screen
+ for the menu changes while the menu is torn off, move
+ the tearoff along with it. (#85669)
+
+ * gtk/gtkmenu.c (gtk_menu_set_tearoff_state): When
+ reattaching, get rid of the get rid of the tearoff window.
+
Fri Dec 13 21:35:12 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkhandlebox.c (gtk_handle_box_motion): Handle
G_OBJECT_CLASS (parent_class)->finalize (object);
}
+static void
+menu_change_screen (GtkMenu *menu,
+ GdkScreen *new_screen)
+{
+ if (menu->torn_off)
+ {
+ gtk_window_set_screen (GTK_WINDOW (menu->tearoff_window), new_screen);
+ gtk_menu_position (menu);
+ }
+
+ gtk_window_set_screen (GTK_WINDOW (menu->toplevel), new_screen);
+}
+
static void
attach_widget_screen_changed (GtkWidget *attach_widget,
GdkScreen *previous_screen,
if (gtk_widget_has_screen (attach_widget) &&
!g_object_get_data (G_OBJECT (menu), "gtk-menu-explicit-screen"))
{
- gtk_window_set_screen (GTK_WINDOW (menu->toplevel),
- gtk_widget_get_screen (attach_widget));
+ menu_change_screen (menu, gtk_widget_get_screen (attach_widget));
}
}
{
gtk_widget_hide (menu->tearoff_window);
gtk_menu_reparent (menu, menu->toplevel, FALSE);
+ gtk_widget_destroy (menu->tearoff_window);
+
+ menu->tearoff_window = NULL;
+ menu->tearoff_hbox = NULL;
+ menu->tearoff_scrollbar = NULL;
+ menu->tearoff_adjustment = NULL;
}
}
}
if (screen)
{
- gtk_window_set_screen (GTK_WINDOW (menu->toplevel), screen);
+ menu_change_screen (menu, screen);
}
else
{