Add focus to my single window

This commit is contained in:
Ben Buhse 2025-08-03 20:49:06 -05:00
commit 9d64ca0124
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
5 changed files with 92 additions and 16 deletions

View file

@ -28,8 +28,12 @@ pub fn init(output: *Output, context: *Context, river_output_v1: *river.OutputV1
fn outputListener(river_output_v1: *river.OutputV1, event: river.OutputV1.Event, output: *Output) void {
assert(output.output_v1 == river_output_v1);
switch (event) {
.wl_output => |ev| {
log.debug("initializing new river_ouput_v1 corresponding to wl_output: {d}", .{ev.name});
.removed => {
river_output_v1.destroy();
output.context.allocator.destroy(output);
},
.wl_output => {
// log.debug("initializing new river_output_v1 corresponding to wl_output: {d}", .{ev.name});
},
.dimensions => |ev| {
output.width = ev.width;
@ -39,12 +43,17 @@ fn outputListener(river_output_v1: *river.OutputV1, event: river.OutputV1.Event,
output.x = ev.x;
output.y = ev.y;
},
else => |ev| {
log.debug("unhandled event: {s}", .{@tagName(ev)});
},
}
}
pub fn manage(output: *Output) void {
_ = output;
}
pub fn render(output: *Output) void {
_ = output;
}
const std = @import("std");
const assert = std.debug.assert;