diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-09-30 14:09:32 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-09-30 14:09:32 +0200 |
commit | 0537caaf4af94a9ead8b292679f6b34c90b55e06 (patch) | |
tree | 6761cfdf959926be7af3147cf770e7f253390fe8 /src/util/ui.vala | |
parent | eca5837e235a356c8db9416bbbc13577db3e6f76 (diff) | |
parent | 5e9f4eea451a77ba3b93db3747841ed2bd969e9f (diff) |
Update upstream source from tag 'upstream/0.30.1'
Update to upstream version '0.30.1'
with Debian dir dc242531effff8d9c6fab093414edee28b403c6a
Diffstat (limited to 'src/util/ui.vala')
-rw-r--r-- | src/util/ui.vala | 17 |
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 + |