diff options
| author | Isaac Freund <mail@isaacfreund.com> | 2023-11-03 17:16:04 +0100 |
|---|---|---|
| committer | Isaac Freund <mail@isaacfreund.com> | 2023-11-03 17:16:04 +0100 |
| commit | 642f9b7ae0b5fd55d7b677640f9df1e1f6bc4a42 (patch) | |
| tree | cfb3af3968ebb9cf9449440ed21095cc8baa00d8 | |
| parent | 59c9842c8f0942846e4b7cae61cfa2fc4c55c856 (diff) | |
| download | river-642f9b7ae0b5fd55d7b677640f9df1e1f6bc4a42.tar.gz river-642f9b7ae0b5fd55d7b677640f9df1e1f6bc4a42.tar.xz | |
XdgToplevel: tweak fullscreen state policy
Currently river only sends the fullscreen state to a maximum of one
toplevel per output at a time and switching tags such that the
fullscreen toplevel is not visible causes the fullscreen state to be
removed.
This may be technically correct, but it causes issues when programs like
firefox trigger animations on fullscreen state change.
This commit returns river's policy here to what we did back in 0.2 and
leaves the xdg_toplevel fullscreen state set regardless of whether or
not the toplevel is currently rendered as fullscreen or if there are
other fullscreen toplevels.
| -rw-r--r-- | river/XdgToplevel.zig | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/river/XdgToplevel.zig b/river/XdgToplevel.zig index dcb5991..8952106 100644 --- a/river/XdgToplevel.zig +++ b/river/XdgToplevel.zig @@ -104,9 +104,6 @@ pub fn configure(self: *Self) bool { const inflight = &self.view.inflight; const current = &self.view.current; - const inflight_fullscreen = inflight.output != null and inflight.output.?.inflight.fullscreen == self.view; - const current_fullscreen = current.output != null and current.output.?.current.fullscreen == self.view; - const inflight_float = inflight.float or (inflight.output != null and inflight.output.?.layout == null); const current_float = current.float or (current.output != null and current.output.?.layout == null); @@ -116,7 +113,7 @@ pub fn configure(self: *Self) bool { if (inflight.box.width == current.box.width and inflight.box.height == current.box.height and (inflight.focus != 0) == (current.focus != 0) and - inflight_fullscreen == current_fullscreen and + inflight.fullscreen == current.fullscreen and inflight_float == current_float and inflight.ssd == current.ssd and inflight.resizing == current.resizing) @@ -126,7 +123,7 @@ pub fn configure(self: *Self) bool { _ = self.xdg_toplevel.setActivated(inflight.focus != 0); - _ = self.xdg_toplevel.setFullscreen(inflight_fullscreen); + _ = self.xdg_toplevel.setFullscreen(inflight.fullscreen); if (inflight_float) { _ = self.xdg_toplevel.setTiled(.{ .top = false, .bottom = false, .left = false, .right = false }); |
