[mutter] frame: Delay updating the background until the frame is ready



commit 37aeb5baf15048082e3e46ae9a1e011f294fcd97
Author: Florian Müllner <fmuellner gnome org>
Date:   Sun Mar 20 22:15:47 2011 +0100

    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

 src/core/frame.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/core/frame.c b/src/core/frame.c
index 155a0b8..c601e14 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -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
@@ -157,6 +152,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,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]