diff --git a/src/core/window.c b/src/core/window.c index 22161e37a..fe27306a5 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -1044,9 +1044,6 @@ _meta_window_shared_new (MetaDisplay *display, if (window->attached) meta_window_recalc_features (window); - if (window->decorated) - meta_window_ensure_frame (window); - if (window->type == META_WINDOW_DESKTOP || window->type == META_WINDOW_DOCK) { @@ -1393,9 +1390,6 @@ meta_window_unmanage (MetaWindow *window, META_WINDOW_GET_CLASS (window)->unmanage (window); - if (window->frame) - meta_window_destroy_frame (window); - meta_prefs_remove_listener (prefs_changed_callback, window); meta_screen_queue_check_fullscreen (window->screen); diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index 7acb84677..4bf253742 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -518,6 +518,9 @@ meta_window_x11_manage (MetaWindow *window) meta_window_x11_update_net_wm_type (window); + if (window->decorated) + meta_window_ensure_frame (window); + /* Now try applying saved stuff from the session */ { const MetaWindowSessionInfo *info; @@ -647,6 +650,9 @@ meta_window_x11_unmanage (MetaWindow *window) meta_display_ungrab_focus_window_button (window->display, window); meta_error_trap_pop (window->display); + + if (window->frame) + meta_window_destroy_frame (window); } static void