-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi,
Am 12.09.2016 um 20:45 schrieb martin f. krafft: > also sprach Uli Schlachter <psyc...@znc.in> [2016-09-12 17:25 +0200]: Heh, ich mag die Art von Zitat. :-) >>> If I have Firefox (v45) and a terminal on the same tag, and I run >>> "firefox http://debian.org" in the terminal, Debian's website opens in >>> a new tab in Firefox (good!), *and* focus is shifted to that window >>> (bad!). >> [...] >>> How can I find out what causes the focus shift? >> >> Sounds like awesome sends a _NET_ACTIVE_WINDOW request. > > I don't really know enough about X or whatever to make sense of that, but > ok. Whoops, I meant "firefox sends...". Basically, firefox says "dear window manager, please give me the input focus". >>> What can be done to prevent this behaviour? >> >> Write your own handler for such requests. The following (untested) code >> *might* help: > > It worked out of the box for the main window! \o/ THANK YOU SO MUCH! > > Now the next task will be to make its dialogs not disturb me. These also > go through ewmh.activate with context == "autofocus.check_focus" and that > makes me think there's a better way to disable the autofocus… so much to > learn… Autofocus is awful.autofocus aka /usr/share/awesome/lib/awful/autofocus.lua. It's quite a short file. The idea of that code is "if nothing has the input focus (or the currently focused window is not visible), then give the focus to the window that last had the focus". So the dialogs already had the focus previously, but then 'something' happened. At least I'm pretty sure that awful.autofocus is not where this issue actually occurs. Quick test would be to "mkdir ~/.config/awesome/awful && touch ~/.config/awesome/awful/autofocus.lua" to force-disable autofocus. Sorry that I don't have a better idea for this right now. Cheers, Uli - -- “Some people are worth melting for.” - Olaf -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJX1wbgAAoJECLkKOvLj8sG5CYH/3TxqMtyO4GWuHOnbY+EW0LK 3sGRWZa+C+kLz0tfZv4ksbV+YoLTQ1TWY1BhJx1cirJzboXbyLoqz5z2rslQGCPE xtYGnkJ1i9+cIXFPw/6dWzm3Crb5NXb+hHgf47rTrJlfkbz+ERvrPsMp7GJ/LjTk qUEPx4ViWu1fn4v9clIYU3/ynIrsMH/re0A34mgLmKXXmuK7MqEJ5DBF+jBwLEVT +uN/kDsS3wogOQuaxROGX5J2H3nQhuWw72X8XgeUdcQtPEEaSqh07XrA747SDxRn txJzhshFUSiQFQavxED2RnTSh2/Xc98bN58MDMtlLnwXp7/aIn5cXgJ6s89D8Hc= =wkdO -----END PGP SIGNATURE----- -- To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.