command/input: add map-to-output
This commit is contained in:
@ -138,6 +138,19 @@ pub fn inputAllowed(self: Self, wlr_surface: *wlr.Surface) bool {
|
||||
true;
|
||||
}
|
||||
|
||||
/// Reconfigures all devices' libinput configuration as well as their output mapping.
|
||||
/// This is called on outputs being added or removed and on the input configuration being changed.
|
||||
pub fn reconfigureDevices(self: *Self) void {
|
||||
var it = self.devices.iterator(.forward);
|
||||
while (it.next()) |device| {
|
||||
for (self.configs.items) |config| {
|
||||
if (@import("globber").match(device.identifier, config.glob)) {
|
||||
config.apply(device);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn handleNewInput(listener: *wl.Listener(*wlr.InputDevice), wlr_device: *wlr.InputDevice) void {
|
||||
const self = @fieldParentPtr(Self, "new_input", listener);
|
||||
|
||||
|
Reference in New Issue
Block a user