Merge lp:~townsend/compiz/fix-decoration-grab-0.9.10 into lp:compiz/0.9.10

Proposed by Christopher Townsend
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 3792
Merged at revision: 3794
Proposed branch: lp:~townsend/compiz/fix-decoration-grab-0.9.10
Merge into: lp:compiz/0.9.10
Diff against target: 22 lines (+3/-2)
1 file modified
gtk/window-decorator/metacity.c (+3/-2)
To merge this branch: bzr merge lp:~townsend/compiz/fix-decoration-grab-0.9.10
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Marco Trevisan (Treviño) Approve
Review via email: mp+188638@code.launchpad.net

Commit message

Fix issue where non-resizable windows and semi-maximized window would have an area near the top of the title bar that could not be grabbed.

Description of the change

= Issue =
On non-resizable windows or semi-maximized windows, approximately the top half to top third of the title bar decoration is not grabable for moving the window. This is due to a regression introduced in http://bazaar.launchpad.net/~compiz-team/compiz/0.9.10/revision/3735.

= Fix =
After much debugging, I discovered that these particular type of windows call the middle/middle event_window_position twice, so this was throwing off the y coordinate. Other window types just call this once. The y coordinate is not needed for these types of windows because there cannot be an invisible border to resize the window, so now just check if the window is able to be vertically resized, and if so, then add the y coordinate.

Note that this is the same fix that is proposed for trunk.

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'gtk/window-decorator/metacity.c'
2--- gtk/window-decorator/metacity.c 2013-06-04 14:11:23 +0000
3+++ gtk/window-decorator/metacity.c 2013-10-01 15:53:52 +0000
4@@ -1108,7 +1108,7 @@
5 *x += d->frame->win_extents.left + 4;
6 *y += d->frame->win_extents.top + 2;
7 }
8-
9+
10 if (flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE)
11 {
12 *x += mutter_draggable_border_width;
13@@ -1389,7 +1389,8 @@
14 if (!d->frame_window)
15 {
16 *x += mutter_draggable_border_width;
17- *y += mutter_draggable_border_width;
18+ if (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE)
19+ *y += mutter_draggable_border_width;
20 }
21
22 break;

Subscribers

People subscribed via source and target branches