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




commit aaf513521c153ff6b6f83210b2ff7b0c3131438e
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..ba4166b8e8 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]