summaryrefslogtreecommitdiff
path: root/src/util/ui.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-06-14 20:36:17 +0200
committerJörg Frings-Fürst <debian@jff.email>2023-06-14 20:36:17 +0200
commit31804433d72460cbe0a39f9f8ea5e76058d84cda (patch)
tree2084a84c39f159c6aea254775dc0880d52579d45 /src/util/ui.vala
parenta9898fb3f39c44a85876930ef6b2558052569ae6 (diff)
parentd443a3c2509889533ca812c163056bace396b586 (diff)
Update upstream source from tag 'upstream/0.32.1'
Update to upstream version '0.32.1' with Debian dir c460ad6e13d3c39eaa2d5399059385e64e6fba4c
Diffstat (limited to 'src/util/ui.vala')
-rw-r--r--src/util/ui.vala11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/util/ui.vala b/src/util/ui.vala
index 6d32738..bdc7157 100644
--- a/src/util/ui.vala
+++ b/src/util/ui.vala
@@ -60,7 +60,7 @@ public Gdk.Rectangle get_adjustment_page(Gtk.Adjustment hadj, Gtk.Adjustment vad
}
// Verifies that only the mask bits are set in the modifier field, disregarding mouse and
-// key modifers that are not normally of concern (i.e. Num Lock, Caps Lock, etc.). Mask can be
+// key modifiers that are not normally of concern (i.e. Num Lock, Caps Lock, etc.). Mask can be
// one or more bits set, but should only consist of these values:
// * Gdk.ModifierType.SHIFT_MASK
// * Gdk.ModifierType.CONTROL_MASK
@@ -87,16 +87,15 @@ public bool has_only_key_modifier(Gdk.ModifierType field, Gdk.ModifierType mask)
}
bool is_pointer_over(Gdk.Window window) {
- Gdk.DeviceManager? devmgr = window.get_display().get_device_manager();
- if (devmgr == null) {
- debug("No device for display");
+ var seat = window.get_display().get_default_seat();
+ if (seat == null) {
+ debug("No seat for display");
return false;
}
int x, y;
- devmgr.get_client_pointer().get_position(null, out x, out y);
- //gdk_device_get_position(devmgr.get_client_pointer(), null, out x, out y);
+ seat.get_pointer().get_position(null, out x, out y);
return x >= 0 && y >= 0 && x < window.get_width() && y < window.get_height();
}