frame: Delay updating the background until the frame is ready

To determine the correct background style, the UI needs to access
some frame properties via meta_core_get(); this call will bail out
early if window->frame is unset, so delay the call until the
association is made.

https://bugzilla.gnome.org/show_bug.cgi?id=645355
This commit is contained in:
Florian Müllner 2011-03-20 22:15:47 +01:00
parent a2cb38b382
commit 37aeb5baf1

View File

@ -117,11 +117,6 @@ meta_window_ensure_frame (MetaWindow *window)
meta_display_register_x_window (window->display, &frame->xwindow, window);
/* Now that frame->xwindow is registered with window, we can set its
* background.
*/
meta_ui_reset_frame_bg (window->screen->ui, frame->xwindow);
/* Reparent the client window; it may be destroyed,
* thus the error trap. We'll get a destroy notify later
* and free everything. Comment in FVWM source code says
@ -158,6 +153,11 @@ meta_window_ensure_frame (MetaWindow *window)
/* stick frame to the window */
window->frame = frame;
/* Now that frame->xwindow is registered with window, we can set its
* background.
*/
meta_ui_reset_frame_bg (window->screen->ui, frame->xwindow);
if (window->title)
meta_ui_set_frame_title (window->screen->ui,
window->frame->xwindow,