[mutter] Only poke the frames UI code from inside frame.c
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Only poke the frames UI code from inside frame.c
- Date: Thu, 1 Jan 2015 06:45:06 +0000 (UTC)
commit 90111c03a15230eb47ec23bfeba88084874bc65e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Dec 31 21:24:49 2014 -0800
Only poke the frames UI code from inside frame.c
Add frame.c wrappers for the missing calls, then adapt.
src/core/frame.c | 21 +++++++++++++++------
src/core/frame.h | 7 +++----
src/core/window.c | 9 +++------
src/x11/window-props.c | 4 ++--
4 files changed, 23 insertions(+), 18 deletions(-)
---
diff --git a/src/core/frame.c b/src/core/frame.c
index 2a2c52d..264e615 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -146,12 +146,8 @@ meta_window_ensure_frame (MetaWindow *window)
/* Now that frame->xwindow is registered with window, we can set its
* style and background.
*/
- meta_ui_update_frame_style (window->screen->ui, frame->xwindow);
-
- if (window->title)
- meta_ui_set_frame_title (window->screen->ui,
- window->frame->xwindow,
- window->title);
+ meta_frame_update_style (frame);
+ meta_frame_update_title (frame);
meta_ui_map_frame (frame->window->screen->ui, frame->xwindow);
@@ -431,3 +427,16 @@ meta_frame_get_xwindow (MetaFrame *frame)
{
return frame->xwindow;
}
+
+void
+meta_frame_update_style (MetaFrame *frame)
+{
+ meta_ui_update_frame_style (frame->window->screen->ui, frame->xwindow);
+}
+
+void
+meta_frame_update_title (MetaFrame *frame)
+{
+ if (frame->window->title)
+ meta_ui_set_frame_title (frame->window->screen->ui, frame->xwindow, frame->window->title);
+}
diff --git a/src/core/frame.h b/src/core/frame.h
index 9e31040..d253773 100644
--- a/src/core/frame.h
+++ b/src/core/frame.h
@@ -76,8 +76,7 @@ void meta_frame_get_mask (MetaFrame *frame,
void meta_frame_set_screen_cursor (MetaFrame *frame,
MetaCursor cursor);
-#endif
-
-
-
+void meta_frame_update_style (MetaFrame *frame);
+void meta_frame_update_title (MetaFrame *frame);
+#endif
diff --git a/src/core/window.c b/src/core/window.c
index eca1994..1db3506 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -2885,8 +2885,7 @@ meta_window_tile (MetaWindow *window)
&new_rect);
if (window->frame)
- meta_ui_queue_frame_draw (window->screen->ui,
- window->frame->xwindow);
+ meta_frame_queue_draw (window->frame);
}
static gboolean
@@ -4887,7 +4886,7 @@ redraw_icon (MetaWindow *window)
* instead of the whole frame.
*/
if (window->frame)
- meta_ui_queue_frame_draw (window->screen->ui, window->frame->xwindow);
+ meta_frame_queue_draw (window->frame);
}
static cairo_surface_t *
@@ -7430,9 +7429,7 @@ meta_window_set_title (MetaWindow *window,
window->title = g_strdup (title);
if (window->frame)
- meta_ui_set_frame_title (window->screen->ui,
- window->frame->xwindow,
- window->title);
+ meta_frame_update_title (window->frame);
meta_window_update_desc (window);
diff --git a/src/x11/window-props.c b/src/x11/window-props.c
index 3164985..786524b 100644
--- a/src/x11/window-props.c
+++ b/src/x11/window-props.c
@@ -1684,7 +1684,7 @@ reload_gtk_theme_variant (MetaWindow *window,
window->gtk_theme_variant = g_strdup (requested_variant);
if (window->frame)
- meta_ui_update_frame_style (window->screen->ui, window->frame->xwindow);
+ meta_frame_update_style (window->frame);
}
}
@@ -1712,7 +1712,7 @@ reload_gtk_hide_titlebar_when_maximized (MetaWindow *window,
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
if (window->frame)
- meta_ui_update_frame_style (window->screen->ui, window->frame->xwindow);
+ meta_frame_update_style (window->frame);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]