summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2023-03-20 11:49:24 -0700
committerFlorian Müllner <fmuellner@gnome.org>2023-04-25 08:07:57 +0000
commitaef5975acf4aa5279969006504f22a2ca27b569d (patch)
tree59484fa11e8f8f73bd719f65664e66fcadbf4120
parent046c283736c024af80cd6b7bad8da1051e87e5cd (diff)
downloadgnome-shell-aef5975acf4aa5279969006504f22a2ca27b569d.tar.gz
screenshot: Use meta_window_has_pointer () for pointer check
https://gitlab.gnome.org/GNOME/mutter/-/commit/909616b20876478bc56932cd18c8e85e982645f6 seems to have wrapped window actors in a container, so the actor.has_pointer check started failing. Instead, switch to meta_window_has_pointer () which doesn't rely on window actor implementation details. We check for existence of has_pointer first just in case someone attempts to run gnome-shell 44.1 with mutter 44.0 which does not have the function exported publicly yet. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2710> (cherry picked from commit 4daea0ccaeda3d752a9630437f65cfea100e63fa)
-rw-r--r--js/ui/screenshot.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js
index b2ea6fad2..3c6ad030f 100644
--- a/js/ui/screenshot.js
+++ b/js/ui/screenshot.js
@@ -787,7 +787,7 @@ class UIWindowSelectorWindow extends St.Button {
this._cursor = null;
this._cursorPoint = { x: 0, y: 0 };
- this._shouldShowCursor = actor.get_children().some(c => c.has_pointer);
+ this._shouldShowCursor = window.has_pointer && window.has_pointer();
this.connect('destroy', this._onDestroy.bind(this));
}