We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9334ca0 commit 23ce12aCopy full SHA for 23ce12a
src/selection_edge.c
@@ -131,10 +131,13 @@ void selectionEdgeDestroy(void)
131
if (pe->wndDraw != None) {
132
XSelectInput(disp, pe->wndDraw, StructureNotifyMask);
133
XDestroyWindow(disp, pe->wndDraw);
134
- for (XEvent ev; true;) {
+ bool is_unmapped = false, is_destroyed = false;
135
+ for (XEvent ev; !(is_unmapped && is_destroyed);) {
136
XNextEvent(disp, &ev);
137
if (ev.type == DestroyNotify && ev.xdestroywindow.window == pe->wndDraw)
- break;
138
+ is_destroyed = true;
139
+ if (ev.type == UnmapNotify && ev.xunmap.window == pe->wndDraw)
140
+ is_unmapped = true;
141
}
142
/* HACK: although we recived a DestroyNotify event, the frame still
143
* might not have been updated. a compositor might also buffer frames
0 commit comments