Remove unused event parameter from Cursor.Mode.enter()
This commit is contained in:
parent
b6861bc80b
commit
1e0ee3b146
@ -45,7 +45,7 @@ const Mode = union(enum) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/// Enter move or resize mode
|
/// Enter move or resize mode
|
||||||
fn enter(self: *Self, mode: @TagType(Mode), event: *c.wlr_event_pointer_button, view: *View) void {
|
pub fn enter(self: *Self, mode: @TagType(Mode), view: *View) void {
|
||||||
log.debug(.cursor, "enter {} mode", .{@tagName(mode)});
|
log.debug(.cursor, "enter {} mode", .{@tagName(mode)});
|
||||||
|
|
||||||
self.seat.focus(view);
|
self.seat.focus(view);
|
||||||
@ -418,7 +418,7 @@ fn handleButton(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
|
|||||||
// handled we are done here
|
// handled we are done here
|
||||||
if (self.handlePointerMapping(event, view)) return;
|
if (self.handlePointerMapping(event, view)) return;
|
||||||
// Otherwise enter cursor down mode
|
// Otherwise enter cursor down mode
|
||||||
Mode.enter(self, .down, event, view);
|
Mode.enter(self, .down, view);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -443,8 +443,8 @@ fn handlePointerMapping(self: *Self, event: *c.wlr_event_pointer_button, view: *
|
|||||||
return for (config.modes.items[self.seat.mode_id].pointer_mappings.items) |mapping| {
|
return for (config.modes.items[self.seat.mode_id].pointer_mappings.items) |mapping| {
|
||||||
if (event.button == mapping.event_code and modifiers == mapping.modifiers) {
|
if (event.button == mapping.event_code and modifiers == mapping.modifiers) {
|
||||||
switch (mapping.action) {
|
switch (mapping.action) {
|
||||||
.move => if (!fullscreen) Mode.enter(self, .move, event, view),
|
.move => if (!fullscreen) Mode.enter(self, .move, view),
|
||||||
.resize => if (!fullscreen) Mode.enter(self, .resize, event, view),
|
.resize => if (!fullscreen) Mode.enter(self, .resize, view),
|
||||||
}
|
}
|
||||||
break true;
|
break true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user