Implement fullscreening

This commit is contained in:
Ben Buhse 2026-01-24 14:45:33 -06:00
commit 92e82f38f5
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
3 changed files with 101 additions and 46 deletions

View file

@ -8,6 +8,7 @@ pub const Command = union(enum) {
spawn: []const []const u8,
focus_next,
focus_prev,
fullscreen,
close_window,
exit,
};
@ -71,6 +72,11 @@ const XkbBinding = struct {
}
context.wm.window_manager_v1.manageDirty();
},
.fullscreen => {
const seat = context.wm.seats.first() orelse return;
const window = seat.focused orelse return;
window.pending_state.fullscreen = !window.fullscreen;
},
.close_window => {
const seat = context.wm.seats.first() orelse return;
if (seat.focused) |window| {