Always set fullscreen views to fully opaque
This commit is contained in:
parent
d4ca5d7a88
commit
036f9a1cb9
@ -192,7 +192,7 @@ pub fn setFocusRaw(self: *Self, new_focus: FocusTarget) void {
|
||||
// activated state.
|
||||
if (build_options.xwayland and self.focused.view.impl == .xwayland_view)
|
||||
c.wlr_xwayland_surface_activate(self.focused.view.impl.xwayland_view.wlr_xwayland_surface, false);
|
||||
if (self.focused.view.pending.focus == 0) {
|
||||
if (self.focused.view.pending.focus == 0 and !self.focused.view.pending.fullscreen) {
|
||||
self.focused.view.pending.target_opacity = self.input_manager.server.config.view_opacity_unfocused;
|
||||
}
|
||||
}
|
||||
@ -207,7 +207,9 @@ pub fn setFocusRaw(self: *Self, new_focus: FocusTarget) void {
|
||||
// activated state.
|
||||
if (build_options.xwayland and target_view.impl == .xwayland_view)
|
||||
c.wlr_xwayland_surface_activate(target_view.impl.xwayland_view.wlr_xwayland_surface, true);
|
||||
target_view.pending.target_opacity = self.input_manager.server.config.view_opacity_focused;
|
||||
if (!target_view.pending.fullscreen) {
|
||||
target_view.pending.target_opacity = self.input_manager.server.config.view_opacity_focused;
|
||||
}
|
||||
},
|
||||
.layer => |target_layer| std.debug.assert(self.focused_output == target_layer.output),
|
||||
.none => {},
|
||||
|
@ -180,7 +180,9 @@ pub fn applyPending(self: *Self) void {
|
||||
self.pending.box = self.float_box;
|
||||
|
||||
// If switching to fullscreen set the dimensions to the full area of the output
|
||||
// and turn the view fully opaque
|
||||
if (!self.current.fullscreen and self.pending.fullscreen) {
|
||||
self.pending.target_opacity = 1.0;
|
||||
const layout_box = c.wlr_output_layout_get_box(self.output.root.wlr_output_layout, self.output.wlr_output);
|
||||
self.pending.box = .{
|
||||
.x = 0,
|
||||
@ -190,10 +192,18 @@ pub fn applyPending(self: *Self) void {
|
||||
};
|
||||
}
|
||||
|
||||
// If switching from fullscreen to layout, arrange the output to get
|
||||
// assigned the proper size.
|
||||
if (self.current.fullscreen and !self.pending.fullscreen and !self.pending.float)
|
||||
arrange_output = true;
|
||||
if (self.current.fullscreen and !self.pending.fullscreen) {
|
||||
// If switching from fullscreen to layout, arrange the output to get
|
||||
// assigned the proper size.
|
||||
if (!self.pending.float)
|
||||
arrange_output = true;
|
||||
|
||||
// Restore configured opacity
|
||||
self.pending.target_opacity = if (self.pending.focus > 0)
|
||||
self.output.root.server.config.view_opacity_focused
|
||||
else
|
||||
self.output.root.server.config.view_opacity_unfocused;
|
||||
}
|
||||
|
||||
if (arrange_output) self.output.arrangeViews();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user