remove variable

This commit is contained in:
Guido Cella 2020-09-06 19:59:58 +02:00
parent 52a4d3a1e5
commit 79f3bbaf38
1 changed files with 3 additions and 4 deletions

7
dwl.c
View File

@ -140,7 +140,6 @@ typedef struct {
struct wlr_box geo; struct wlr_box geo;
enum zwlr_layer_shell_v1_layer layer; enum zwlr_layer_shell_v1_layer layer;
bool unmapping;
} LayerSurface; } LayerSurface;
typedef struct { typedef struct {
@ -1985,7 +1984,7 @@ shouldfocusclients(Monitor *m)
for (size_t i = 0; i < LENGTH(layers_above_shell); ++i) for (size_t i = 0; i < LENGTH(layers_above_shell); ++i)
wl_list_for_each(layersurface, &m->layers[layers_above_shell[i]], link) wl_list_for_each(layersurface, &m->layers[layers_above_shell[i]], link)
if (layersurface->layer_surface->current.keyboard_interactive && if (layersurface->layer_surface->current.keyboard_interactive &&
!layersurface->unmapping) layersurface->layer_surface->mapped)
return false; return false;
return true; return true;
} }
@ -2094,7 +2093,7 @@ toggleview(const Arg *arg)
void void
unmaplayersurface(LayerSurface *layersurface) unmaplayersurface(LayerSurface *layersurface)
{ {
layersurface->unmapping = true; layersurface->layer_surface->mapped = false;
if (layersurface->layer_surface->surface == if (layersurface->layer_surface->surface ==
seat->keyboard_state.focused_surface) seat->keyboard_state.focused_surface)
focusclient(NULL, selclient(), 1); focusclient(NULL, selclient(), 1);
@ -2155,7 +2154,7 @@ xytolayersurface(struct wl_list *layer_surfaces, double x, double y,
LayerSurface *layersurface; LayerSurface *layersurface;
wl_list_for_each_reverse(layersurface, layer_surfaces, link) { wl_list_for_each_reverse(layersurface, layer_surfaces, link) {
struct wlr_surface *sub; struct wlr_surface *sub;
if (layersurface->unmapping) if (!layersurface->layer_surface->mapped)
continue; continue;
sub = wlr_layer_surface_v1_surface_at( sub = wlr_layer_surface_v1_surface_at(
layersurface->layer_surface, layersurface->layer_surface,