summaryrefslogtreecommitdiff
path: root/src/util/ui.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-09-30 14:09:20 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-09-30 14:09:20 +0200
commit5e9f4eea451a77ba3b93db3747841ed2bd969e9f (patch)
tree75046a38ca68975261d853a2e56ff7bf6b3e1daa /src/util/ui.vala
parent18b52c2983a1b3409011f72d27f15de576c5eb1c (diff)
New upstream version 0.30.1upstream/0.30.1
Diffstat (limited to 'src/util/ui.vala')
-rw-r--r--src/util/ui.vala17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/util/ui.vala b/src/util/ui.vala
index e1c22f1..7e7348f 100644
--- a/src/util/ui.vala
+++ b/src/util/ui.vala
@@ -86,3 +86,20 @@ public bool has_only_key_modifier(Gdk.ModifierType field, Gdk.ModifierType mask)
| Gdk.ModifierType.META_MASK)) == mask;
}
+#if ENABLE_FACES
+bool is_pointer_over(Gdk.Window window) {
+ Gdk.DeviceManager? devmgr = window.get_display().get_device_manager();
+ if (devmgr == null) {
+ debug("No device 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);
+
+ return x >= 0 && y >= 0 && x < window.get_width() && y < window.get_height();
+}
+#endif
+