From eb17cd9ba950d43d5fec1f76db7c56b07d6c99a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 20 Mar 2011 23:10:49 +0100 Subject: [PATCH] ui: Add meta_ui_update_frame_style() This method allows forcing a style update of a particular frame from the core, so that it can pick up style variants. https://bugzilla.gnome.org/show_bug.cgi?id=645355 --- src/ui/frames.c | 14 ++++++++++++++ src/ui/frames.h | 3 +++ src/ui/ui.c | 7 +++++++ src/ui/ui.h | 3 +++ 4 files changed, 27 insertions(+) diff --git a/src/ui/frames.c b/src/ui/frames.c index f985955b4..18a74a5b6 100644 --- a/src/ui/frames.c +++ b/src/ui/frames.c @@ -1126,6 +1126,20 @@ meta_frames_set_title (MetaFrames *frames, invalidate_whole_window (frames, frame); } +void +meta_frames_update_frame_style (MetaFrames *frames, + Window xwindow) +{ + MetaUIFrame *frame; + + frame = meta_frames_lookup_window (frames, xwindow); + + g_assert (frame); + + meta_frames_attach_style (frames, frame); + invalidate_whole_window (frames, frame); +} + void meta_frames_repaint_frame (MetaFrames *frames, Window xwindow) diff --git a/src/ui/frames.h b/src/ui/frames.h index d1807df93..1010ec46d 100644 --- a/src/ui/frames.h +++ b/src/ui/frames.h @@ -124,6 +124,9 @@ void meta_frames_set_title (MetaFrames *frames, Window xwindow, const char *title); +void meta_frames_update_frame_style (MetaFrames *frames, + Window xwindow); + void meta_frames_repaint_frame (MetaFrames *frames, Window xwindow); diff --git a/src/ui/ui.c b/src/ui/ui.c index 5381b8da8..6cf90303b 100644 --- a/src/ui/ui.c +++ b/src/ui/ui.c @@ -444,6 +444,13 @@ meta_ui_unflicker_frame_bg (MetaUI *ui, target_width, target_height); } +void +meta_ui_update_frame_style (MetaUI *ui, + Window xwindow) +{ + meta_frames_update_frame_style (ui->frames, xwindow); +} + void meta_ui_repaint_frame (MetaUI *ui, Window xwindow) diff --git a/src/ui/ui.h b/src/ui/ui.h index 9a33d9dce..f8becc334 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -117,6 +117,9 @@ void meta_ui_set_frame_title (MetaUI *ui, Window xwindow, const char *title); +void meta_ui_update_frame_style (MetaUI *ui, + Window window); + void meta_ui_repaint_frame (MetaUI *ui, Window xwindow);