Window focus working incorrectly (KDE R2)

77 views
Skip to first unread message

fowl...@gmail.com

unread,
Dec 9, 2014, 1:49:43 PM12/9/14
to qubes...@googlegroups.com
I have GNOME terminal and Emacs client, in the same AppVM (not that this should matter), running side by side. I will switch windows with alt+tab from Emacs to the terminal (though the problem persists with clicking to change focus as well) and the title bar of the terminal will clearly gain focus. However, anything I type will still be sent to Emacs. I often have to minimize Emacs or highlight part of GNOME terminal for it to actually accept my input.

I have run qubes-dom0-update, but the problem persists.

I tried to submit this as a ticket, but qubes-os.org insists there is some CAPTCHA that I cannot see even w/o my browser add-ons enabled.

J.M. Porup

unread,
Dec 9, 2014, 2:53:56 PM12/9/14
to qubes...@googlegroups.com
I confirm this. Switching between any two windows (same VM or different
VM) often causes this problem.

Jens

Zrubi

unread,
Dec 9, 2014, 2:59:09 PM12/9/14
to qubes...@googlegroups.com
On 12/09/14 20:53, J.M. Porup wrote:
> I confirm this. Switching between any two windows (same VM or different
> VM) often causes this problem.

Same problem here.

I usually getting this on some 'active' web pages only. and seems they
don't release the cursor if I just switch virtual desktop. If this
happens I have to switch back, click inside the page, then switch again
(usually to a gnome terminal) and finally get the cursor focus as well.

Also noticed that this is only affecting the keyboard input because the
mouse scroll seem to work even if I get this issue.


--
Zrubi

signature.asc

cprise

unread,
Dec 9, 2014, 6:31:14 PM12/9/14
to Zrubi, qubes...@googlegroups.com
Going between Tbird and gnome-terminal (same VM) I can see the problem
most clearly because terminal's cursor will remain an empty box after
the window frame is activated without gaining keyboard focus (terminal's
cursor changes to solid when it gets focus). It happens sometimes,
especially if I've just clicked into the preview pane in Tbird when
Tbird already had focus. It doesn't occur when switching between a Tbird
write window and terminal.

Hakisho Nukama

unread,
Dec 9, 2014, 7:16:19 PM12/9/14
to cprise, Zrubi, qubes...@googlegroups.com
I think this is also related.
If I click on an address in Thunderbird it is not responsive to clicks,
after I opened my browser I was able to switch back and navigate in Thunderbird.

Oh, it disappear, but I installed torbirdy today.


Best Regards,
Hakisho Nukama

fowl...@gmail.com

unread,
Dec 9, 2014, 8:31:19 PM12/9/14
to qubes...@googlegroups.com, fowl...@gmail.com
> I tried to submit this as a ticket, but qubes-os.org insists there is some CAPTCHA that I cannot see even w/o my browser add-ons enabled.

Nevermind, just submitted a bug report.

fowl...@gmail.com

unread,
Dec 9, 2014, 8:34:07 PM12/9/14
to qubes...@googlegroups.com, cpr...@gmail.com, ma...@zrubi.hu
> Oh, it disappear, but I installed torbirdy today.

Just a reminder: set TorBirdy to transparent torification if the AppVM you're running it in is connected to a TorVM :-)

Vít Šesták

unread,
May 21, 2015, 3:40:55 AM5/21/15
to qubes...@googlegroups.com, fowl...@gmail.com
Is there any way to offer a patch reward (like BountySource.com)? As the core developers don't see the issue frequently, I understand this have low priority for them. This bugfix is something I would really appreciate, but I don't know where to search in.

Offering a financial reward could encourage someone (either someone external or a core developer, I don't care) to fix the issue, especially with multiple backers, as this bug affect multiple people.

Regards,
Vít Šesták 'v6ak'

Vít Šesták

unread,
May 22, 2015, 8:46:46 AM5/22/15
to qubes...@googlegroups.com, fowl...@gmail.com
It seems to occur only when switching windows by Alt+Tab or Alt+backtick (i.e. "`"), but not by clicking to titlebars. What is substantially different between switching by keyboard and switching by clicking titlebars?

This is probably also a reason why I get this issue so often. I switch windows by Alt+Tab almost exclusively.

There is also some asymmetry: When I switch from Iceweasel to XFCE Terminal, the focus is often left in Iceweasel. But it is not true in the opposite direction…

I tried to write a wokaround that polls every 100ms and on window focus/activity change, it focuses Plasma desktop for an unnoticeably short time and then back the original window. (See https://gist.github.com/v6ak/9a38c5d643d17a53e799 .) It behaves strangely: Switching from one window to another (tested again on Iceweasel <–> XFCE Terminal) gives the new window a focus for some short time, but it is taken back by the old window after, say, 0.5 seconds. I don't know what the hell it is, but it suggests some race condition in the protocol.

Regards,
Vít Šesták 'v6ak'

Marek Marczykowski-Górecki

unread,
May 22, 2015, 9:01:34 AM5/22/15
to Vít Šesták, qubes...@googlegroups.com, fowl...@gmail.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, May 22, 2015 at 05:46:46AM -0700, Vít Šesták wrote:
> It seems to occur only when switching windows by Alt+Tab or Alt+backtick
> (i.e. "`"), but not by clicking to titlebars. What is substantially
> different between switching by keyboard and switching by clicking titlebars?
>
> This is probably also a reason why I get this issue so often. I switch
> windows by Alt+Tab almost exclusively.
>
> There is also some asymmetry: When I switch from Iceweasel to XFCE
> Terminal, the focus is often left in Iceweasel. But it is not true in the
> opposite direction…

I think I've found the problem:
https://github.com/marmarek/qubes-gui-daemon/commit/0a9dace589d3a00f58690fbe7d1173260b678f4f

I've just uploaded qubes-gui-dom0-3.0.4 to current-testing repository.
You need to restart VM(s) after the update.
Can you confirm (or deny) that it fixes the problem?

> I tried to write a wokaround that polls every 100ms and on window
> focus/activity change, it focuses Plasma desktop for an unnoticeably short
> time and then back the original window. (See
> https://gist.github.com/v6ak/9a38c5d643d17a53e799 .) It behaves strangely:
> Switching from one window to another (tested again on Iceweasel <–> XFCE
> Terminal) gives the new window a focus for some short time, but it is taken
> back by the old window after, say, 0.5 seconds. I don't know what the hell
> it is, but it suggests some race condition in the protocol.

Something like this. More precisely - application can be told to take
the focus (in the VM) itself, and it can do it with arbitrary delay.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJVXyimAAoJENuP0xzK19csGsIIAIanyB3lzTK3QFLKItxDb0C2
kJynoKppSDfUtDOOlo9p3wpRw46fg2l0JDUGFUptlYtbGzbxIP7oY+gn4I6NLh2J
vXrur9CiuRtirEl0i+JgRpesYBPEkfcYs4bYQpmxMzlr0/LX0RLa0y2mW/OCw2dl
iIxDkZz/3z/oORB5GfW0rcGDfbI1FpAWEYAr3atl4ngrV3v+CECI6ILbkTLmdUvF
fSzYBFGluV02f1BzbgRy9HbzhAGnFIjgtg8VEH89ZZj556Wj2k9JK6VXHDkSO1F5
Hi6SRkQs0vpXxvi3ufpTtJYN8QlYWbWv45xg7BP//Qcm3hdO8RghDzV+juwJjMQ=
=OG0o
-----END PGP SIGNATURE-----

Vít Šesták

unread,
May 22, 2015, 10:56:29 AM5/22/15
to qubes...@googlegroups.com, fowl...@gmail.com, groups-no-private-mail--con...@v6ak.com
Thank you,

I've updated it using the following commands:
sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing qubes-gui-dom0 && rm /var/lib/qubes/updates/rpm/* /var/lib/qubes/updates/repodata/*

This was the way it did not force me more updates than just qubes-gui-dom0.

After short trying, I can't reproduce the bug anymore, so it seems to be fixed.

Regards,
Vít Šesták 'v6ak'

Marek Marczykowski-Górecki

unread,
May 22, 2015, 11:06:18 AM5/22/15
to Vít Šesták, qubes...@googlegroups.com, fowl...@gmail.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, May 22, 2015 at 07:56:29AM -0700, Vít Šesták wrote:
> Thank you,
>
> I've updated it using the following commands:
> sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing
> qubes-gui-dom0 && rm /var/lib/qubes/updates/rpm/*
> /var/lib/qubes/updates/repodata/*

Actually "sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing
qubes-gui-dom0" should be enough. Did it tries to update other packages
as well?

> This was the way it did not force me more updates than just qubes-gui-dom0.
>
> After short trying, I can't reproduce the bug anymore, so it seems to be
> fixed.

:)

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJVX0XjAAoJENuP0xzK19csmd8H/0Fc/aZj+PAAJPqfhjymmAOl
2EwUSAMwZmyxLDIfM1GVYTppZaw+nJfxQtKX6MHU7UPc8QmWRxSwehxBs+pMJ3U9
+LFGkWoVv8kojjBx6wAKlGVteiV6rH1o+lK1uiOTApDSmEYWnKZSvpB8L/pQdZ9X
X+WmJYwToz11CSr4SfmWyICE8SWmpmSM+65cSrjMwggtUzgK5S23gt30IuLyaIDy
LWLBnPqt7ze+5XSiVYdb5B2nWrhN1HnwegaJwGH8wyG01agAqC2kBoCyQMRAtFXf
r8rcHj+qn2Ng1mBrjnaBFodQNw09r9jT6YTEgZCv5x5Gt0108sP1RDtIcOHHxSA=
=2gG1
-----END PGP SIGNATURE-----

Vít Šesták

unread,
May 22, 2015, 11:17:58 AM5/22/15
to qubes...@googlegroups.com, fowl...@gmail.com, groups-no-private-mail--con...@v6ak.com
It did not immediatelly. But after subsequent sudo qubes-dom0-update, it wanted to download other testing tools.

To be more precise, this is what I did:
0. Called sudo qubes-dom0-update and updates few unrelated packages.
1. Trying to guess/Google the correct name for the repository.
2. Just called sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing # without any package name
3. Trying to get rid of the testing updates rm /var/lib/qubes/updates/rpm/* did not help
4. The following command solved the issue: rm /var/lib/qubes/updates/repodata/*
5. I installed the update using sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing qubes-gui-dom0
6. I called sudo qubes-dom0-update which wanted to update xen and some other packages apparently from testing.
7. I called both the rm commands again, i.e. rm /var/lib/qubes/updates/rpm/* /var/lib/qubes/updates/repodata/*
8. I called sudo qubes-dom0-update, which told me my system is up to date.

I hope everything important is described there. Calling sudo qubes-dom0-update --enablerepo=some-nonexistent-repo is hopefully not important.

I am not sure if something was messed by this procedure or if the issue with updares is reproducible just by calling sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing qubes-gui-dom0.

Reagrds,
Vít Šesták 'v6ak'

Marek Marczykowski-Górecki

unread,
May 22, 2015, 12:03:38 PM5/22/15
to Vít Šesták, qubes...@googlegroups.com, fowl...@gmail.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, May 22, 2015 at 08:17:57AM -0700, Vít Šesták wrote:
> It did not immediatelly. But after subsequent sudo qubes-dom0-update, it
> wanted to download other testing tools.
>
> To be more precise, this is what I did:
> 0. Called sudo qubes-dom0-update and updates few unrelated packages.
> 1. Trying to guess/Google the correct name for the repository.

Repository definitions are in /etc/yum.repos.d.

> 2. Just called sudo qubes-dom0-update
> --enablerepo=qubes-dom0-current-testing # without any package name

Ah, I see - above command downloaded all the updates from testing. Those
packages were cached in your "update VM". To clean them, you can add
- --clean to the next qubes-dom0-update call.
iQEcBAEBAgAGBQJVX1NQAAoJENuP0xzK19cshAgH/RrS8h9Mi2zR6m6q6JxzfEhb
DZla88uA6VDqaXgtl0CJ80oj5ZakhxjdHXbiIO7EShwqyK7/eYjKDJMm4mdcr033
ZzAGNssVjUZjKedqn+3TjnsYwhKvfgGBrxEJp5eFhcJ1m8sxWegzXvXXTB1pUs7L
26r6AG4A2m9+aT8kUUUfRLzvqZP9aSFlyIRq22i2ja3G1y6LT980l0tIpACN+909
pAb/hONFrFtSnMMb5XuQ9t+na2lBdRFF7Sjhm5q5AaLfYQTFhWVFoOH/+IaQVFBH
psIBEF69BQpMhm8pqZG1StKxTQaBFGhBE8zL8vc4D2RwV5K0W/LO2oFDh6qEUTI=
=AiNO
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages