Merge lp:~mc-return/compiz/compiz.merge-fix1116538-isgridresized-windows-do-not-react-to-strg-super-down.2 into lp:compiz/0.9.10

Proposed by MC Return
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 3652
Merged at revision: 3663
Proposed branch: lp:~mc-return/compiz/compiz.merge-fix1116538-isgridresized-windows-do-not-react-to-strg-super-down.2
Merge into: lp:compiz/0.9.10
Diff against target: 38 lines (+6/-10)
2 files modified
plugins/grid/grid.xml.in (+1/-1)
plugins/grid/src/grid.cpp (+5/-9)
To merge this branch: bzr merge lp:~mc-return/compiz/compiz.merge-fix1116538-isgridresized-windows-do-not-react-to-strg-super-down.2
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Sam Spilsbury Approve
MC Return Needs Resubmitting
Review via email: mp+157951@code.launchpad.net

Commit message

*Grid code:

Simplified bool GridScreen::restoreWindow (...):
If Grid has not touched the window we return false and let core do the
dirty work.
(Thanks go to Sam Spilsbury for suggesting this solution.)

*Grid xml:

Improved the CCSM Grid put_restore_key tooltip.

(LP: #1116538)

Description of the change

I had to make a new branch and MP for this.

Sam, I've implemented your solution now.
The user will still have to change the shortcut though...

We should probably change the Grid default to be the
same like the unmaximize_window_key (for Compiz)
and via quilt patch adjust it to be "Strg+Super+Down"
in Ubuntu (like the unmaximize_or_minimize_window_key)...

But this can be done another day as well...

Note also:
I have now removed the responsibility for fully maximized
Grid windows from Grid as well... (see the diff)

As core knows how to handle the restoring of semi-maximized
windows, we could remove that also - but should do so
after we've harmonized the shortcuts...

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

The only problem we have with this solution is -
we have to make sure that the shortcuts are harmonized...

That is why I would propose a combination of this with
optional enhancement of Grid, so the user can choose
to also use Grid to restore, or restore and minimize,
if the Grid restore shortcut is not harmonized with
core...

That way we could make everyone happy and would give
users the possibility to use a different shortcut for
Grid restore than core uses for
unmaximize/unmaximize_or_minimize.

We should IMHO find a perfect solution, without any
compromises...

Revision history for this message
Sam Spilsbury (smspillaz) :
review: Approve
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

> The only problem we have with this solution is -
> we have to make sure that the shortcuts are harmonized...
>
> That is why I would propose a combination of this with
> optional enhancement of Grid, so the user can choose
> to also use Grid to restore, or restore and minimize,
> if the Grid restore shortcut is not harmonized with
> core...
>

From a design point of view "restore_or_minimize" semantics don't make sense for the grid plugin. They only make sense as part of a kind of global "restore keybinding" that we already get from core.

> That way we could make everyone happy and would give
> users the possibility to use a different shortcut for
> Grid restore than core uses for
> unmaximize/unmaximize_or_minimize.
>
> We should IMHO find a perfect solution, without any
> compromises...

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

Hmm, I thought this landed already...

Resubmitting.

review: Needs Resubmitting
Revision history for this message
Sam Spilsbury (smspillaz) :
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 'plugins/grid/grid.xml.in'
2--- plugins/grid/grid.xml.in 2013-04-06 14:17:36 +0000
3+++ plugins/grid/grid.xml.in 2013-04-09 20:38:20 +0000
4@@ -72,7 +72,7 @@
5 </option>
6 <option name="put_restore_key" type="key">
7 <_short>Restore</_short>
8- <_long>Restore window to it's original size</_long>
9+ <_long>Restores grid-resized, semi-maximized and maximized windows to their original size and position.</_long>
10 <default>&lt;Control&gt;&lt;Alt&gt;r</default>
11 </option>
12 </group>
13
14=== modified file 'plugins/grid/src/grid.cpp'
15--- plugins/grid/src/grid.cpp 2013-04-09 08:39:02 +0000
16+++ plugins/grid/src/grid.cpp 2013-04-09 20:38:20 +0000
17@@ -1060,16 +1060,12 @@
18
19 GRID_WINDOW (cw);
20
21+ /* We have nothing to do here */
22 if (!gw->isGridResized &&
23- !gw->isGridHorzMaximized &&
24- !gw->isGridVertMaximized)
25- {
26- /* Grid hasn't touched this window or has maximized it. If it's
27- * maximized, unmaximize it and get out. */
28- if (cw->state () & MAXIMIZE_STATE)
29- cw->maximize(0);
30- return true;
31- }
32+ !gw->isGridVertMaximized &&
33+ !gw->isGridHorzMaximized)
34+ return false;
35+
36 else if (!gw->isGridResized &&
37 gw->isGridHorzMaximized &&
38 !gw->isGridVertMaximized)

Subscribers

People subscribed via source and target branches

to all changes: