deps: update to latest zig-wayland and zig-wlroots
This commit is contained in:
parent
12e6833f31
commit
0eacde7d01
2
deps/zig-wayland
vendored
2
deps/zig-wayland
vendored
@ -1 +1 @@
|
|||||||
Subproject commit b9c6fcb8cab3a85c5583ef371055cb589b1e7b18
|
Subproject commit 70285787ce871a5f2bc91151a610f54b537c8857
|
2
deps/zig-wlroots
vendored
2
deps/zig-wlroots
vendored
@ -1 +1 @@
|
|||||||
Subproject commit e7e49951662d346f0f522124f2138ecf9c44ded9
|
Subproject commit 4094b86f6ec705e2f3974406601ec986364e87a3
|
@ -217,7 +217,7 @@ pub const ScrollButton = struct {
|
|||||||
pub const MapToOutput = struct {
|
pub const MapToOutput = struct {
|
||||||
output_name: ?[]const u8,
|
output_name: ?[]const u8,
|
||||||
|
|
||||||
fn apply(map_to_output: MapToOutput, device: *wlr.InputDevice) void {
|
fn apply(map_to_output: MapToOutput, device: *InputDevice) void {
|
||||||
const wlr_output = blk: {
|
const wlr_output = blk: {
|
||||||
if (map_to_output.output_name) |name| {
|
if (map_to_output.output_name) |name| {
|
||||||
var it = server.root.active_outputs.iterator(.forward);
|
var it = server.root.active_outputs.iterator(.forward);
|
||||||
@ -230,16 +230,14 @@ pub const MapToOutput = struct {
|
|||||||
break :blk null;
|
break :blk null;
|
||||||
};
|
};
|
||||||
|
|
||||||
switch (device.type) {
|
switch (device.wlr_device.type) {
|
||||||
.pointer, .touch, .tablet_tool => {
|
.pointer, .touch, .tablet_tool => {
|
||||||
log.debug("mapping input '{s}' -> '{s}'", .{
|
log.debug("mapping input '{s}' -> '{s}'", .{
|
||||||
device.name,
|
device.identifier,
|
||||||
if (wlr_output) |o| o.name else "<no output>",
|
if (wlr_output) |o| o.name else "<no output>",
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: support multiple seats
|
device.seat.cursor.wlr_cursor.mapInputToOutput(device.wlr_device, wlr_output);
|
||||||
const seat = server.input_manager.defaultSeat();
|
|
||||||
seat.cursor.wlr_cursor.mapInputToOutput(device, wlr_output);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// These devices do not support being mapped to outputs.
|
// These devices do not support being mapped to outputs.
|
||||||
@ -283,7 +281,7 @@ pub fn apply(self: *const Self, device: *InputDevice) void {
|
|||||||
if (comptime mem.eql(u8, field.name, "glob")) continue;
|
if (comptime mem.eql(u8, field.name, "glob")) continue;
|
||||||
|
|
||||||
if (comptime mem.eql(u8, field.name, "map-to-output")) {
|
if (comptime mem.eql(u8, field.name, "map-to-output")) {
|
||||||
@field(self, field.name).apply(device.wlr_device);
|
@field(self, field.name).apply(device);
|
||||||
} else if (@field(self, field.name)) |setting| {
|
} else if (@field(self, field.name)) |setting| {
|
||||||
log.debug("applying setting: {s}", .{field.name});
|
log.debug("applying setting: {s}", .{field.name});
|
||||||
setting.apply(libinput_device);
|
setting.apply(libinput_device);
|
||||||
|
@ -59,7 +59,7 @@ pub fn init(device: *InputDevice, seat: *Seat, wlr_device: *wlr.InputDevice) !vo
|
|||||||
device_type,
|
device_type,
|
||||||
wlr_device.vendor,
|
wlr_device.vendor,
|
||||||
wlr_device.product,
|
wlr_device.product,
|
||||||
mem.trim(u8, mem.sliceTo(wlr_device.name, 0), &ascii.whitespace),
|
mem.trim(u8, mem.sliceTo(wlr_device.name orelse "unknown", 0), &ascii.whitespace),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
errdefer util.gpa.free(identifier);
|
errdefer util.gpa.free(identifier);
|
||||||
|
Loading…
Reference in New Issue
Block a user