xwm: move fini near init in set_pending_state
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 20 Dec 2016 12:01:42 +0000 (14:01 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Wed, 18 Jan 2017 11:42:04 +0000 (13:42 +0200)
Move the region fini just above the region init. They are a pair and
belong togeether. Split a long line.

Reads better this way. No functional changes.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
xwayland/window-manager.c

index 76d5ab2..e876de6 100644 (file)
@@ -1177,8 +1177,6 @@ weston_wm_window_set_pending_state(struct weston_wm_window *window)
                                          window->height + 2);
        }
 
-       pixman_region32_fini(&window->surface->pending.input);
-
        if (window->decorate && !window->fullscreen) {
                frame_input_rect(window->frame, &input_x, &input_y,
                                 &input_w, &input_h);
@@ -1192,11 +1190,13 @@ weston_wm_window_set_pending_state(struct weston_wm_window *window)
        wm_log("XWM: win %d geometry: %d,%d %dx%d\n",
               window->id, input_x, input_y, input_w, input_h);
 
+       pixman_region32_fini(&window->surface->pending.input);
        pixman_region32_init_rect(&window->surface->pending.input,
                                  input_x, input_y, input_w, input_h);
 
        xwayland_interface->set_window_geometry(window->shsurf,
-                                               input_x, input_y, input_w, input_h);
+                                               input_x, input_y,
+                                               input_w, input_h);
        if (window->name)
                xwayland_interface->set_title(window->shsurf, window->name);
        if (window->pid > 0)