> I would not want a popup in response to a swipe gesture to make a window
> go away.
But that is exactly what some applications might decide to do when
receiving a "SIGTERM".
The only difference between directly sending a SIGTERM and using
the WM_DELETE_WINDOW event is that you are using a different
callback (one that is more likely to have been registered by the
underlying toolkit the application is linked against) *and* that you
don't have to figure out the process ID (from the several that the
Right but the *are* different callbacks. And while I don't know what
the cool kids do these days, I would think I'd have treated them
differently "back in the day" - you get a sigterm, you don't nag the
user.
But, I'm sure you're right. So yeah, Miles' solution sounds best.
application might have created, such as in the case of Firefox).
On Sun, Feb 28, 2021, Miles Alan Wrote:
> We could do:
> - 3 taps vol down force kill
> - 4 taps vol down (or hold) for graceful kill
>
> And:
> - 2 finger swipe down graceful kill
> - 3 finger swipe down forceful kill
I also agree that this would be the perfect solution :)
---
It turns out "xdotool killwindow" simply calls "XKillClient()", as you can see
on xdotool's repo ("https://github1s.com/jordansissel/xdotool") here:
"cmd_windowkill.c:40" --> "xdo.c:1845".
This doesn't give the application inside the window any chance to do anything
which, in the case of Firefox, causes the "restore session" message to pop-up
the next time it runs (but, for some reason, not always).
I found out that using "xdotool key shift+alt+c" also closes the window while
giving the application an opportunity to gracefully shut down (this happens
because wdm sends the WM_DELETE_WINDOW message before killing the X window).
The two finger swipe should close windows in a graceful way in my
opinion and this patch looks good to me. I will wait till ~proycon
weighs in though to see if I am missing a use case.
WARNING: While this new command is "nicer", it also does *not* immediately close
the window (ex: in the case of Firefox, a confirmation popup appears first).
This might *not* be what the "two fingers gesture" is meant to do. If so, feel
free to ignore this patch :)
sxmo-utils/patches/.build.yml: SUCCESS in 21s
[Close windows in a more "graceful" way.][0] from [Fernando Ramos][1]
[0]: https://lists.sr.ht/~mil/sxmo-devel/patches/20662
[1]: mailto:greenfoo@u92.eu
✓ #442794 SUCCESS sxmo-utils/patches/.build.yml https://builds.sr.ht/~mil/job/442794