[PATCH weston v2 18/24] xwm: move fini near init in set_pending_state

Pekka Paalanen ppaalanen at gmail.com
Wed Dec 21 14:40:16 UTC 2016


From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

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 at collabora.co.uk>
---
 xwayland/window-manager.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index 539387c..faeb9dd 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -1175,8 +1175,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);
@@ -1190,11 +1188,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)
-- 
2.10.2



More information about the wayland-devel mailing list