X11: act on DestroyNotify rather than UnmapNotify
This makes the program survive i3 restarts, which cause a sequence of: UnmapNotify, ReparentNotify, MapNotify.
This commit is contained in:
parent
0b62b2a788
commit
349c907cbf
5
nncmpp.c
5
nncmpp.c
|
@ -6748,7 +6748,10 @@ on_x11_event (XEvent *ev)
|
||||||
case SelectionClear:
|
case SelectionClear:
|
||||||
cstr_set (&g.x11_selection, NULL);
|
cstr_set (&g.x11_selection, NULL);
|
||||||
break;
|
break;
|
||||||
case UnmapNotify:
|
// UnmapNotify can be received when restarting the window manager.
|
||||||
|
// Should this turn out to be unreliable (window not destroyed by WM
|
||||||
|
// upon closing), opt for the WM_DELETE_WINDOW protocol as well.
|
||||||
|
case DestroyNotify:
|
||||||
app_quit ();
|
app_quit ();
|
||||||
break;
|
break;
|
||||||
case FocusIn:
|
case FocusIn:
|
||||||
|
|
Loading…
Reference in New Issue