Implement configurable view opacity with fade effect
This commit is contained in:
committed by
Isaac Freund
parent
27b666dbba
commit
b67ea748a3
@ -188,6 +188,9 @@ 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) {
|
||||
self.focused.view.pending.target_opacity = self.input_manager.server.config.view_opacity_unfocused;
|
||||
}
|
||||
}
|
||||
c.wlr_seat_keyboard_clear_focus(self.wlr_seat);
|
||||
|
||||
@ -200,6 +203,7 @@ 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;
|
||||
},
|
||||
.layer => |target_layer| std.debug.assert(self.focused_output == target_layer.output),
|
||||
.none => {},
|
||||
@ -281,7 +285,7 @@ pub fn handleMapping(self: *Self, keysym: c.xkb_keysym_t, modifiers: u32, releas
|
||||
if (out) |s| {
|
||||
const stdout = std.io.getStdOut().outStream();
|
||||
stdout.print("{}", .{s}) catch
|
||||
|err| log.err(.command, "{}: write to stdout failed {}", .{ args[0], err });
|
||||
|err| log.err(.command, "{}: write to stdout failed {}", .{ args[0], err });
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user