Merge lp:~diego-rocha-comp/gala/fix-overview-foreign-windows into lp:gala

Proposed by Diego Rocha
Status: Rejected
Rejected by: Zisu Andrei
Proposed branch: lp:~diego-rocha-comp/gala/fix-overview-foreign-windows
Merge into: lp:gala
Diff against target: 90 lines (+21/-28)
2 files modified
src/Widgets/WindowClone.vala (+4/-3)
src/Widgets/WindowCloneContainer.vala (+17/-25)
To merge this branch: bzr merge lp:~diego-rocha-comp/gala/fix-overview-foreign-windows
Reviewer Review Type Date Requested Status
Zisu Andrei (community) Disapprove
Gala developers Pending
Review via email: mp+286722@code.launchpad.net

Description of the change

When in overview mode, always stack windows from a workspace that is not the current below. Also, fade them out when leaving this mode.

To post a comment you must log in.
509. By Diego Rocha

windowclone: stack windows foreign windows below and fade them out

Revision history for this message
Zisu Andrei (matzipan) wrote :

Hey, I built and ran this but it's unclear what I should be seeing. Can you point it out for me?

review: Needs Information
Revision history for this message
Zisu Andrei (matzipan) wrote :

Rejecting since not clear what this branch is.

review: Disapprove

Unmerged revisions

509. By Diego Rocha

windowclone: stack windows foreign windows below and fade them out

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Widgets/WindowClone.vala'
2--- src/Widgets/WindowClone.vala 2016-02-15 15:40:55 +0000
3+++ src/Widgets/WindowClone.vala 2016-02-20 03:01:18 +0000
4@@ -279,6 +279,10 @@
5
6 set_position (outer_rect.x - offset_x, outer_rect.y - offset_y);
7 set_size (outer_rect.width, outer_rect.height);
8+
9+ if (should_fade ())
10+ opacity = 0;
11+
12 restore_easing_state ();
13
14 if (animate)
15@@ -286,9 +290,6 @@
16
17 window_icon.opacity = 0;
18 close_button.opacity = 0;
19-
20- if (should_fade ())
21- opacity = 0;
22 }
23
24 /**
25
26=== modified file 'src/Widgets/WindowCloneContainer.vala'
27--- src/Widgets/WindowCloneContainer.vala 2015-11-11 19:56:40 +0000
28+++ src/Widgets/WindowCloneContainer.vala 2016-02-20 03:01:18 +0000
29@@ -60,7 +60,6 @@
30 */
31 public void add_window (Window window)
32 {
33- unowned Meta.Display display = window.get_display ();
34 var children = get_children ();
35
36 GLib.SList<unowned Meta.Window> windows = new GLib.SList<unowned Meta.Window> ();
37@@ -71,36 +70,29 @@
38 windows.prepend (window);
39 windows.reverse ();
40
41- var windows_ordered = display.sort_windows_by_stacking (windows);
42-
43 var new_window = new WindowClone (window, overview_mode);
44
45 new_window.selected.connect (window_selected_cb);
46 new_window.destroy.connect (window_destroyed);
47 new_window.request_reposition.connect (reflow);
48
49- var added = false;
50- unowned Meta.Window? target = null;
51- foreach (unowned Meta.Window w in windows_ordered) {
52- if (w != window) {
53- target = w;
54- continue;
55- }
56- break;
57- }
58-
59- foreach (unowned Actor child in children) {
60- unowned WindowClone tw = (WindowClone) child;
61- if (target == tw.window) {
62- insert_child_above (new_window, tw);
63- added = true;
64- break;
65- }
66- }
67-
68- // top most or no other children
69- if (!added)
70- add_child (new_window);
71+ if (window.get_workspace () == window.get_screen ().get_active_workspace ()) {
72+ var added = false;
73+ foreach (unowned Actor child in children) {
74+ unowned WindowClone tw = (WindowClone) child;
75+ if (window == tw.window) {
76+ insert_child_above (new_window, tw);
77+ added = true;
78+ break;
79+ }
80+ }
81+
82+ // top most or no other children
83+ if (!added)
84+ add_child (new_window);
85+ } else {
86+ insert_child_at_index (new_window, 0);
87+ }
88
89 reflow ();
90 }

Subscribers

People subscribed via source and target branches