session-lock: wait for present before locking
Currently we send the locked event after rendering and commit of blank or lock surfaces buffers on all outputs. However, this is technically not enough to ensure that the buffers have been presented. Instead, listen to the wlr_output present event to ensure that no normal, "unlocked" content is possibly visible.
This commit is contained in:
@ -98,9 +98,10 @@ pub fn renderOutput(output: *Output) void {
|
||||
return;
|
||||
};
|
||||
|
||||
output.lock_render_state = if (output.lock_surface != null) .lock_surface else .blanked;
|
||||
if (server.lock_manager.state != .locked) {
|
||||
server.lock_manager.maybeLock();
|
||||
if (output.lock_surface == null) {
|
||||
output.lock_render_state = .pending_blank;
|
||||
} else {
|
||||
output.lock_render_state = .pending_lock_surface;
|
||||
}
|
||||
|
||||
return;
|
||||
|
Reference in New Issue
Block a user