"sticky" modifier keys issue when wine loses focus

Questions about Wine on Linux
Locked
MeisBarry
Newbie
Newbie
Posts: 4
Joined: Fri Apr 20, 2012 7:42 pm

"sticky" modifier keys issue when wine loses focus

Post by MeisBarry »

When running a program in wine, and I use a hotkey combo to either switch desktops or open another program (example: to bring forward my fullscreen terminal), the modifier keys are still depressed, according to wine, when I switch back to the wine window.

I did some tests, and found that when switching desktops away from wine with a hotkey with modifiers, and then switching back with a method that doesn't require modifiers, the problem shows up. When I do the reverse, switching away without modifier keys, then switching back with them, the problem is gone.

This leads me to think it's an issue with wine not receiving the correct events from X, but I'm not sure how to debug this. It sounds an awful lot like this bug that was fixed in wine several years ago: http://bugs.winehq.org/show_bug.cgi?id=1990

I'm running Archlinux, 64 bit, and everything is up-to-date.
MeisBarry
Newbie
Newbie
Posts: 4
Joined: Fri Apr 20, 2012 7:42 pm

Post by MeisBarry »

I just reread this and realized I wasn't quite clear:

This doesn't seem to be a common problem, and as a result I don't expect anyone to have a solution for me. What I would like, if possible, is suggestions on how to debug this problem further. Does anyone have any?
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

MeisBarry wrote:This doesn't seem to be a common problem
It is a well known common problem. In fact it's not just modifier keys that get stuck - all keys are getting stuck when Wine looses focus.

As for debugging - it's all in winex11.drv/keyboard.c
MeisBarry
Newbie
Newbie
Posts: 4
Joined: Fri Apr 20, 2012 7:42 pm

Post by MeisBarry »

I think we are referring to slightly different things.

Keys sticking when wine loses focus is one thing, but they stay stuck after wine regains focus, even if the offending keys were released within wine.

At some point in the past, I didn't have this issue. Keys would stick when wine lost focus (the well-known, common problem), but when I returned using modifier keys, and released them, wine would acknowledge their release. This latter part no longer happens.

Perhaps I should take a stab at what date this changed and roll wine back.
mogorva
Level 4
Level 4
Posts: 107
Joined: Fri Oct 16, 2009 10:27 am

Post by mogorva »

The relevant commit could be this one:
http://source.winehq.org/git/wine.git/c ... 94c74dc868

It can be reverted cleanly on 1.5.2.

The related bug report:
http://bugs.winehq.org/show_bug.cgi?id=27232
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

mogorva wrote:The relevant commit could be this one:
http://source.winehq.org/git/wine.git/c ... 94c74dc868
That's part of a problem but not the entire problem. AJ moved key states into wineserver. And split them into synchronous (was already there) and asynchronous (moved from winex11.drv). But they are not properly updated it would seem.
MeisBarry
Newbie
Newbie
Posts: 4
Joined: Fri Apr 20, 2012 7:42 pm

Post by MeisBarry »

I downgraded from 1.5.1-1 to 1.3.37-1.1, since based on my pacman logs, that was the version before the upgrade that first caused issues (1.3.37-1.1 -> 1.4.1). I downgraded wine_gecko, too, just in case. This fixed the issue for me entirely. Keys now act as they should.
jjmckenzie
Moderator
Moderator
Posts: 1153
Joined: Wed Apr 27, 2011 11:01 pm

"sticky" modifier keys issue when wine loses focus

Post by jjmckenzie »

On Mon, Apr 30, 2012 at 4:51 PM, MeisBarry <[email protected]> wrote:
I downgraded from 1.5.1-1 to 1.3.37-1.1, since based on my pacman logs, that was the version before the upgrade that first caused issues
(1.3.37-1.1 -> 1.4.1). I downgraded wine_gecko, too, just in case. This fixed the issue for me entirely. Keys now act as they should.
Time for a regression test.

James
Locked