xwayland: Correct input for undecorated clients
authorJasper St. Pierre <jstpierre@mecheye.net>
Sun, 22 Mar 2015 04:24:43 +0000 (21:24 -0700)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 27 Mar 2015 06:57:00 +0000 (08:57 +0200)
We were correctly handling decorated and fullscreen clients, but left
uninitialized values in the input region for undecorated clients. Fix
this behavi-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
xwayland/window-manager.c

index ad608b718c2fcab61b40656bdcef076ca6bedf5a..59cf39ae324c1818c1586a540bd3337e8421b0c3 100644 (file)
@@ -1039,14 +1039,14 @@ weston_wm_window_draw_decoration(void *data)
 
                pixman_region32_fini(&window->surface->pending.input);
 
-               if (window->fullscreen) {
-                       input_x = 0;
-                       input_y = 0;
-                       input_w = window->width;
-                       input_h = window->height;
-               } else if (window->decorate) {
+               if (window->decorate && !window->fullscreen) {
                        frame_input_rect(window->frame, &input_x, &input_y,
                                         &input_w, &input_h);
+               } else {
+                       input_x = x;
+                       input_y = y;
+                       input_w = width;
+                       input_h = height;
                }
 
                pixman_region32_init_rect(&window->surface->pending.input,