Merge lp:~vanvugt/compiz-core/fix-943223 into lp:compiz-core

Proposed by Daniel van Vugt
Status: Merged
Approved by: Daniel van Vugt
Approved revision: 3034
Merged at revision: 3035
Proposed branch: lp:~vanvugt/compiz-core/fix-943223
Merge into: lp:compiz-core
Diff against target: 12 lines (+1/-1)
1 file modified
src/event.cpp (+1/-1)
To merge this branch: bzr merge lp:~vanvugt/compiz-core/fix-943223
Reviewer Review Type Date Requested Status
Alan Griffiths Approve
Sam Spilsbury Approve
Review via email: mp+95342@code.launchpad.net

Description of the change

Ungrab keyboard as soon as a key is pressed. Don't wait for it to be
released. This (probably) solves a regression apparently introduced in
r3006. (LP: #943223)

I can't be totally sure this fixes bug 943223 because:
  (a) My Unity 5 test machine does not exhibit the problem at all and I can't update it to retry till tomorrow; and
  (b) The test case makes no sense. Alt+F10 is meant to maximize windows. And that's what it does on all my machines.

I'm fairly confident that this change is otherwise benign. And can't exactly remember why r3006 changed KeyPress to KeyRelease in the first place.

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Just a note on the test: it makes tests because:
- alt + F10 is used in unity to reveal the menu
- compiz is distro-patch so that maximize a window is not alt + F10 is Super + Up arrow, as per design request.
Hence the importance that distro-patch goes to upstream compiz, or that people working on ubuntu for unity ensured to have the downstream configuration and distro-patches.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

The change appears to do what it says. Not sure how best to validate it does what's intended though.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

If nothing else, you can verify that this line of code is identical or equivalent to all revisions of lp:compiz-core up to and including r3005.

Revision history for this message
Sam Spilsbury (smspillaz) :
review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> If nothing else, you can verify that this line of code is identical or
> equivalent to all revisions of lp:compiz-core up to and including r3005.

That much is true.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/event.cpp'
2--- src/event.cpp 2012-02-22 05:13:00 +0000
3+++ src/event.cpp 2012-03-01 11:45:21 +0000
4@@ -1057,7 +1057,7 @@
5 XAllowEvents (priv->dpy, mode, event->xkey.time);
6 }
7
8- if (priv->grabs.empty () && event->type == KeyRelease)
9+ if (priv->grabs.empty () && event->type == KeyPress)
10 {
11 XUngrabKeyboard (priv->dpy, event->xkey.time);
12 priv->tapGrab = false;

Subscribers

People subscribed via source and target branches