cursor: implement moving views

This commit is contained in:
Leon Henrik Plickat
2020-07-07 16:39:08 +02:00
committed by Isaac Freund
parent dfe61fe77d
commit d292e61cfd
4 changed files with 189 additions and 22 deletions

View File

@ -70,6 +70,9 @@ focused_layer: ?*LayerSurface,
/// List of status tracking objects relaying changes to this seat to clients.
status_trackers: std.SinglyLinkedList(SeatStatus),
/// State of pointer modifier; Used for pointer operations such as move ans resize.
pointer_modifier: bool,
listen_request_set_selection: c.wl_listener,
pub fn init(self: *Self, input_manager: *InputManager, name: [*:0]const u8) !void {
@ -96,6 +99,8 @@ pub fn init(self: *Self, input_manager: *InputManager, name: [*:0]const u8) !voi
self.status_trackers = std.SinglyLinkedList(SeatStatus).init();
self.pointer_modifier = false;
self.listen_request_set_selection.notify = handleRequestSetSelection;
c.wl_signal_add(&self.wlr_seat.events.request_set_selection, &self.listen_request_set_selection);
}