Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 308795

Summary: x11-base/xorg-server-1.7.5.901: Alt+Tab from rxvt-unicode broken
Product: Gentoo Linux Reporter: Martin von Gagern <Martin.vGagern>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED FIXED    
Severity: normal CC: frank, step247
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 296514    
Bug Blocks:    

Description Martin von Gagern 2010-03-10 08:17:37 UTC
I'm using KDE 3.5 (from kde-sunset) and x11-terms/rxvt-unicode-9.07-r1. I start urxvtd at session startup, and use urxvtc to display my terminal windows. I also have a KDE window specific setting making those terminal windows borderless.

After upgrading to x11-base/xorg-server-1.7.5.901, pressing Alt+Tab in such a terminal window wouldn't switch application as expected. Instead, the terminal window would remain focused, and the next key or mouse press would simply be ignored. After that ignored event, everything worked normal again until the next press of Alt+Tab. Using the mouse to change the focused window worked as expected, as did switching desktops. Downgrading to xorg-server-1.7.5 solved the problem.
Comment 1 Martin von Gagern 2010-03-10 09:41:24 UTC
I just upgraded to 1.7.5.901 again, to perform additional tests. Borderless window seems to have nothing to do with it, and neither has the fact that I'm running a server/client setup using urxvtd/urxvtc instead of a simple urxvt.
Comment 2 Martin von Gagern 2010-03-10 09:49:53 UTC
The issue seems to be specific to (unsupported) KDE 3.5. I can't even reproduce it with KDE 4.4. So I fear you'll mark this report as WONTFIX. :-(
Comment 3 Frank Ridderbusch 2010-03-10 09:52:51 UTC
I think I saw this bugs as well however with the GMPC (Gnome Music Player Client), with custom keys (play, stop next, etc) which stopped working once the program had focus. However I kept xorg-server 1.7.5.901 not long enough to experience the same problem with Alt-TAB.

To extend a little bit, I'm using a Sun Type 6 USB keyboard. Within GMPC I've mapped the Help-key to show/hide the GMPC window and the Cancel-key to pause/unpause the player. With xorg-server 1.7.5.901, once the GMPC window has the focus, the Help and Cancel keys stop working. When another application has the focus, the two keys work again. This peculiar behaviour was gone, once I downgraded to xorg-server 1.7.5. I'm saw the same pattern at home with a more standard keyboard with the multimedia keys.
Comment 4 Frank Ridderbusch 2010-03-10 09:54:01 UTC
Oh, I forgot to mention, that I'm using XFCE 4.6.1.
Comment 5 Doktor Notor 2010-03-10 10:03:25 UTC
Can't reproduce this w/ urxvt.

[ebuild   R   ] x11-base/xorg-server-1.7.5.901  USE="-debug -dmx hal ipv6 -kdrive -minimal nptl sdl -tslib xorg" 0 kB
[ebuild   R   ] x11-terms/rxvt-unicode-9.07-r1  USE="afterimage iso14755 perl truetype -vanilla -wcwidth xterm-color" 0 kB
Comment 6 Martin von Gagern 2010-03-10 10:20:34 UTC
Emerged gmpc, but noticed no issues with Alt+Tab when it was focused. I also
failed to reproduce my urxvt issue in XFCE 4.6.1.

I did notice another thing, though: when I press Alt+Tab in urxvt and release
it, then as I said before a click on another window seems to be lost: the
clicked app neither responds to the click nor gains focus. Now I found out that
if I make it a drag instead of a click, then I can move the window around, just
like I can by pressing Alt and dragging a window.

So it would seem to me that the state of the Alt key lingers somewhere longer
than it should, causing the next click to be interpreted as Alt+click.

I also found another affected app, besides urxvt: x11-apps/xev exhibits the
same behaviour. This should be useful indeed. Here is its output, with
corresponding input actions preceded by #:

# Press and hold Alt

KeyPress event, serial 34, synthetic NO, window 0x3400001,
    root 0x15a, subw 0x0, time 12407530, (308,88), root:(312,1049),
    state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

# Press and hold Tab

FocusOut event, serial 34, synthetic NO, window 0x3400001,
    mode NotifyGrab, detail NotifyAncestor

# Release Tab
# Release Alt
# Click other window

FocusIn event, serial 34, synthetic NO, window 0x3400001,
    mode NotifyUngrab, detail NotifyNonlinear

KeymapNotify event, serial 34, synthetic NO, window 0x0,
    keys:  68  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
Comment 7 Martin von Gagern 2010-03-10 10:28:00 UTC
On XFCE, Alt+Tab from xev works as well. When I release the Alt key, or more precisely when I release the second of the keys Alt+Tab, then the app sees another event:

FocusOut event, serial 34, synthetic NO, window 0x2400001,
    mode NotifyWhileGrabbed, detail NotifyNonlinear
Comment 8 Chí-Thanh Christopher Nguyễn gentoo-dev 2010-03-10 12:17:21 UTC
This could be fallout from the attempt to fix input freeze (bug 296514, bug 308523). The patch has been reverted in upstream's nomination branch and will probably be replaced by something else.

Upstream bug report is: https://bugs.freedesktop.org/show_bug.cgi?id=25400
Comment 9 Martin von Gagern 2010-03-10 12:49:51 UTC
Just for the record: kpdf exhibits the Alt+Tab problem as well, so it's even core KDE 3.5 apps that break, and not only a result of mixing toolkits.

(In reply to comment #8)
> This could be fallout from the attempt to fix input freeze.
> Upstream bug report is: https://bugs.freedesktop.org/show_bug.cgi?id=25400

Seems to be the case: reverting http://cgit.freedesktop.org/xorg/xserver/commit/?id=cf72b5437d2d620521279077a29c5df6d0fbb576 solved the problem for me.

I'm happy that the next xorg release will likely fix this, without me having to doctor unsupported KDE 3.5 code. :-)
Comment 10 Jim Ramsay (lack) (RETIRED) gentoo-dev 2010-03-10 14:44:36 UTC
xorg-server-1.7.5.901 is masked for now (See bug 296514)
Comment 11 Chí-Thanh Christopher Nguyễn gentoo-dev 2010-03-15 13:56:15 UTC
can you try again with 1.7.5.902?
Comment 12 Frank Ridderbusch 2010-03-15 14:52:15 UTC
Just updated. 1.7.5.902 works for me.
Comment 13 Rémi Cardona gentoo-dev 2010-03-15 21:23:58 UTC
Alright, thanks for testing. Please don't hesitate to reopen this bug if you can still reproduce with later versions.

Thanks
Comment 14 step 2010-09-28 15:51:04 UTC
alt+tab stops working in 11-base/xorg-server-1.7.7-r1 and KDE  4.5.1