Merge lp:~sjakthol/compiz/fix-1063871 into lp:compiz/0.9.9

Proposed by Sami Jaktholm
Status: Merged
Approved by: Daniel van Vugt
Approved revision: 3437
Merged at revision: 3437
Proposed branch: lp:~sjakthol/compiz/fix-1063871
Merge into: lp:compiz/0.9.9
Diff against target: 14 lines (+3/-1)
1 file modified
plugins/grid/src/grid.cpp (+3/-1)
To merge this branch: bzr merge lp:~sjakthol/compiz/fix-1063871
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
MC Return Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+130321@code.launchpad.net

Commit message

Grid: Reset the currently handled window in the GridWindow destructor
only if the destroyed window was the handled one.

Currently completely unrelated GridWindow destruction will erase the
saved ID of the window Grid should be handling. This will break
the functionality if a GridWindow is destroyed while another window
is being dragged.

Fixes LP: #1067812 and LP: #1048855.

Description of the change

Test case:
1. Open Gedit
2. Drag window to the right edge of your screen
3. Drop the window

Current behavior: Grid fails to function.

Behavior with this fix:
At (2) the orange overlay appears and at (3) window snaps to the right half of the screen.

This issue happens with Gedit because when a Gedit window is grabbed, few destruction events of GridWindows are triggered. Other applications might be affected too.

To post a comment you must log in.
Revision history for this message
MC Return (mc-return) wrote :

Great 8) - Have not tested it yet, but the .diff and your description look sane to me.

Keep them fixes comin' ;)

review: Approve
Revision history for this message
MC Return (mc-return) wrote :

I have compiled and tested your fix now and can confirm it works like intended. Top job !
Finally I can use Grid with gedit \o/

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

Seems to work. I could only kind of reproduce and test bug 1048855. And even then, I could only reproduce it with wall when _not_ on the far-right workspace.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/grid/src/grid.cpp'
2--- plugins/grid/src/grid.cpp 2012-10-15 19:16:23 +0000
3+++ plugins/grid/src/grid.cpp 2012-10-18 11:24:20 +0000
4@@ -1143,7 +1143,9 @@
5 if (gScreen->mGrabWindow == window)
6 gScreen->mGrabWindow = NULL;
7
8- gScreen->o[0].value ().set (0);
9+ CompWindow *w = screen->findWindow (CompOption::getIntOptionNamed (gScreen->o, "window"));
10+ if (w == window)
11+ gScreen->o[0].value ().set (0);
12 }
13
14 /* Initial plugin init function called. Checks to see if we are ABI

Subscribers

People subscribed via source and target branches