private void OnButtonListener(IntPtr data, IntPtr pointerHandle, uint serial, uint time, WaylandMouseButton button, uint state) { if (_currentSurface == IntPtr.Zero) { return; } Control window = GetControlForSurface(_currentSurface); SeatInstance seat = App.CurrentApplication.Registry.Seat.Seats.First(s => s.Pointer == this); window.TriggerWaylandPointerButton(new WaylandPointerButtonEventArgs(this, seat, serial, button, state == 1, _currentSurfaceX, _currentSurfaceY)); }
private void OnSeatCapabilities(IntPtr data, IntPtr seatHandle, SeatCapability seatCapabilities) { // Get a handle to, or add, this seat SeatInstance seat = Seats.FirstOrDefault(s => s.Handle == seatHandle); if (seat == null) { seat = new SeatInstance(seatHandle); Seats.Add(seat); } seat.UpdateCapabilities(seatCapabilities); }
private void OnSeatName(IntPtr data, IntPtr seatHandle, string name) { // Get a handle to, or add, this seat SeatInstance seat = Seats.FirstOrDefault(s => s.Handle == seatHandle); if (seat == null) { seat = new SeatInstance(seatHandle); Seats.Add(seat); } // Update the name seat.Name = name; }