summaryrefslogtreecommitdiff
path: root/src/util/ui.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-06-28 21:35:52 +0200
committerJörg Frings-Fürst <debian@jff.email>2023-06-28 21:35:52 +0200
commitb86540b743f1a87a163ffb811c8fe22a01fefa38 (patch)
treeb47cb3bb83c2377234226fb3987ab3320a987dd9 /src/util/ui.vala
parentac6e0b731b9f0b2efd392e3309a5c07e2a66adad (diff)
parente905d8e16eec152d19797937f13ba3cf4b8f8aca (diff)
Merge branch 'release/debian/0.32.1-1'debian/0.32.1-1
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();
}