From: Malcolm Still Date: Fri, 6 Jan 2017 15:30:08 +0000 (+0000) Subject: Use new Libinput.CreateContext and Libinput.AssignSeat functions in Setup(). X-Git-Tag: v3.0.0~100^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa8f19a40afb2311442480f587846470d21300fd;p=platform%2Fcore%2Fcsapi%2Fopentk.git Use new Libinput.CreateContext and Libinput.AssignSeat functions in Setup(). --- diff --git a/src/OpenTK/Platform/Linux/LinuxInput.cs b/src/OpenTK/Platform/Linux/LinuxInput.cs index 8b7a02e..5e42712 100644 --- a/src/OpenTK/Platform/Linux/LinuxInput.cs +++ b/src/OpenTK/Platform/Linux/LinuxInput.cs @@ -314,7 +314,7 @@ namespace OpenTK.Platform.Linux } Debug.Print("[Input] Udev.New() = {0:x}", udev); - input_context = LibInput.CreateContext(input_interface, IntPtr.Zero, udev, "seat0"); + input_context = LibInput.CreateContext(input_interface, IntPtr.Zero, udev); if (input_context == IntPtr.Zero) { Debug.Print("[Input] LibInput.CreateContext({0:x}) failed.", udev); @@ -323,6 +323,16 @@ namespace OpenTK.Platform.Linux } Debug.Print("[Input] LibInput.CreateContext({0:x}) = {1:x}", udev, input_context); + string seat_id = "seat0"; + int seat_assignment = LibInput.AssignSeat(input_context, seat_id); + if (seat_assignment == -1) + { + Debug.Print("[Input] LibInput.AssignSeat({0:x}) = {1} failed.", input_context, seat_id); + Interlocked.Increment(ref exit); + return; + } + Debug.Print("[Input] LibInput.AssignSeat({0:x}) = {1}", input_context, seat_id); + fd = LibInput.GetFD(input_context); if (fd < 0) {