[mutter/wip/carlosg/pointer-lock-checks: 2/3] wayland: Check pointer visibility on post-grab focus changes
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/pointer-lock-checks: 2/3] wayland: Check pointer visibility on post-grab focus changes
- Date: Thu, 12 Sep 2019 17:26:09 +0000 (UTC)
commit 01a382f26a4988a686dbdbff4db58c73e88aa467
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Sep 12 19:18:44 2019 +0200
wayland: Check pointer visibility on post-grab focus changes
Just like sync_focus_surface() does, we shouldn't set a focus surface while
the pointer is hidden, so the illusion that there is none remains.
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/779
src/wayland/meta-wayland-pointer.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index e8f0be4c6..7f74c5f7c 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -427,6 +427,8 @@ default_grab_focus (MetaWaylandPointerGrab *grab,
MetaWaylandPointer *pointer = grab->pointer;
MetaWaylandSeat *seat = meta_wayland_pointer_get_seat (pointer);
MetaDisplay *display = meta_get_display ();
+ MetaBackend *backend = meta_get_backend ();
+ MetaCursorTracker *cursor_tracker = meta_backend_get_cursor_tracker (backend);
if (pointer->button_count > 0)
return;
@@ -444,7 +446,8 @@ default_grab_focus (MetaWaylandPointerGrab *grab,
break;
}
- if (meta_wayland_seat_has_pointer (seat))
+ if (meta_wayland_seat_has_pointer (seat) &&
+ meta_cursor_tracker_get_pointer_visible (cursor_tracker))
meta_wayland_pointer_set_focus (pointer, surface);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]