Focus Stealing, how to stop it?

576 views
Skip to first unread message

Tai...@gmx.com

unread,
Apr 20, 2017, 10:17:47 PM4/20/17
to qubes-users
How do I stop focus stealing? I have accidentally entered ssh passwords
in to other windows as they keep stealing focus for irrelevant things.

Jean-Philippe Ouellet

unread,
Apr 21, 2017, 12:57:16 AM4/21/17
to Tai...@gmx.com, qubes-users
On Thu, Apr 20, 2017 at 10:17 PM, Tai...@gmx.com <Tai...@gmx.com> wrote:
> How do I stop focus stealing? I have accidentally entered ssh passwords in
> to other windows as they keep stealing focus for irrelevant things.

AFAIK there is no consensus on how to best solve this problem.

It has come up before in various forms:
https://github.com/pulls?utf8=%E2%9C%93&q=org%3AQubesOS+focus+stealing

Suggestions & proof-of-concept implementations would be most appreciated!

Andrew David Wong

unread,
Apr 21, 2017, 10:00:53 PM4/21/17
to Jean-Philippe Ouellet, Tai...@gmx.com, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Personally, I just set all the normal (i.e., GUI settings menu
accessible) settings in Xfce4 to their maximally anti-focus-stealing
values. Some users may find this too inconvenient, but I've gotten
used to it. I never have problems with windows stealing focus.

- --
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJY+rk7AAoJENtN07w5UDAwJVcP/Rz43Hkv7lnUUVgZmmk1teZs
JEIydfylzARjNwrZocdchA3jt49Dp9K568FWEny3XRmUlCR5WI+8wZHNrpfYrDv1
SCLX4AwOIEr5cfaP2qrgXJeZ+W+6q87cPNzyY0xqsggrxKhegM1loP0VYAjWbuBv
DKIsjqy6xCa4j5IRhO1ZhH/hmoJoBG6okGcd47+SJGc3lD7GcGeb0AawmjOgDjfE
LQNgSloj3/xBtD56HCOV2kY6JpC+BRA+oX+cpCGIs9VzzstWTovIwnYCnruQApif
v6fRqbrYRUq/ZiUjfydMkv93SgCzcXDrBXx6Nx6wk4TuNMgO8WOwfJMGf80nDemG
57uFertXcCMOy5mUYGshn9NWTb44o8dgdaRavBJF50BruwJ005fhu+tv7xWBmjW4
NwgnoSo85ZEjz207EFNt8KfNBvtgcPwFoQd12a3cDdoPuaTZrg9LJWZ5X92IwmFI
AMvgCi42fSmLwu5iMYVF8l1gTkoEZrMVaq7RVPq413RXSCbqY2xdDIe9ECPJPGDE
gT5C9dBSZV0h3aeuFyZiOq4JCtKs4b2jINy5m+LE6lWB2L4ZpV7BFtCOl7SmvP1Y
MB9rsdq2QVokeiCNRdBPgnE9xoTRJKM3vbtwtTjCpRdl8G8E8GLlRDjlSxUhlWKM
Q4gxn6vzpM3pRlBxs5lN
=jWPd
-----END PGP SIGNATURE-----

Jean-Philippe Ouellet

unread,
Apr 21, 2017, 11:18:58 PM4/21/17
to Andrew David Wong, Tai...@gmx.com, qubes-users
On Fri, Apr 21, 2017 at 10:00 PM, Andrew David Wong <a...@qubes-os.org> wrote:
> On 2017-04-20 21:56, Jean-Philippe Ouellet wrote:
>> On Thu, Apr 20, 2017 at 10:17 PM, Tai...@gmx.com <Tai...@gmx.com>
>> wrote:
>>> How do I stop focus stealing? I have accidentally entered ssh
>>> passwords in to other windows as they keep stealing focus for
>>> irrelevant things.
>>
>> AFAIK there is no consensus on how to best solve this problem.
>>
>> It has come up before in various forms:
>> https://github.com/pulls?utf8=%E2%9C%93&q=org%3AQubesOS+focus+stealing
>>
>> Suggestions & proof-of-concept implementations would be most
>> appreciated!
>>
>
> Personally, I just set all the normal (i.e., GUI settings menu
> accessible) settings in Xfce4 to their maximally anti-focus-stealing
> values. Some users may find this too inconvenient, but I've gotten
> used to it. I never have problems with windows stealing focus.

What does this mean? What specifically do you change?

Just disable "Automatically give focus to newly created windows"?
Something else?

Andrew David Wong

unread,
Apr 21, 2017, 11:42:27 PM4/21/17
to Jean-Philippe Ouellet, Tai...@gmx.com, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Just go into the Xfce settings menu in dom0 and systematically look at
every option. (Pretty sure they're all in "Window Manager" and "Window
Manager Tweaks.") If it sounds like it would affect focus stealing, try
setting it to whichever value sounds like the value you'd want, then
test the result. I don't remember all the values I changed, since it was
a long time ago, but there aren't that many. Should take less than 10
minutes.

- --
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJY+tERAAoJENtN07w5UDAwIF8QAMJrNimdfUit9tIM1Aj+yb/Y
RDQWfiAADmgrneSD6q3VCtIHvnsaLh8wMsbd1+Cz3bPy4M9Clv+3NP6di1RMWnWL
jY0xfKBEjOVsDi7BGWKl2OkpeZ8+XxNhNzrxSMM8Ava+Id3W1dkj2MsQ+8WafBIT
0CBeCUW2r/TAtBVd188Ae8VcVAwhKeskSgueEBsx1XD5c5GvS3o3eAKw6Dt/Of6G
pp2L5FRd6Np6JrSf/RKla7w0dHpXuuZlSTgBQvEo0gMRAvd5PzajtIcX5osJvouR
DCnVM43is7rMbM7OfbeKkxsDvP52gIfkHEfqiU20LKtaQkmadGUQPu6OUr3Dlnp1
YLiHXLubXnAXLfXUDz5uqMNMKk+gq/FqkSjE36K/sHgjqMdmOIcZnX6xlaMHaLSI
P7ZYvELyNscQ5+RWat2cWetZkAJMSRqKGB6n1j9DLb+mTtjcXj2x1LAXp3fR9qmI
+uvrceiIryioAaFH3LaKqDKv+VhWicT/YqasKKPNZAf/WJq76TZWx3fkYva54c5e
1Xe59UVqCW/wbMqUA39uD3VzkESA/SpvuxVJYAGdi5cGYubuke+viMM2es5YhOJq
GT5U2Jg9S5XPGPbZV19VANylWle7k5Fuh6SdsKY00FLVOrKpUTbdeEhv2Ywpyw1S
Geno118ium+6bYax8zZp
=7t0g
-----END PGP SIGNATURE-----

David Hobach

unread,
Apr 22, 2017, 4:49:11 AM4/22/17
to Andrew David Wong, Jean-Philippe Ouellet, Tai...@gmx.com, qubes-users
Yes that can help.

It heavily depends on your window manager though.

In particular the topic of "focus stealing" is a heavily subjective one:
You actually want to change focus at some point, don't you? So what's a
correct and what's an incorrect focus change?
VMs in Qubes cannot steal the focus themselves from another VM (except
for maybe requesting that from your Window Manager in dom0 - I guess
it's at least implemented that way), but your Window Manager may be
configured in a way that does not reflect your idea of "correct focus
change"...

For example for me I defined the only correct focus changes to be:
- Mouse move & click
- workspace changes
- pre-defined key combinations
(and drop everything else)

Awesome should allow to enforce these rules (the default Qubes config
allows more btw), I don't know about xfce.

Chris Laprise

unread,
Apr 22, 2017, 10:06:08 AM4/22/17
to Andrew David Wong, Jean-Philippe Ouellet, Tai...@gmx.com, qubes-users
KDE has a settings tab under 'Window behavior' devoted to activation and
focus, along with a specific focus-stealing prevention setting.

--

Chris Laprise, tas...@openmailbox.org
https://twitter.com/ttaskett
PGP: BEE2 20C5 356E 764A 73EB 4AB3 1DC4 D106 F07F 1886
Reply all
Reply to author
Forward
0 new messages