Xwayland: hide override redirect windows if locked
This commit is contained in:
parent
0be43ad45f
commit
4a9d84bdb8
@ -18,6 +18,9 @@ const LockManager = @This();
|
||||
|
||||
const std = @import("std");
|
||||
const assert = std.debug.assert;
|
||||
|
||||
const build_options = @import("build_options");
|
||||
|
||||
const wlr = @import("wlroots");
|
||||
const wl = @import("wayland").server.wl;
|
||||
|
||||
@ -92,6 +95,10 @@ fn handleLock(listener: *wl.Listener(*wlr.SessionLockV1), lock: *wlr.SessionLock
|
||||
if (manager.state == .unlocked) {
|
||||
manager.state = .waiting_for_lock_surfaces;
|
||||
|
||||
if (build_options.xwayland) {
|
||||
server.root.layers.xwayland_override_redirect.node.setEnabled(false);
|
||||
}
|
||||
|
||||
manager.lock_surfaces_timer.timerUpdate(200) catch {
|
||||
log.err("error setting lock surfaces timer, imperfect frames may be shown", .{});
|
||||
manager.state = .waiting_for_blank;
|
||||
@ -218,6 +225,10 @@ fn handleUnlock(listener: *wl.Listener(void)) void {
|
||||
}
|
||||
}
|
||||
|
||||
if (build_options.xwayland) {
|
||||
server.root.layers.xwayland_override_redirect.node.setEnabled(true);
|
||||
}
|
||||
|
||||
{
|
||||
var it = server.input_manager.seats.first;
|
||||
while (it) |node| : (it = node.next) {
|
||||
|
Loading…
Reference in New Issue
Block a user