[mutter/wip/carlosg/pointer-lock-checks: 70/72] wayland: Warn if a surface is being set while the pointer is invisible
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/pointer-lock-checks: 70/72] wayland: Warn if a surface is being set while the pointer is invisible
- Date: Mon, 7 Oct 2019 17:37:56 +0000 (UTC)
commit 9f617ae43dd0511b16387082b0ef7e59543280ac
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Sep 12 19:17:06 2019 +0200
wayland: Warn if a surface is being set while the pointer is invisible
This is an unexpected condition, better not to fall in it without further
indications.
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/779
src/wayland/meta-wayland-pointer.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 334349e30..e8f0be4c6 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -887,6 +887,11 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
MetaWaylandSurface *surface)
{
MetaWaylandInputDevice *input_device = META_WAYLAND_INPUT_DEVICE (pointer);
+ MetaBackend *backend = meta_get_backend ();
+ MetaCursorTracker *cursor_tracker = meta_backend_get_cursor_tracker (backend);
+
+ g_return_if_fail (meta_cursor_tracker_get_pointer_visible (cursor_tracker) ||
+ surface == NULL);
if (pointer->focus_surface == surface)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]