diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-11-07 17:59:04 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-11-07 17:59:04 +0000 |
commit | 100286ac57ce0011ed99ababcd311c99d7ca6343 (patch) | |
tree | de89edc4287c66956e2d363af1520061cd2cbd48 /gtk/gtkinvisible.c | |
parent | 74bab1cc425d780c5508d32a772a7b28216f2d74 (diff) | |
download | gtk+-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/gtkinvisible.c')
-rw-r--r-- | gtk/gtkinvisible.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gtk/gtkinvisible.c b/gtk/gtkinvisible.c index 0e6b4a50e7..4e1418e0ac 100644 --- a/gtk/gtkinvisible.c +++ b/gtk/gtkinvisible.c @@ -189,6 +189,8 @@ void gtk_invisible_set_screen (GtkInvisible *invisible, GdkScreen *screen) { + GtkWidget *widget; + GdkScreen *previous_screen; gboolean was_realized; g_return_if_fail (GTK_IS_INVISIBLE (invisible)); @@ -197,16 +199,21 @@ gtk_invisible_set_screen (GtkInvisible *invisible, if (screen == invisible->screen) return; + widget = GTK_WIDGET (invisible); + + previous_screen = invisible->screen; was_realized = GTK_WIDGET_REALIZED (invisible); if (was_realized) - gtk_widget_unrealize (GTK_WIDGET (invisible)); + gtk_widget_unrealize (widget); invisible->screen = screen; + if (screen != previous_screen) + _gtk_widget_propagate_screen_changed (widget, previous_screen); g_object_notify (G_OBJECT (invisible), "screen"); if (was_realized) - gtk_widget_realize (GTK_WIDGET (invisible)); + gtk_widget_realize (widget); } /** |