Skip to content

Commit

Permalink
Fixed race condtions when unmanaging (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerjenigeUberMensch authored Aug 23, 2024
1 parent 9416837 commit 814587e
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,14 @@ destroynotify(XCBGenericEvent *event)

u8 sync = 0;

PropListen(_wm.handler, _wm.dpy, win, PropUnmanage);
Client *c = wintoclient(win);

if(c)
{
unmanage(c, 1);
/* unused due to race conditions */
/* PropListen(_wm.handler, _wm.dpy, win, PropUnmanage); */
}

if(sync)
{ XCBFlush(_wm.dpy);
Expand Down Expand Up @@ -1055,7 +1062,14 @@ unmapnotify(XCBGenericEvent *event)

u8 sync = 0;

PropListen(_wm.handler, _wm.dpy, win, PropUnmanage);
Client *c = wintoclient(win);

if(c)
{
unmanage(c, 1);
/* unused due to race conditions */
/* PropListen(_wm.handler, _wm.dpy, win, PropUnmanage); */
}

if(sync)
{ XCBFlush(_wm.dpy);
Expand Down

0 comments on commit 814587e

Please sign in to comment.