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

Proposed by Christopher Townsend
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 3786
Merged at revision: 3788
Proposed branch: lp:~townsend/compiz/fix-lp1092323
Merge into: lp:compiz/0.9.11
Diff against target: 50 lines (+16/-2)
3 files modified
debian/patches/ubuntu-config.patch (+10/-1)
plugins/wall/src/wall.cpp (+1/-1)
plugins/wall/wall.xml.in (+5/-0)
To merge this branch: bzr merge lp:~townsend/compiz/fix-lp1092323
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+181334@code.launchpad.net

Commit message

Alt-Tabbing or Launcher selecting a window that is over 50% in a different viewport should not switch the viewport nor change the placement of the window. The fix is to add an option to turn this behavior on or off. By default, the option is on, but Ubuntu is patched to turn it off to fix this bug.

Description of the change

Ayatana Design has requested that when Alt-Tabbing to a window that is more than 50% contained in a different viewport, that:
1. The viewport does not switch and;
2. The window's position stays where it currently is.

This fix adds an option to either enable of disable this behavior. By default, the behavior is enabled, meaning nothing changes from current behavior. An Ubuntu patch is included to disable this behavior to match what Design wants.

To post a comment you must log in.
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Looks good, but after talking with duflu, we should do this:

Create an option to turn this off/on. Then create a patch that turns this on for ubuntu, and leave it off by default.

This way users outside of ubuntu don't get hit by this, while making the patch very small.

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

IMHO changing the viewport if the center of the window is on the new viewport makes some sense, but the window should *!never!* be moved around by Compiz when the user just switches to it -> that is really nasty, ugly behaviour.

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

Playing devil's advocate here (and my opinion doesn't count for much
because I don't work on or use compiz anymore) - the reason I added this
behavior is because of the impreciseness that comes with viewports
generally. There's not much of a practical use for a window being both
active and on two viewports at the same time. (Why would you only want to
use half a window?). If a user has activated their window and we've changed
viewports because the majority of it was on another viewport, then moving
the window so that it is completely on-screen saves the extra step of
having to place the window manually.

I don't care much about how this goes either way, but it is some food for
thought at least.

On Tue, Aug 27, 2013 at 5:43 PM, MC Return <email address hidden> wrote:

> IMHO changing the viewport if the center of the window is on the new
> viewport makes some sense, but the window should *!never!* be moved around
> by Compiz when the user just switches to it -> that is really nasty, ugly
> behaviour.
> --
> https://code.launchpad.net/~townsend/compiz/fix-lp1092323/+merge/181334
> Your team Compiz Maintainers is subscribed to branch lp:compiz.
>

--
Sam Spilsbury

Revision history for this message
Christopher Townsend (townsend) wrote :

Setting this a WIP to make this an option instead of just ripping out the code. Then patch Ubuntu to disable the code path so the viewport switch/window move will not occur.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

LGTM

review: Approve
Revision history for this message
Gerhard Radatz (gerhard-radatz) wrote :

Folks. I have updated to the latest compiz which contains this "bug fix". Afterwards, I Alt-Tabbed (or selected with Alt-<Num> via the Unity side bar) a window which was COMPLETELY on another viewport. Just nothing happend, I had to switch manually to this other viewport.

So for a naive user, this appears to be a new bug then!

I don't think its a good decision to introduce unwanted and obiously buggy behaviour for the common case ("switch to another window which is completely on another viewport"), whilst fixing a bug for the rare case ("switch to another window which is partially on another viewport").

Revision history for this message
Christopher Townsend (townsend) wrote :

Hi Gerhard,

I understand why you put a comment in this merge proposal, but if you think there may be a regression or a bug you discover, please open a new bug so we can track it easier.

That said, the default behavior is to Alt-Tab only windows on the current workspace. This default behavior has been present for some time in Unity. This behavior has nothing to do with this fix. If you don't like this default behavior, then it is quite easy to change it.

Open ccsm, choose the Unity plugin, select the Switcher tab, and then deselect "Bias alt-tab to prefer windows on the current viewport". This will allow you to Alt-Tab to windows contained in other workspaces.

Perhaps you had this set and an update somehow reset this value, but that is just a guess.

Thanks!

Revision history for this message
Gerhard Radatz (gerhard-radatz) wrote :

Hi Christopher,

I had intentionally changed the Alt-Tab behaviour to include all windows on all workspaces for a long time. With the new fix, this behaviour effectively didn't work anymore. I had to check the new "auto switch vp and window" setting to make it work again.

Revision history for this message
Christopher Townsend (townsend) wrote :

Hi Gerhard,

My apologies for misunderstanding your use case. I see the regression you are describing. I'll enter a new bug and see about getting it fixed.

Thanks!

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-07-23 23:30:23 +0000
3+++ debian/patches/ubuntu-config.patch 2013-08-28 12:18:58 +0000
4@@ -653,7 +653,16 @@
5 </default>
6 </option>
7 </subgroup>
8-@@ -351,7 +351,7 @@
9+@@ -201,7 +201,7 @@
10+ <option name="auto_switch_vp_and_window" type="bool">
11+ <_short>Auto Switch Vp And Window</_short>
12+ <_long>Auto switch the viewport and move window when Alt-Tab to window that is more than half contained in another viewport</_long>
13+- <default>true</default>
14++ <default>false</default>
15+ </option>
16+ </group>
17+ <group>
18+@@ -356,7 +356,7 @@
19 <option name="edgeflip_move" type="bool">
20 <_short>Edge Flip Move</_short>
21 <_long>Flip viewport when moving a window to a screen edge</_long>
22
23=== modified file 'plugins/wall/src/wall.cpp'
24--- plugins/wall/src/wall.cpp 2013-05-15 10:38:49 +0000
25+++ plugins/wall/src/wall.cpp 2013-08-28 12:18:58 +0000
26@@ -553,7 +553,7 @@
27 {
28 WALL_SCREEN (screen);
29
30- if (window->placed () && !screen->otherGrabExist ("wall", "switcher", 0))
31+ if (ws->optionGetAutoSwitchVpAndWindow () && window->placed () && !screen->otherGrabExist ("wall", "switcher", 0))
32 {
33 int dx, dy;
34 CompPoint viewport;
35
36=== modified file 'plugins/wall/wall.xml.in'
37--- plugins/wall/wall.xml.in 2013-04-27 03:18:27 +0000
38+++ plugins/wall/wall.xml.in 2013-08-28 12:18:58 +0000
39@@ -198,6 +198,11 @@
40 <_long>Windows that should not slide during the slide animation</_long>
41 <default>type=Dock | type=Desktop | state=Sticky</default>
42 </option>
43+ <option name="auto_switch_vp_and_window" type="bool">
44+ <_short>Auto Switch Vp And Window</_short>
45+ <_long>Auto switch the viewport and move window when Alt-Tab to window that is more than half contained in another viewport</_long>
46+ <default>true</default>
47+ </option>
48 </group>
49 <group>
50 <_short>Bindings</_short>

Subscribers

People subscribed via source and target branches