Merge lp:~sjakthol/compiz/fix-839602 into lp:compiz/0.9.9
Status: | Merged |
---|---|
Approved by: | Daniel van Vugt |
Approved revision: | 3418 |
Merged at revision: | 3433 |
Proposed branch: | lp:~sjakthol/compiz/fix-839602 |
Merge into: | lp:compiz/0.9.9 |
Diff against target: |
23 lines (+4/-3) 1 file modified
plugins/grid/src/grid.cpp (+4/-3) |
To merge this branch: | bzr merge lp:~sjakthol/compiz/fix-839602 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel van Vugt | Approve | ||
Sam Spilsbury | Approve | ||
PS Jenkins bot | continuous-integration | Pending | |
Review via email: mp+129739@code.launchpad.net |
Commit message
The grid resize hint overlay doesn't disappear when the window is
moved along the edge from a region that has a resize action set to a
region without one (LP: #839602).
When the edge changes, grid calculates the target rectangle for the
transformation. The previous overlay will be destroyed only if the
new target rectangle is different from the previous target rectangle.
But when the target is GridUnknown (the action for the region has set
to be None), initiateCommon bails out right away leaving the target
rectangle unchanged. And thus grid thinks nothing has changed and
the old overlay is left intact.
The fix resets the target rectangle to be at (0, 0) with height and
width of 0. As the previous rectangle is now different from the new
one, the old overlay will fade out. The same technique is used to
destroy the overlay when the window is moved away from the target region.
Description of the change
Test case:
1. Open CCSM
2. Go to Grid settings -> Edges -> Resize Actions
3. Set 'Right Edge' to 'Right Half' and 'Bottom Right Corner' to 'None'
4. Drag a nautilus window to the Right edge (don't drop the window yet)
5. Keep dragging the window along the edge to the Bottom Right Corner
6. Drop the window.
Current behavior:
At (4) the orange overlay covers the right part of the screen, at (5) the overlay is still there (incorrect behavior, if you drop the window here, nothing happens) and at (6) the overlay doesn't disappear.
Behavior with this fix:
At (4) the orange overlay covers the right part of the screen, at (5) the overlay disappears (correct as nothing will happen if you drop the window here) and at (6) nothing interesting happens.
Works for me.