Merge lp:~townsend/compiz/fix-lp1251777 into lp:compiz/0.9.11

Proposed by Christopher Townsend
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 3807
Merged at revision: 3812
Proposed branch: lp:~townsend/compiz/fix-lp1251777
Merge into: lp:compiz/0.9.11
Diff against target: 78 lines (+21/-7)
3 files modified
debian/patches/ubuntu-config.patch (+6/-5)
plugins/grid/grid.xml.in (+10/-0)
plugins/grid/src/grid.cpp (+5/-2)
To merge this branch: bzr merge lp:~townsend/compiz/fix-lp1251777
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+197793@code.launchpad.net

Commit message

* Add new Grid shortcuts for Ctrl-Super-Left/Right to left/right semi-maximize windows (removed from Unity).
* Patch Grid to use Ctrl-Super-Up to maximize a gridded window instead of using core. This helps in restoring a window back to it's original place before being gridded.
* Account for left and right borders when restoring a gridded window since the window would shrink and shift by this amount.

Description of the change

* Add new Grid shortcuts for Ctrl-Super-Left/Right to left/right semi-maximize windows (removed from Unity in another MP).
* Patch Grid to use Ctrl-Super-Up to maximize a gridded window instead of using core. This helps in restoring a window back to it's original place before being gridded.
* Account for left and right borders when restoring a gridded window since the window would shrink and shift by this amount.

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

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/patches/ubuntu-config.patch'
2--- debian/patches/ubuntu-config.patch 2013-11-11 20:07:16 +0000
3+++ debian/patches/ubuntu-config.patch 2013-12-04 20:00:45 +0000
4@@ -699,13 +699,14 @@
5 bool Advance (Display *d, bool r)
6 Index: compiz/plugins/grid/grid.xml.in
7 ===================================================================
8---- compiz.orig/plugins/grid/grid.xml.in 2013-10-08 17:00:56.932757923 +0200
9-+++ compiz/plugins/grid/grid.xml.in 2013-10-08 17:01:05.104735978 +0200
10-@@ -68,12 +68,11 @@
11+--- compiz.orig/plugins/grid/grid.xml.in 2013-12-04 12:23:44.021963832 -0500
12++++ compiz/plugins/grid/grid.xml.in 2013-12-04 12:24:43.885963254 -0500
13+@@ -68,12 +68,12 @@
14 <option name="put_maximize_key" type="key">
15 <_short>Maximize Key</_short>
16 <_long>Maximize window.</_long>
17 - <default>&lt;Control&gt;&lt;Alt&gt;KP_0</default>
18++ <default>&lt;Control&gt;&lt;Super&gt;Up</default>
19 </option>
20 <option name="put_restore_key" type="key">
21 <_short>Restore</_short>
22@@ -713,8 +714,8 @@
23 - <default>&lt;Alt&gt;F5</default>
24 + <default>&lt;Control&gt;&lt;Super&gt;Down</default>
25 </option>
26- </group>
27- <group>
28+ <option name="left_maximize" type="key">
29+ <_short>Left Maximize</_short>
30 Index: compiz/plugins/ezoom/ezoom.xml.in
31 ===================================================================
32 --- compiz.orig/plugins/ezoom/ezoom.xml.in 2013-10-08 17:00:56.932757923 +0200
33
34=== modified file 'plugins/grid/grid.xml.in'
35--- plugins/grid/grid.xml.in 2013-05-11 08:04:34 +0000
36+++ plugins/grid/grid.xml.in 2013-12-04 20:00:45 +0000
37@@ -75,6 +75,16 @@
38 <_long>Restore window to it's original size. Note: Use the same shortcut you are using to unmaximize a window to be able to restore grid-maximized windows.</_long>
39 <default>&lt;Alt&gt;F5</default>
40 </option>
41+ <option name="left_maximize" type="key">
42+ <_short>Left Maximize</_short>
43+ <_long>Left vertically maximize window.</_long>
44+ <default>&lt;Control&gt;&lt;Super&gt;Left</default>
45+ </option>
46+ <option name="right_maximize" type="key">
47+ <_short>Right Maximize</_short>
48+ <_long>Right vertically maximize window.</_long>
49+ <default>&lt;Control&gt;&lt;Super&gt;Right</default>
50+ </option>
51 </group>
52 <group>
53 <_short>Corners / Edges</_short>
54
55=== modified file 'plugins/grid/src/grid.cpp'
56--- plugins/grid/src/grid.cpp 2013-11-15 22:58:47 +0000
57+++ plugins/grid/src/grid.cpp 2013-12-04 20:00:45 +0000
58@@ -1020,8 +1020,8 @@
59 else if (isGridVertMaximized)
60 {
61 window->saveMask () |= CWX | CWWidth;
62- window->saveWc ().x = originalSize.x ();
63- window->saveWc ().width = originalSize.width ();
64+ window->saveWc ().x = originalSize.x () - window->border ().left;
65+ window->saveWc ().width = originalSize.width () + window->border ().left + window->border ().right;
66 }
67
68 if ((isGridHorzMaximized &&
69@@ -1314,6 +1314,9 @@
70 GRIDSET (PutBottomrightKey, GridWindowType::GridBottomRight, true, true);
71 GRIDSET (PutMaximizeKey, GridWindowType::GridMaximize, true, true);
72
73+ GRIDSET (RightMaximize, GridWindowType::GridRight, true, true);
74+ GRIDSET (LeftMaximize, GridWindowType::GridLeft, true, true);
75+
76 #undef GRIDSET
77
78 optionSetPutRestoreKeyInitiate (boost::bind (&GridScreen::

Subscribers

People subscribed via source and target branches