LayerSurface: handle focus when switching outputs
Currently if a layer surface is focused and the user focuses a different output the layer surface remains focused. However, updating focus on layer surface unmap only considers seats that have the layer surface's output focused. To fix this there are 3 approaches I see: 1. Unfocus all layer surfaces on the old output when switching output focus, focus any layer surfaces on the new output. 2. Disallow switching output focus while a layer surface is focused. 3. Stop caring about output focus when determining which layer surface should gain/lose focus. I've taken the 3rd option here as it is significantly simpler to implement and maintain but still feels reasonably intuitive.
This commit is contained in:
@ -166,9 +166,6 @@ fn handleKeyboardInteractiveExclusive(output: *Output) void {
|
||||
while (it) |node| : (it = node.next) {
|
||||
const seat = &node.data;
|
||||
|
||||
// Only grab focus of seats which have the output focused
|
||||
if (seat.focused_output != output) continue;
|
||||
|
||||
if (topmost_surface) |to_focus| {
|
||||
// If we found a surface that requires focus, grab the focus of all
|
||||
// seats.
|
||||
|
||||
Reference in New Issue
Block a user