diff --git a/src/core/frame.c b/src/core/frame.c index 2a2c52ddd..264e61593 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 9e31040ae..d253773fb 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); +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 eca19946f..1db350619 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 316498564..786524bf8 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); } }