Virtualbox keeps stealing focus when keyboard integration is enabled

Discussions related to using VirtualBox on Linux hosts.
Post Reply
philippem
Posts: 4
Joined: 18. Sep 2019, 11:21

Virtualbox keeps stealing focus when keyboard integration is enabled

Post by philippem »

Hi,
Host: Linux Mint 19.2 Tina on 64 bit machine
Guest: Windows 7 64 bit + guest additions installed
Virtual box version: 6.0.12 r133076
I face an issue with VirtualBox: the guest system keeps "stealing" the focus, even if the virtualbox window does not have the focus.

Example: start VM, run notepad in the VM. Click the "notepad" window to set focus. and type "test" => Works normally
Now, start xed on linux, click in the "xed" window to get focus, type "blahblah" => only a few letters go to xed (typically 1-2), then all following keys go to windows.
Another manifestation of the issue: if I click the linux start menu, it closes itself after ~ 1 second

When I minimize the whole VM window, the problems stop and linux now behaves normally.
When I deselect "Automatic keyboard capture" (sorry if that's not the exact caption, I use the FR version "Capture automatique du clavier") from VirtualBox => Preferences => Input, the problems stop and linux now behaves normally.
However, I don't find any of the two workarounds above satisfying: the first forces to minimize the VM to be able to use the host OS, the second prevents all hotkeys combinations (Alt+F4 etc) to work inside the VM.

Any guesses for what's wrong ?
Attachments
VBox.log.zip
(34.16 KiB) Downloaded 17 times
philippem
Posts: 4
Joined: 18. Sep 2019, 11:21

Re: Virtualbox keeps stealing focus when keyboard integration is enabled

Post by philippem »

Hi,
I have tried to run a new guest type. I downloaded a tiny core linux VDI file from virtualbox.org.
The problem is exactly the same, so the issue does not come from my win7 guest or guest additions.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Virtualbox keeps stealing focus when keyboard integration is enabled

Post by socratis »

philippem wrote:so the issue does not come from my win7 guest or guest additions
I suspect that it's a Host issue as well. First of all, your Qt version is higher than the one that VirtualBox is build with:
00:00:00.840432 Qt version: 5.13.0
Can you try to uninstall what you have and install either the 6.0.13 test build, or the 6.1.0b1 development build? Both at https://www.virtualbox.org/wiki/Testbuilds. At least that will take out of the equation the Qt libs...

BTW, I have a Mint19 host and I've never had any issues...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
philippem
Posts: 4
Joined: 18. Sep 2019, 11:21

Re: Virtualbox keeps stealing focus when keyboard integration is enabled

Post by philippem »

Hi, Just installed 6.0.13 test build (+ extension pack)
and... it works as expected ! 8)
Thanks a lot socratis !
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Virtualbox keeps stealing focus when keyboard integration is enabled

Post by socratis »

Thanks for testing it and confirming my suspicion!

I guess it's a Qt bug/issue/upgrade then. I won't mark the thread as anything, I'll leave it open and I'll simply notify the developers...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Virtualbox keeps stealing focus when keyboard integration is enabled

Post by socratis »

You got me thinking why it's working on my Mint19 and I found that the Qt version that I have is 5.9.5, not 5.13.0 as Mint19.2. And the version that the VirtualBox test/dev. builds bundle together is 5.6.1.

Also, your issue sounded really familiar, and a quick search revealed it to be so: I knew that my hunch wasn't just a hunch, but simply a lack of coffee... :)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
philippem
Posts: 4
Joined: 18. Sep 2019, 11:21

Re: Virtualbox keeps stealing focus when keyboard integration is enabled

Post by philippem »

Well done!
I promise I've used the search to find any similar issues, but probably didn't use the same keywords...
Thanks again for your help and I hope your coffee will be good ;)
Post Reply