diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-10-01 07:17:16 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-10-01 07:17:16 +0200 |
commit | 71137cc5832110d91599d68790402cf196762ed3 (patch) | |
tree | e7985bbfb6ca50ea738b38a9f852ee51431d48a7 /src/util/ui.vala | |
parent | 8ae550d463720d5d1c0e253af29843ff15de1a54 (diff) | |
parent | 1e92964463e564bb3359a7110342182fcfdc67f2 (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.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 + |