opt: re-judge the focus strategy of the layer when re-arrangelayer
This commit is contained in:
11
src/mango.c
11
src/mango.c
@@ -1563,6 +1563,7 @@ void reset_exclusive_layer(Monitor *m) {
|
|||||||
unsigned int layers_above_shell[] = {
|
unsigned int layers_above_shell[] = {
|
||||||
ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY,
|
ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY,
|
||||||
ZWLR_LAYER_SHELL_V1_LAYER_TOP,
|
ZWLR_LAYER_SHELL_V1_LAYER_TOP,
|
||||||
|
ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!m)
|
if (!m)
|
||||||
@@ -1570,6 +1571,16 @@ void reset_exclusive_layer(Monitor *m) {
|
|||||||
|
|
||||||
for (i = 0; i < (int)LENGTH(layers_above_shell); i++) {
|
for (i = 0; i < (int)LENGTH(layers_above_shell); i++) {
|
||||||
wl_list_for_each_reverse(l, &m->layers[layers_above_shell[i]], link) {
|
wl_list_for_each_reverse(l, &m->layers[layers_above_shell[i]], link) {
|
||||||
|
if (l == exclusive_focus &&
|
||||||
|
l->layer_surface->current.keyboard_interactive !=
|
||||||
|
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE)
|
||||||
|
exclusive_focus = NULL;
|
||||||
|
if (l->layer_surface->current.keyboard_interactive ==
|
||||||
|
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE &&
|
||||||
|
l->layer_surface->surface ==
|
||||||
|
seat->keyboard_state.focused_surface)
|
||||||
|
focusclient(focustop(selmon), 1);
|
||||||
|
|
||||||
if (locked ||
|
if (locked ||
|
||||||
l->layer_surface->current.keyboard_interactive !=
|
l->layer_surface->current.keyboard_interactive !=
|
||||||
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE ||
|
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE ||
|
||||||
|
|||||||
Reference in New Issue
Block a user