! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Super key "sticking" when used to change workspaces
Status:
RESOLVED: FIXED

Comments

Description Jason Chu 2009-02-18 06:53:29 CET
Steps to reproduce:
1. Set Super to the window drag modifier (Key used to grab and move windows).
2. Set Next workspace to <Super>Left.
3. Hold down Super and press left more than once.

The first time you press it everything works.  Sometimes even the second and third time.  Eventually xfwm4 (I think) forgets you're holding down Super for the sake of the keyboard command but still thinks it's being held down for the sake of moving windows.  Focus will change but no keyboard commands will work.

To get out of this broken state you have to drag a window a few pixels and then xfwm4 realizes Super isn't being held down anymore.  From there clicking works as if Super wasn't held down and <Super>Left works again.

If you let go of Super every time you change workspaces (ie. <Super>Left, <Super>Left, <Super>Left) instead of holding it down (<Super>Left Left Left) xfwm4 will never get confused.

I haven't tried this with other drag modifiers (Alt) but it's possible it works the same way.

I also have focus follows mouse on but I don't think that has anything to do with it.
Comment 1 Olivier Fourdan editbugs 2009-02-19 10:29:48 CET
Test in xev, I suspect that your Super key is seen both as a modifier and a regular key.

1. Run xev
2. Move the pointer to the window
3. Press the Super key

Do you see the events repeating after a little while? (I do here)

In that case, there is nothing I can do, use another modifier and close that bug as invalid.
Comment 2 Olivier Fourdan editbugs 2009-02-19 10:37:16 CET
BTW, I don't see that happening here. Please provide the output of "xfwm4 --version"
Comment 3 Olivier Fourdan editbugs 2009-02-19 12:37:35 CET
I've now been able to reproduce it.
Comment 4 Olivier Fourdan editbugs 2009-02-19 12:55:51 CET
Can you try with svn trunk revision 29516 or later?
Comment 5 Jason Chu 2009-02-19 15:41:53 CET
Yes, the Super_L event does repeat.

The output of xfwm4 --version:
        This is xfwm4 version 4.5.99.1 (revision 29379) for Xfce 4.5.99.1
        Released under the terms of the GNU General Public License.
        Compiled against GTK+-2.14.7, using GTK+-2.14.7.

        Build configuration and supported features:
        - Startup notification support:                 Yes
        - XSync support:                                Yes
        - Render support:                               Yes
        - Xrandr support:                               Yes
        - Embedded compositor:                          Yes
        - KDE systray proxy (deprecated):               No

Can I just build xfwm4's svn version and leave all the other components at RC1?  Or do I need to rebuild everything?
Comment 6 Olivier Fourdan editbugs 2009-02-19 15:53:51 CET
(In reply to comment #5)
> Can I just build xfwm4's svn version and leave all the other components at RC1?
> Or do I need to rebuild everything?

Good point, there's been a API change in libxfcegui4 since RC1.

So it'd much easier for you to just pick that specific change and apply it to the xfwm4 sources from RC1:

http://svn.xfce.org/index.cgi/xfce/xfwm4/trunk/src/events.c?r1=29516&r2=29515&pathrev=29516
Comment 7 Jason Chu 2009-02-19 21:36:01 CET
After preliminary testing this patch seems to fix the problem.  I'll continue running with it for a while and see if it comes up again.

Thanks!
Comment 8 Jason Chu 2009-02-20 00:18:46 CET
I just had it happen once.  It's possible that it's happening quite a bit less often now though.
Comment 9 Olivier Fourdan editbugs 2009-02-20 20:43:32 CET
Adding blocker as current svn status is badly broken and leads to lockups of the WM
Comment 10 Brian J. Tarricone (not reading bugmail) 2009-02-20 21:11:55 CET
I think I've had the same problem, weirdly it only started appearing when I switch from the xorg kbd/mouse drivers to the evdev driver.  But I suppose it's possible I updated xfwm4 at the same time, or maybe just evdev makes the problem more apparent.

But mine is a little different.  I have <Alt><Shift>Left/Right/Up/Down set for changing workspaces.  Pretty often something weird happens and I lose all keyboard control after changing workspaces.  Grabbing and dragging a window fixes the problem.

Is this the same thing, or something else?
Comment 11 Olivier Fourdan editbugs 2009-02-20 22:07:57 CET
(In reply to comment #10)
> Is this the same thing, or something else?

Possibly the same.

For now, please test as much as you can current svn code. I just committed yet another change (rev. 29524.)
Comment 12 Olivier Fourdan editbugs 2009-02-20 23:17:43 CET
Jason, can you try the current code? In doubt, just grab the source "events.c" from  http://svn.xfce.org/svn/xfce/xfwm4/trunk/src/events.c and rebuild.
Comment 13 Olivier Fourdan editbugs 2009-02-20 23:19:34 CET
(In reply to comment #12)
> Jason, can you try the current code? In doubt, just grab the source "events.c"
> from  http://svn.xfce.org/svn/xfce/xfwm4/trunk/src/events.c and rebuild.

Well, sorry, not quite so, just copy/paste the handleKeyPress() function.
Comment 14 Brian J. Tarricone (not reading bugmail) 2009-02-21 03:07:05 CET
Ok, with current svn trunk, I can't reproduce the problem anymore... my problem, at least!  Yay, one annoyance gone.
Comment 15 Olivier Fourdan editbugs 2009-02-21 09:59:13 CET
Yes, I cannot reproduce the problem reported anymore with current svn code either.

But it's a race condition so it can be tricky to make sure it's gone entirely.

I'd like to have Jason, who reported the issue at first, to confirm this too before closing.
Comment 16 Jason Chu 2009-02-21 16:24:19 CET
I'm testing it now.  I don't expect to spend enough time on it till tomorrow at least.
Comment 17 Olivier Fourdan editbugs 2009-02-22 09:07:54 CET
Created attachment 2184 
Backport of the changes to RC1

(In reply to comment #16)
> I'm testing it now.  I don't expect to spend enough time on it till tomorrow at
> least.

Ok, I am attaching the backport of the changes to RC1, so we are sure that all changes are included in your test.

Simply replace the source src/events.c in your build with this one and rebuild xfwm4 before testing.
Comment 18 Stephan Arts editbugs 2009-02-23 23:14:38 CET
With this bug being gone for 2 out of 3 testers, with no mention of this still being present.

Can we assume it's gone? :-)
Comment 19 Stephan Arts editbugs 2009-02-23 23:17:59 CET
Sorry, lets wait for Jason to report back. (hopefully with some good news)
Comment 20 Jason Chu 2009-02-23 23:20:10 CET
So far I haven't had that exact problem.  Once I had super+tab (switch windows) break on me in a similar way, except I couldn't drag any windows.  I actually had to start a different program from the console to get control back.

Other than that, things look good.
Comment 21 Olivier Fourdan editbugs 2009-02-23 23:38:15 CET
Ok, removing the blocking flag then.
Comment 22 Olivier Fourdan editbugs 2009-02-24 00:05:42 CET
(In reply to comment #20)
> So far I haven't had that exact problem.  Once I had super+tab (switch windows)
> break on me in a similar way, except I couldn't drag any windows.  I actually
> had to start a different program from the console to get control back.

Cycling has an active grab on the keyboard and pointer, so it's a different code path.

The only cause I can see for this would be if the timestamp used to release the active grab is inaccurate, so to be safe I've now changed the code a bit to use the special timestamp CurrentTime.

It's in revision 29550.
Comment 23 Brian J. Tarricone (not reading bugmail) 2009-02-24 00:23:57 CET
Yeah, I've noticed the grab not dropping after a cycle windows on occasion, usually just when the machine is under load... a timestamp issue seems to fit that.
Comment 24 Olivier Fourdan editbugs 2009-02-27 20:16:17 CET
Cannot reproduce anymore, closing.

Bug #4959

Reported by:
Jason Chu
Reported on: 2009-02-18
Last modified on: 2009-07-14

People

Assignee:
Olivier Fourdan
CC List:
2 users

Version

Version:
4.5.99.1 (4.6 rc 1)

Attachments

Backport of the changes to RC1 (91.09 KB, text/plain)
2009-02-22 09:07 CET , Olivier Fourdan
no flags

Additional information