summaryrefslogtreecommitdiff
path: root/gtk/gtkwindow.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-11-07 17:59:04 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-11-07 17:59:04 +0000
commit100286ac57ce0011ed99ababcd311c99d7ca6343 (patch)
treede89edc4287c66956e2d363af1520061cd2cbd48 /gtk/gtkwindow.c
parent74bab1cc425d780c5508d32a772a7b28216f2d74 (diff)
downloadgtk+-100286ac57ce0011ed99ababcd311c99d7ca6343.tar.gz
Add ::screen-changed signal.
Thu Nov 7 12:53:08 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.[ch] gtk/gtkwindow.c gtk/gtkinvisible.c: Add ::screen-changed signal. * gtk/gtkfontsel.c gtk/gtktoolbar.c: Use ::screen-changed signal to simplify logic.
Diffstat (limited to 'gtk/gtkwindow.c')
-rw-r--r--gtk/gtkwindow.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 019bb5201a..324e1c986f 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5982,6 +5982,8 @@ gtk_window_set_screen (GtkWindow *window,
GdkScreen *screen)
{
GtkWidget *widget;
+ GdkScreen *previous_screen;
+ GdkScreen *new_screen;
gboolean was_mapped;
g_return_if_fail (GTK_IS_WINDOW (window));
@@ -5991,17 +5993,20 @@ gtk_window_set_screen (GtkWindow *window,
return;
widget = GTK_WIDGET (window);
-
+
+ previous_screen = window->screen;
was_mapped = GTK_WIDGET_MAPPED (widget);
if (was_mapped)
gtk_widget_unmap (widget);
if (GTK_WIDGET_REALIZED (widget))
gtk_widget_unrealize (widget);
-
+
gtk_window_free_key_hash (window);
window->screen = screen;
gtk_widget_reset_rc_styles (widget);
+ if (screen != previous_screen)
+ _gtk_widget_propagate_screen_changed (widget, previous_screen);
g_object_notify (G_OBJECT (window), "screen");
if (was_mapped)