Exit when window is destroyed
If the user closed our window, the program won't automatically be die. It may look dead as there would be no graphical indication that it was running, but it still would be using/wasting the same resources. Now the program will abruptly exit when its window is killed.
This commit is contained in:
parent
25a3114709
commit
9c73646d9c
3
main.c
3
main.c
|
@ -767,6 +767,9 @@ void run(void)
|
||||||
if ((Atom) ev.xclient.data.l[0] == atoms[ATOM_WM_DELETE_WINDOW])
|
if ((Atom) ev.xclient.data.l[0] == atoms[ATOM_WM_DELETE_WINDOW])
|
||||||
cmds[g_quit].func(0);
|
cmds[g_quit].func(0);
|
||||||
break;
|
break;
|
||||||
|
case DestroyNotify:
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
break;
|
||||||
case ConfigureNotify:
|
case ConfigureNotify:
|
||||||
if (win_configure(&win, &ev.xconfigure)) {
|
if (win_configure(&win, &ev.xconfigure)) {
|
||||||
if (mode == MODE_IMAGE) {
|
if (mode == MODE_IMAGE) {
|
||||||
|
|
Loading…
Reference in a new issue