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 | 1f6f24308e96040962794c5a9ffd81597b5e072a (patch) | |
tree | 7d719e21bf759d20ace53bcac13325048aa21a8c /src/utilities/focusGrabber.vala | |
parent | 87a5b11d7598fc1e5239e11972c5e03a38bbb672 (diff) |
Imported Upstream version 0.5.4upstream/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)) { |