[mutter/wip/carlosg/surfaceless-activation] wayland: Check serial for activation if no surface is provided




commit 3f2306ae8367508576bec84a39dcac700836985e
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Dec 2 13:30:21 2021 +0100

    wayland: Check serial for activation if no surface is provided
    
    Having a "requester" surface helps with accuracy (e.g. ensuring the
    pointer is still within coordinates, besides the token serial still
    remaining valid). In the case we don't have one, still check the
    serial so that we know no other button presses/etc happened in between
    and activate the window if none happened.

 src/wayland/meta-wayland-activation.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/wayland/meta-wayland-activation.c b/src/wayland/meta-wayland-activation.c
index 1983566c1c..68045ccbac 100644
--- a/src/wayland/meta-wayland-activation.c
+++ b/src/wayland/meta-wayland-activation.c
@@ -279,11 +279,12 @@ activation_activate (struct wl_client   *client,
     return;
 
   if (token->seat &&
-      token->surface &&
-      meta_wayland_seat_get_grab_info (token->seat,
-                                       token->surface,
-                                       token->serial,
-                                       FALSE, NULL, NULL))
+      ((token->surface &&
+        meta_wayland_seat_get_grab_info (token->seat,
+                                         token->surface,
+                                         token->serial,
+                                         FALSE, NULL, NULL)) ||
+       meta_wayland_seat_can_popup (token->seat, token->serial)))
     {
       uint32_t timestamp;
       int32_t workspace_idx;


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