diff options
| author | Victor Kareh <[email protected]> | 2019-05-21 13:42:41 -0400 | 
|---|---|---|
| committer | raveit65 <[email protected]> | 2019-06-16 18:12:44 +0200 | 
| commit | 78c765f97a1eb4ba83d03ed0d708d47371afa21c (patch) | |
| tree | 559dc845617c80a366042d33a6b1b2008929f089 | |
| parent | e5cc84c337a856517a81a56d7a0fdbf40a1a90e5 (diff) | |
| download | marco-78c765f97a1eb4ba83d03ed0d708d47371afa21c.tar.bz2 marco-78c765f97a1eb4ba83d03ed0d708d47371afa21c.tar.xz | |
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
upstream commit:
https://gitlab.gnome.org/GNOME/metacity/commit/97554dc4
| -rw-r--r-- | src/include/ui.h | 2 | ||||
| -rw-r--r-- | src/ui/frames.c | 14 | ||||
| -rw-r--r-- | src/ui/frames.h | 2 | ||||
| -rw-r--r-- | src/ui/ui.c | 7 | 
4 files changed, 25 insertions, 0 deletions
| diff --git a/src/include/ui.h b/src/include/ui.h index bbfaf287..652e8cfc 100644 --- a/src/include/ui.h +++ b/src/include/ui.h @@ -104,6 +104,8 @@ 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); diff --git a/src/ui/frames.c b/src/ui/frames.c index 264e2373..065baf8e 100644 --- a/src/ui/frames.c +++ b/src/ui/frames.c @@ -1030,6 +1030,20 @@ meta_frames_set_title (MetaFrames *frames,  }  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 1262f148..6689cc1a 100644 --- a/src/ui/frames.h +++ b/src/ui/frames.h @@ -124,6 +124,8 @@ 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 a03747f2..7abbdeaa 100644 --- a/src/ui/ui.c +++ b/src/ui/ui.c @@ -427,6 +427,13 @@ meta_ui_unmap_frame (MetaUI *ui,  }  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)  { | 
