aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Cella <guidocella91@gmail.com>2020-09-04 21:14:02 +0200
committerGuido Cella <guidocella91@gmail.com>2020-09-04 21:14:02 +0200
commit8de18f9bb4fe82d94fa76750fa398b28041f3fe3 (patch)
treed7f8a456a0929972765d0152c119ab9c46be4d73
parent71572521e94be7859a467fb43730d43fae75d2b0 (diff)
fix restoring pointer focus
I don't know why I thought it was working before. Maybe I should go do something else.
-rw-r--r--dwl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/dwl.c b/dwl.c
index 34ca1e4..d6974b0 100644
--- a/dwl.c
+++ b/dwl.c
@@ -140,6 +140,7 @@ typedef struct {
struct wlr_box geo;
enum zwlr_layer_shell_v1_layer layer;
+ bool unmapping;
} LayerSurface;
typedef struct {
@@ -2082,6 +2083,7 @@ toggleview(const Arg *arg)
void
unmaplayersurface(LayerSurface *layersurface)
{
+ layersurface->unmapping = true;
if (layersurface->layer_surface->surface ==
seat->keyboard_state.focused_surface)
focusclient(NULL, selclient(), 1);
@@ -2141,7 +2143,10 @@ xytolayersurface(struct wl_list *layer_surfaces, double x, double y,
{
LayerSurface *layersurface;
wl_list_for_each_reverse(layersurface, layer_surfaces, link) {
- struct wlr_surface *sub = wlr_layer_surface_v1_surface_at(
+ struct wlr_surface *sub;
+ if (layersurface->unmapping)
+ continue;
+ sub = wlr_layer_surface_v1_surface_at(
layersurface->layer_surface,
x - layersurface->geo.x,
y - layersurface->geo.y,