diff --git a/src/core/window.c b/src/core/window.c
index 7cf8153..92dfba6 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -3208,6 +3208,13 @@ meta_window_unmake_fullscreen (MetaWindow  *window)
                   "Unfullscreening %s\n", window->desc);
 
       window->fullscreen = FALSE;
+
+      /* Need to update window->has_resize_func before we move_resize()
+       */
+      meta_window_recalc_features (window);
+      set_net_wm_state (window);
+
+
       target_rect = window->saved_rect;
 
       /* Window's size hints may have changed while maximized, making
@@ -3217,11 +3224,6 @@ meta_window_unmake_fullscreen (MetaWindow  *window)
       ensure_size_hints_satisfied (&target_rect, &window->size_hints);
       meta_window_client_rect_to_frame_rect (window, &target_rect, &target_rect);
 
-      /* Need to update window->has_resize_func before we move_resize()
-       */
-      meta_window_recalc_features (window);
-      set_net_wm_state (window);
-
       meta_window_move_resize_frame (window,
                                      FALSE,
                                      target_rect.x,
