diff options
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)) { |