summaryrefslogtreecommitdiff
path: root/src/util/ui.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-10-01 07:17:16 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-10-01 07:17:16 +0200
commit71137cc5832110d91599d68790402cf196762ed3 (patch)
treee7985bbfb6ca50ea738b38a9f852ee51431d48a7 /src/util/ui.vala
parent8ae550d463720d5d1c0e253af29843ff15de1a54 (diff)
parent1e92964463e564bb3359a7110342182fcfdc67f2 (diff)
Merge branch 'release/debian/0.30.1-1'debian/0.30.1-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
+