Merge lp://qastaging/~mc-return/compiz/compiz.merge-fix1165198-horizontally-semimaximized-windows-do-not-snap-off-easily into lp://qastaging/compiz/0.9.10
Status: | Merged |
---|---|
Approved by: | Sam Spilsbury |
Approved revision: | 3650 |
Merged at revision: | 3654 |
Proposed branch: | lp://qastaging/~mc-return/compiz/compiz.merge-fix1165198-horizontally-semimaximized-windows-do-not-snap-off-easily |
Merge into: | lp://qastaging/compiz/0.9.10 |
Diff against target: |
658 lines (+207/-181) 3 files modified
plugins/move/move.xml.in (+31/-10) plugins/move/src/move.cpp (+169/-166) plugins/move/src/move.h (+7/-5) |
To merge this branch: | bzr merge lp://qastaging/~mc-return/compiz/compiz.merge-fix1165198-horizontally-semimaximized-windows-do-not-snap-off-easily |
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Sam Spilsbury | Approve | ||
MC Return | Pending | ||
Review via email:
|
This proposal supersedes a proposal from 2013-04-08.
Commit message
*Move xml:
Implemented options to configure:
"Snapoff Distance"
"Snapback Semimaximized Windows" and
"Snapback Distance"
Improved a few tooltips.
*Move code:
Replaced SNAP_BACK and SNAP_OFF hardcoded constants and made those
configurable.
Implemented a strategy to snap off horizontally maximized windows by
dragging them along the x axis.
Implemented snapping back of horizontally maximized windows and fixed
the snapping for vertically maximized windows (wrong cursor calculation).
Fixed a few wrong calculations in the if condition checks responsible
for snapping off and back.
Merged if condition checks.
Just compute various local variables if we do not return false.
Removed redundant brackets, fixed indentation and improved readability.
Description of the change
[How to reproduce]
1.Semi-maximize a window horizontally (right mousebutton-click on the maximize button)
2.Try to restore your window by dragging the title bar to the side.
[What you would expect to happen]
The window should restore after you've dragged the titlebar a few pixels to the side.
[What actually happens]
The window will not restore until you reach the side of the screen and trigger either
a viewport switch or trigger the grid preview.
The problem is hidden in static void moveHandleMotio
if (ms->optionGetS
Here you can find a low quality screencast demonstrating this MP:
https:/
128 + int x = wX + dx - w->border ().left;
129 + int y = wY + dy - w->border ().top;
130 + int width = wWidth + w->border ().left + w->border ().right;
131 + int height = w->border ().top ? w->border ().top : 1;
132 +
133 + int status = XRectInRegion (ms->region, x, y,
134 + (unsigned int) width,
135 + (unsigned int) height);
Can you align wX, wY, wWidth and w->border (), they've become de-aligned.
+ CompRect workArea = s->getWorkareaF orOutput (w->outputDevice ());
This is better written as
CompRect workArea (s->getWorkarea ForOutput (w->outputDevice ());
153 + if (w->saveMask ()& CWWidth)
You'll need a space between w->saveMask () and "&"
159 + ms->x = ms->y = 0;
160 +
Will that cause the window to be moved back to 0,0 ? I haven't got time to check at the moment.