view: replace mode with float/fullscreen bools

The enum would be awkward here since if a view is fullscreened while
floating it should still be floating when defullscreened.
This commit is contained in:
Isaac Freund
2020-06-28 20:30:12 +02:00
parent 60f06a1a40
commit 5b96d831d3
6 changed files with 30 additions and 24 deletions

View File

@ -174,13 +174,13 @@ fn handleMap(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
if (wlr_xdg_toplevel.parent != null or has_fixed_size) {
// If the toplevel has a parent or has a fixed size make it float
view.pending.mode = .float;
view.pending.float = true;
view.pending.box = view.getDefaultFloatBox();
} else {
// Make views with app_ids listed in the float filter float
for (root.server.config.float_filter.items) |filter_app_id| {
if (std.mem.eql(u8, std.mem.span(app_id), std.mem.span(filter_app_id))) {
view.pending.mode = .float;
view.pending.float = true;
view.pending.box = view.getDefaultFloatBox();
break;
}