Merge lp:~3v1n0/compiz/scale-ignore-other-active-win into lp:compiz/0.9.9

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 3587
Merged at revision: 3587
Proposed branch: lp:~3v1n0/compiz/scale-ignore-other-active-win
Merge into: lp:compiz/0.9.9
Diff against target: 31 lines (+18/-3)
1 file modified
plugins/scale/src/scale.cpp (+18/-3)
To merge this branch: bzr merge lp:~3v1n0/compiz/scale-ignore-other-active-win
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Brandon Schaefer (community) Approve
Review via email: mp+145516@code.launchpad.net

Commit message

Scale: don't set the active window if it is not in the scale group

Description of the change

When we scale a window group, we should ignore an active window that is not currently scaled when setting the currently active/hovered windows or clients will get wrong infos.

This fixes the "gost glow" issue in unity.

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

Looks good to me, works.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
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/scale/src/scale.cpp'
2--- plugins/scale/src/scale.cpp 2012-12-04 13:16:26 +0000
3+++ plugins/scale/src/scale.cpp 2013-01-29 23:24:23 +0000
4@@ -1214,9 +1214,24 @@
5 if (!lastActiveNum)
6 lastActiveNum = screen->activeNum () - 1;
7
8- previousActiveWindow = screen->activeWindow ();
9- lastActiveWindow = screen->activeWindow ();
10- selectedWindow = screen->activeWindow ();
11+ Window active_window = screen->activeWindow ();
12+ bool found_active = false;
13+
14+ foreach (ScaleWindow *sw, windows)
15+ {
16+ if (sw->window->id() == active_window)
17+ {
18+ found_active = true;
19+ break;
20+ }
21+ }
22+
23+ if (!found_active)
24+ active_window = None;
25+
26+ previousActiveWindow = active_window;
27+ lastActiveWindow = active_window;
28+ selectedWindow = active_window;
29 hoveredWindow = None;
30
31 this->state = ScaleScreen::Out;

Subscribers

People subscribed via source and target branches