[mutter/wayland] wayland-surface: Don't rewrite input/opaque regions if the client doesn't attach any



commit 57866fb2677c7bf436ed2a27ae74c7bb0ad0ea19
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Nov 25 15:46:06 2013 -0500

    wayland-surface: Don't rewrite input/opaque regions if the client doesn't attach any

 src/wayland/meta-wayland-surface.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 597ee03..f5007cf 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -319,8 +319,11 @@ meta_wayland_surface_commit (struct wl_client *client,
                                             surface->pending.dx, surface->pending.dy);
        }
 
-      meta_window_set_opaque_region (surface->window, surface->pending.opaque_region);
-      meta_window_set_input_region (surface->window, surface->pending.input_region);
+      if (surface->pending.opaque_region)
+        meta_window_set_opaque_region (surface->window, surface->pending.opaque_region);
+      if (surface->pending.input_region)
+        meta_window_set_input_region (surface->window, surface->pending.input_region);
+
       surface_process_damage (surface, surface->pending.damage);
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]