map-pointer: allow running arbitrary commands

This commit is contained in:
Alexander Courtis
2022-09-13 12:05:21 +10:00
committed by Isaac Freund
parent e2a27b3a4e
commit cacc986166
8 changed files with 89 additions and 25 deletions

View File

@ -528,6 +528,10 @@ fn handlePointerMapping(self: *Self, event: *wlr.Pointer.event.Button, view: *Vi
switch (mapping.action) {
.move => if (!fullscreen) self.enterMode(.move, view),
.resize => if (!fullscreen) self.enterMode(.resize, view),
.command => |args| {
self.seat.focus(view);
self.seat.runCommand(args);
},
}
break true;
}