summaryrefslogtreecommitdiff
path: root/src/display.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-02-07 03:25:34 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-02-07 03:25:34 +0000
commit84c3050a7cb24c672c58bdbdf586c88f163dcd71 (patch)
treebd18d1db04cc42e4b3747053b9bc1e00dd8c4dc5 /src/display.c
parent8ae714eeaef03db0a55c11fc31834c8d65e2ea03 (diff)
downloadmetacity-84c3050a7cb24c672c58bdbdf586c88f163dcd71.tar.gz
metacity-84c3050a7cb24c672c58bdbdf586c88f163dcd71.tar.bz2
redo window sizes/appearance when the theme changes
2002-02-06 Havoc Pennington <hp@pobox.com> * src/main.c (prefs_changed_callback): redo window sizes/appearance when the theme changes * src/display.c (meta_display_retheme_all): new function * src/theme-parser.c (locate_attributes): remove error handling for MAX_ATTRS reached, add an assert instead, the way this code ended up the attrs in the array depend on the code not the theme file.
Diffstat (limited to 'src/display.c')
-rw-r--r--src/display.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/display.c b/src/display.c
index 073232d..354055a 100644
--- a/src/display.c
+++ b/src/display.c
@@ -1112,6 +1112,7 @@ event_callback (XEvent *event,
meta_verbose ("Received reload theme request\n");
meta_ui_set_current_theme (meta_prefs_get_theme (),
TRUE);
+ meta_display_retheme_all ();
}
}
}
@@ -2067,6 +2068,42 @@ meta_display_unshow_desktop (MetaDisplay *display)
queue_windows_showing (display);
}
+void
+meta_display_queue_retheme_all_windows (MetaDisplay *display)
+{
+ GSList* windows;
+ GSList *tmp;
+
+ windows = meta_display_list_windows (display);
+ tmp = windows;
+ while (tmp != NULL)
+ {
+ MetaWindow *window = tmp->data;
+
+ meta_window_queue_move_resize (window);
+ if (window->frame)
+ meta_frame_queue_draw (window->frame);
+
+ tmp = tmp->next;
+ }
+
+ g_slist_free (windows);
+}
+
+void
+meta_display_retheme_all (void)
+{
+ GSList *tmp;
+
+ tmp = meta_displays_list ();
+ while (tmp != NULL)
+ {
+ MetaDisplay *display = tmp->data;
+ meta_display_queue_retheme_all_windows (display);
+ tmp = tmp->next;
+ }
+}
+
static gboolean is_syncing = FALSE;
gboolean