Fix layer sufaces holding focus after unmap

This commit is contained in:
Isaac Freund
2020-04-19 15:15:50 +02:00
parent a0c30de132
commit 472e2b2624
3 changed files with 16 additions and 2 deletions

View File

@ -259,7 +259,10 @@ pub const Output = struct {
var it = self.layers[layer].last;
while (it) |node| : (it = node.prev) {
const layer_surface = &node.data;
if (layer_surface.wlr_layer_surface.current.keyboard_interactive) {
// Only mapped surfaces may gain focus
if (layer_surface.mapped and
layer_surface.wlr_layer_surface.current.keyboard_interactive)
{
break :outer layer_surface;
}
}