summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2011-03-20 22:15:47 +0100
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2014-10-08 18:00:20 +0300
commit5f9a26f1de7af633b05c7fbe656f9c845207259d (patch)
treebbe5e17cfca1e67cfdcca99e49fa22fb7544c73f
parent31630574e01ee1724c7294140b4d3a64ea0b1588 (diff)
downloadmetacity-5f9a26f1de7af633b05c7fbe656f9c845207259d.tar.gz
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
-rw-r--r--src/core/frame.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/frame.c b/src/core/frame.c
index 968f0153..ac5cfcf8 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -112,11 +112,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
@@ -150,6 +145,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,