map-pointer: allow running arbitrary commands

This commit is contained in:
Alexander Courtis
2022-11-25 14:05:36 +01:00
committed by Isaac Freund
parent e2a27b3a4e
commit cacc986166
8 changed files with 89 additions and 25 deletions
+4
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;
}