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

@ -36,11 +36,6 @@ const Impl = union(enum) {
xwayland_view: XwaylandView,
};
const Mode = enum {
layout,
float,
};
const State = struct {
/// The output-relative coordinates and dimensions of the view. The
/// surface itself may have other dimensions which are stored in the
@ -50,7 +45,8 @@ const State = struct {
/// The tags of the view, as a bitmask
tags: u32,
mode: Mode,
float: bool,
fullscreen: bool,
};
const SavedBuffer = struct {
@ -108,8 +104,10 @@ pub fn init(self: *Self, output: *Output, tags: u32, surface: var) void {
.width = 0,
},
.tags = tags,
.mode = .layout,
.float = false,
.fullscreen = false,
};
self.pending = self.current;
self.pending_serial = null;