2

What's the difference between xdotool getwindowfocus windowclose and the command executed by Alt+F4?

Firefox complains when being closed by the former method but doesn't complain when using Alt+F4, so there must be a difference but I can't seem to understand it.

5
  • The answers there are a bit too complex and seem address something different unfortunately.
    – dsSTORM
    Feb 15, 2019 at 10:42
  • The answers explain if you want you can simply send ALT+F4 to the program using xdotool instead. Feb 15, 2019 at 10:51
  • hmm, "xdotool key alt+f4 --window getwindowfocus" would be the command yes? But it doesn't work with a keyboard shortcut for some reason. I've now seen that "xdotool getwindowfocus windowkill" works as alt+f4 though, so I'll probably stick to that.
    – dsSTORM
    Feb 15, 2019 at 11:02
  • Not true, the correct command is apparently "wmctrl -c :ACTIVE:"
    – dsSTORM
    Feb 15, 2019 at 12:00

0

You must log in to answer this question.

Browse other questions tagged .