[mutter/wip/carlosg/fix-issue-63: 21/21] wayland: Fix wrong condition in xdg_exporter.export



commit 419fb81d401408084858a62767409baca17fd1c4
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Mar 12 17:08:18 2018 +0100

    wayland: Fix wrong condition in xdg_exporter.export
    
    Commit d714a94d9 added support for stable xdg-shell surfaces while
    preserving old unstable zxdg-shell v6 ones, but committed a mistake
    in checking for both in the xdg_exporter.export error condition
    paths. We want to check that the surface is neither of both.
    
    https://gitlab.gnome.org/GNOME/mutter/issues/63
    
    Closes: #63

 src/wayland/meta-wayland-xdg-foreign.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/wayland/meta-wayland-xdg-foreign.c b/src/wayland/meta-wayland-xdg-foreign.c
index cfeb81738..a04b2bfa7 100644
--- a/src/wayland/meta-wayland-xdg-foreign.c
+++ b/src/wayland/meta-wayland-xdg-foreign.c
@@ -144,10 +144,9 @@ xdg_exporter_export (struct wl_client   *client,
   MetaWaylandXdgExported *exported;
   char *handle;
 
-  if (!surface->role ||
-      !META_IS_WAYLAND_XDG_SURFACE (surface->role) ||
-      !META_IS_WAYLAND_ZXDG_SURFACE_V6 (surface->role) ||
-      !surface->window)
+  if (!surface->role || !surface->window ||
+      !(META_IS_WAYLAND_XDG_SURFACE (surface->role) ||
+        META_IS_WAYLAND_ZXDG_SURFACE_V6 (surface->role)))
     {
       wl_resource_post_error (resource,
                               WL_DISPLAY_ERROR_INVALID_OBJECT,


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