diff options
author | Alessandro Ghedini <al3xbio@gmail.com> | 2012-11-03 16:15:11 +0100 |
---|---|---|
committer | Alessandro Ghedini <al3xbio@gmail.com> | 2012-11-03 16:15:11 +0100 |
commit | c81d7ea856ed6639a7c1e0d31b86b5631c287840 (patch) | |
tree | b06cbaafb6ff2e054f7258d7e07f37de8aea2c0f /src/utilities/focusGrabber.vala | |
parent | b176845fa1254ae7b88d355f825688689bbe9fdc (diff) | |
parent | 1f6f24308e96040962794c5a9ffd81597b5e072a (diff) |
Merge tag 'upstream/0.5.4'
Upstream version 0.5.4
Diffstat (limited to 'src/utilities/focusGrabber.vala')
-rw-r--r-- | src/utilities/focusGrabber.vala | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/utilities/focusGrabber.vala b/src/utilities/focusGrabber.vala index 293e103..e5900d6 100644 --- a/src/utilities/focusGrabber.vala +++ b/src/utilities/focusGrabber.vala @@ -53,7 +53,12 @@ public class FocusGrabber : GLib.Object { var display = Gdk.Display.get_default(); var manager = display.get_device_manager(); - unowned GLib.List<weak Gdk.Device?> list = manager.list_devices(Gdk.DeviceType.MASTER); + #if VALA_0_16 || VALA_0_17 + GLib.List<weak Gdk.Device?> list = manager.list_devices(Gdk.DeviceType.MASTER); + #else + unowned GLib.List<weak Gdk.Device?> list = manager.list_devices(Gdk.DeviceType.MASTER); + #endif + foreach(var device in list) { if ((device.input_source == Gdk.InputSource.KEYBOARD && keyboard) || (device.input_source != Gdk.InputSource.KEYBOARD && pointer)) @@ -81,7 +86,12 @@ public class FocusGrabber : GLib.Object { bool grabbed_all = true; - unowned GLib.List<weak Gdk.Device?> list = manager.list_devices(Gdk.DeviceType.MASTER); + #if VALA_0_16 + GLib.List<weak Gdk.Device?> list = manager.list_devices(Gdk.DeviceType.MASTER); + #else + unowned GLib.List<weak Gdk.Device?> list = manager.list_devices(Gdk.DeviceType.MASTER); + #endif + foreach(var device in list) { if ((device.input_source == Gdk.InputSource.KEYBOARD && keyboard) || (device.input_source != Gdk.InputSource.KEYBOARD && pointer)) { |