From 1f6f24308e96040962794c5a9ffd81597b5e072a Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Sat, 3 Nov 2012 16:15:11 +0100 Subject: Imported Upstream version 0.5.4 --- src/utilities/focusGrabber.vala | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/utilities/focusGrabber.vala') 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 list = manager.list_devices(Gdk.DeviceType.MASTER); + #if VALA_0_16 || VALA_0_17 + GLib.List list = manager.list_devices(Gdk.DeviceType.MASTER); + #else + unowned GLib.List 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 list = manager.list_devices(Gdk.DeviceType.MASTER); + #if VALA_0_16 + GLib.List list = manager.list_devices(Gdk.DeviceType.MASTER); + #else + unowned GLib.List 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)) { -- cgit v1.2.3