view: use a mode enum instead of floating bool

This is in preperation for fullscreen support which will add another
mode to this enum.

This commit also fixes a bug that allowed clicking floating views though
layout views in some cases.
This commit is contained in:
Isaac Freund
2020-06-27 17:33:09 +02:00
parent 3904275373
commit 89d0fb012d
7 changed files with 58 additions and 73 deletions

View File

@ -140,7 +140,6 @@ fn handleMap(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
c.wl_signal_add(&self.wlr_xwayland_surface.surface.*.events.commit, &self.listen_commit);
view.wlr_surface = self.wlr_xwayland_surface.surface;
view.floating = false;
view.natural_width = self.wlr_xwayland_surface.width;
view.natural_height = self.wlr_xwayland_surface.height;