VirtualBox

Ticket #6769 (reopened defect)

Opened 4 years ago

Last modified 3 years ago

Alt-Tab doesn't work within guest while in fullscreen mode

Reported by: pavel Owned by:
Priority: major Component: other
Version: VirtualBox 3.2.0 Keywords: desktop, keyboard
Cc: Guest type: Windows
Host type: Linux

Description

That is, it brings me out of VBox window at the host Gnome desktop (as if I'd restored keyboard before that with Host key)

Though it works in-guest while machine is in windowed mode.

This started to happen after upgrade from 3.1.8.

Change History

comment:1 Changed 4 years ago by pavel

host is x86_64, VBox is installed from .run package.

comment:2 Changed 4 years ago by uchima

Seeing the exact same thing here. Ubuntu 8.04 x86_64 host, Ubuntu 10.04 x86_64 guest. Using the 3.2.0 .deb file from the VirtualBox downloads page.

comment:3 Changed 4 years ago by pavel

Well, if it matters, I've got VT-x-less host CPU, running 32-bit guest Windows XP.

comment:4 Changed 4 years ago by poetzsch

Please try VBox 3.2.2.

comment:5 Changed 4 years ago by pavel

Thanks for reply.

With 3.2.2 behaviour is slightly different.

  1. After starting machine in fullscreen mode I do Alt-TAB successfully in-guest, once.
  1. Next stroke of Alt-TAB works outside VBox (so, I go to, say, main VBox manager window).
  1. Then Alt-TAB works in Gnome, so I jump back into fullscreened machine.
  1. Then Alt-TAB works in-guest, once.
  1. Next stroke of Alt-TAB brings me outside VBox. Go to 3.

comment:6 Changed 4 years ago by pavel

Well, 3.2.2 seems to behave as described above in fullscreen and windowed modes both.

comment:7 Changed 4 years ago by Dsen

Could you please check which the window-manager are you using - metacity or compiz? If you are under GNOME then one of them could be used depending on few arguments.
At least:

  1. Default GNOME window manager is 'metacity'.
  2. But if compiz is installed and desktop environment animation is enabled then compiz is default (like in Ubuntu by default for example).

You can also just check for particular 'metacity' or 'compiz' process in process-list. Thanks in advance!

comment:8 Changed 4 years ago by pavel

I have Debian Lenny, default Gnome desktop, which is metacity 2.28.0, which is reportedly active. I seem to have compiz installed, but no effects are enabled and no similar process is run.

comment:9 Changed 4 years ago by pavel

Also, I notice in 3.2.2 and remember from 3.2.0 or even 3.1.8 floating effect of 'sticking' ALT key. That is, sometimes hitting X inside guest I could get Alt-X, etc.

comment:10 Changed 4 years ago by Dsen

It seems I'm able to reproduce something about Alt-TAB but with one more little aspect:

  1. If mouse cursor is over VM-view (view where the guest os is displayed) when guest gets Alt-TAB,
  2. Else if mouse cursor is NOT over VM-view (for example, its over the desktop) when host gets Alt-TAB.

Could you please test if you have the same behavior?

comment:11 Changed 4 years ago by pavel

Happy to hear of a reproducible bug.

I can confirm the following:

  1. if mouse cursor is over VM-view, then Alt-TAB is flapping between host and guest as I've described.
  1. If mouse cursor is outside VM-view (outside its window), then only host gets Alt-TAB.

Hope this helps.

comment:12 Changed 4 years ago by uchima

Keyboard capture behavior is very confusing now in 3.2.2.

As pavel notes, the behavior is different depending on whether the mouse is over the guest desktop or not (note that I am using a dual-monitor setup where the VM is full-screen on one of the monitors).

If the mouse is over the guest desktop, then the focus cycles back and forth between windows in the guest and windows in the host. Note that it is not necessary to actually click in the guest to trigger this, just hovering the mouse anywhere over the guest's desktop is apparently sufficient.

If the mouse is not over the guest, focus merely toggles back and forth between a window on the host desktop, and the guest desktop (but not any particular window in the guest).

I have also noticed another odd behavior, which seems to be new in 3.2.2: Now, to get the guest to release the keyboard focus, I need to tap the Host key twice instead of once.

comment:13 Changed 4 years ago by pavel

Yes, sometimes 3.2.2 needs multiple strokes of Host key, annoyingly. Need to try window managers other than metacity.

This bug could relate to #6727.

comment:14 Changed 4 years ago by crimsonflame123

I filed bug6727 I'm unable to reproduce this bug. Everything works fine now except one of the problems mentioned above - that of tapping the host key twice at times.

comment:15 follow-up: ↓ 22 Changed 4 years ago by crimsonflame123

Sorry, I didnt check for windowed mode. Yes, in windowed mode, 'Alt + Tab" inside guest works only when the mouse hovers over the guest window. Regression.

comment:16 Changed 4 years ago by pavel

I would clear that in my case, if cursor is over VM-window or it is in fullscreen, not every Alt-TAB (I've tired also ALT-F4) goes to guest, but only first one. After that moment ordinary keystrokes still go to guest, but mentioned combinations go to metacity.

comment:17 Changed 4 years ago by idlecoder

More or less same problem here... Host: gentoo 64, virtualbox-bin 3.2.2 Guest : Windows XP 32 PRO, virtualbox guest additions 3.2.2 I tried to use several different "host key" (other than right-ctrl) but first time my guest receives a keystroke, it's like the "host key" was activated... So, every combo I use in my host are not available in my guest (ex: alt-tab)... Very very annoying... hope it will be fixed quickly.

comment:18 Changed 4 years ago by uchima

After using 3.2.x a bit more, I'm wondering whether the issue is that certain keyboard behaviors which were intended for Seamless mode are also affecting Fullscreen mode?

comment:19 follow-up: ↓ 20 Changed 4 years ago by sitwon

I am seeing the same behavior with VirtualBox 3.2.2 on Slackware 13.1 with Fluxbox. This seems new since 3.1.8 which worked as expected.

Tested with a Windows XP VM with the latest guest additions installed. VT-x is enabled. I also saw this behavior with an OpenBSD VM with no guest additions so I don't think it's related to the guest OS at all.

In fullscreen mode: alt-tab alternates between being captured and not being captured. In windowed mode: If the mouse is within the VM window, tapping left-alt disables keyboard capture, but tapping it again does not restore it and alt-tab again seems to alternate. If the mouse is NOT within the VM window then alt-tab is never captured and never switches the guest's windows.

comment:20 in reply to: ↑ 19 Changed 4 years ago by Heros

Similar problem with VirtualBox 3.2.4 (and 3.2.2), Linux Host (KDE) and XP guest:

Every key release(!) releases the keyboard capture. The host key (right strg) works fine, I can enable and disable the capture. But the the release of any other key disables the capture. Very annoying...!

comment:21 Changed 4 years ago by sitwon

Yikes, I didn't notice before but it is every key, not just the left-alt key.

comment:22 in reply to: ↑ 15 Changed 4 years ago by pavel

Replying to crimsonflame123:

Sorry, I didnt check for windowed mode. Yes, in windowed mode, 'Alt + Tab" inside guest works only when the mouse hovers over the guest window. Regression.

Thanks! But, if in your case guest gets every Alt+TAB, then you seem to have this bug absent! What is your environment?..

comment:23 Changed 4 years ago by frank

Please test VBox 3.2.4. Make sure to download the latest packages with the build number 3.2.4-62467. The packages with the build number 62431 had an EFI problem and didn't contain a fix for the Alt-TAB issue.

comment:24 Changed 4 years ago by uchima

It works some of the time now, but not always. When it doesn't work, I can get it to start working by hitting the Host key twice, after clicking the mouse on the guest's display.

comment:25 Changed 4 years ago by sitwon

I just installed the 3.2.4-62467 and the situation has improved.

In Windowed mode alt-tab and the host key behave exactly as expected.

In fullscreen mode:

  1. first alt-tab is captured correctly.
  2. second alt-tab is captured correctly.
  3. pressing host-key, alt-tab switches to a host window correctly.
  4. alt-tab switches back to VM.
  5. the next alt-tab switches back to the host window instead of being captured by the VM.

after alt-tabbing back to the VM, you need to press host-key twice to get it to capture alt-tabs again.

comment:26 Changed 4 years ago by Dsen

As sitwon described, in normal (windowed) mode all should work as expected. In frame-less modes, like fullscreen/seamless, there is still present another little bug: metacity frame-less window isn't re-captured when just pressing alt-tab, but its correctly re-captured when you, for example, press host key twice or just select window from task-bar. I'll take a look at this bug nearest time, thanks for testing it and notifying me!

comment:27 follow-up: ↓ 29 Changed 4 years ago by pavel

At first glance, 3.2.4-62467 works for me (with metacity), thank you!

Though, there was a moment, when Alt-TABs stopped to go to guest in fullscreened VBox, and this restored after several random switchings back and forth.

comment:28 Changed 4 years ago by dimitris

VB 3.2.4 build 62467 on Ubuntu Lucid host, Windows XP guest in seamless mode.

With metacity: I'm having the same problem as Dsen described above.

With compiz: This problem disappears. However, due to a  compiz bug I very much prefer metacity for the time being.

comment:29 in reply to: ↑ 27 Changed 4 years ago by pavel

Replying to pavel:

At first glance, 3.2.4-62467 works for me (with metacity),

At second, doesn't entirely. After some time (or always?) after switching back to fullscreened machine Alt-TABs aren't captured by guest at all. I've managed to restore the capture by issuing ALT-F4, which go to metacity, which tries to close VBox, which offers me to shutdown machine, and after declining I'm back to guest with capture working. Another switching host windows forth and back to VBox disables it again.

Hope this pile of excessive details will help.

Thanks!

comment:30 follow-up: ↓ 31 Changed 4 years ago by frank

Please check if VBox 3.2.6 Beta 2 fixes this problem for you.

comment:31 in reply to: ↑ 30 ; follow-up: ↓ 32 Changed 4 years ago by pavel

Replying to frank:

Please check if VBox 3.2.6 Beta 2 fixes this problem for you.

Seems to fix it, thanks!

Though, host-guest clipboard is defunct in my case, although set to 'bidirectional', I'm not sure yet as to whether to file this as a separate bug.

comment:32 in reply to: ↑ 31 Changed 4 years ago by pavel

Replying to pavel:

Though, host-guest clipboard is defunct in my case, although set to 'bidirectional', I'm not sure yet as to whether to file this as a separate bug.

Actually, I remember it breaking about 3.2.0 or 3.2.2.

comment:33 Changed 4 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

So I will close this ticket. Clipboard is another story.

comment:34 Changed 3 years ago by dsjstc

  • Status changed from closed to reopened
  • Resolution fixed deleted

Possible regression?

I have observed similar behaviour with 3.2.8_ose Ubuntu Lucid AMD64, as well as 3.2.10(sun) under Ubuntu Maverick AMD64. Occurs with both metacity and compiz.

In my case, left-alt appears to be acting as a second host key some of the time. E.g, with keyboard captured, <alt>-F4 attempts to close the VM window.

comment:35 follow-up: ↓ 36 Changed 3 years ago by dsjstc

NB: While the VM is in this state, the guest sees the ALT key as in a keydown state. Pressing TAB at this point sends an ALT-TAB to the guest.

Tapping the ALT key releases the state in the guest, but does not correct the problem.

comment:36 in reply to: ↑ 35 Changed 3 years ago by Rambetter

I'm using virtualbox-ose Debian package on Debian Squeeze Beta 1 amd64. 3.2.10-dfsg-1 is the version number.

I too am experiencing not being able to Alt+Tab between windows in the guest operating system when in fullscreen mode in certain cases. Actually, when I first enter fullscreen mode it does work. So for example:

  1. Enter fullscreen mode in guest OS.
  1. Check the box under "Machine" -> "Disable Mouse Integration".
  1. Alt+Tab works now in my guest OS.
  1. Hit the Host key (in my case left Windows key) and Ctrl+Alt+left-arrow over to a different desktop on host os.
  1. Ctrl+Alt+right-arrow over to guest OS (which is currently in fullscreen mode).
  1. Click on the desktop in the guest OS to start registering input (otherwise the input is still going to host OS.
  1. OK, now I'm in the guest OS again. Alt+Tab does not work. Verified that behavior is still as if "Disable Mouse Integration" were checked.
  1. As a workaround, Hit Host+f to exit fullscreen, then hit Host+f to enter fullscreen again.
  1. Click on the guest OS desktop to start sending it events.
  1. Now I can Alt+Tab between windows in the guest OS.

So the workaround is to exit fullscreen and to enter it again. Kind of annoying.

Host OS: Debain Squeeze Beta 1 amd64 Guest OS: Ubuntu 10.04.1 amd64, _all_ compiz-related packages completely removed from system

Problem seems to be related to "Disable Mouse Integration" being checked.

comment:37 Changed 3 years ago by dsjstc

I have observed this behaviour without ever using the "disable mouse integration" option.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use