summaryrefslogtreecommitdiff
path: root/src/util/ui.vala
diff options
context:
space:
mode:
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();
}