Merge lp:~agateau/unity-2d/keep-launcher-if-maximized-window-is-on-other-monitor into lp:unity-2d/3.0

Proposed by Aurélien Gâteau
Status: Merged
Approved by: Aurélien Gâteau
Approved revision: 453
Merged at revision: 467
Proposed branch: lp:~agateau/unity-2d/keep-launcher-if-maximized-window-is-on-other-monitor
Merge into: lp:unity-2d/3.0
Diff against target: 25 lines (+1/-10)
1 file modified
launcher/app/intellihidebehavior.cpp (+1/-10)
To merge this branch: bzr merge lp:~agateau/unity-2d/keep-launcher-if-maximized-window-is-on-other-monitor
Reviewer Review Type Date Requested Status
Olivier Tilloy (community) Approve
Review via email: mp+53407@code.launchpad.net

Commit message

[launcher] Keep launcher visible when window is maximized on another monitor

No need to special-case maximized windows: checking window geometry works for
"normal" and maximized windows.

Description of the change

Simple fix I found while working on the new intellihide behavior. Should be straighforward to review.

To post a comment you must log in.
Revision history for this message
Olivier Tilloy (osomon) wrote :

Less code is always better code! As a bonus, I verified that it actually works as advertised ;)
Go for it!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'launcher/app/intellihidebehavior.cpp'
--- launcher/app/intellihidebehavior.cpp 2011-03-14 15:25:50 +0000
+++ launcher/app/intellihidebehavior.cpp 2011-03-15 11:41:04 +0000
@@ -151,20 +151,11 @@
151 WnckWindowState state = wnck_window_get_state(window);151 WnckWindowState state = wnck_window_get_state(window);
152152
153 // Skip hidden (==minimized and other states) windows153 // Skip hidden (==minimized and other states) windows
154 // Note: check this *before* checking if window is maximized
155 // because a window can be both minimized and maximized
156 if (state & WNCK_WINDOW_STATE_HIDDEN) {154 if (state & WNCK_WINDOW_STATE_HIDDEN) {
157 continue;155 continue;
158 }156 }
159157
160 // Maximized window should always be considered as crossing the158 // Check the window rect
161 // window
162 if (state & WNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY) {
163 crossWindow = true;
164 break;
165 }
166
167 // Not maximized => really check the window rect
168 int x, y, width, height;159 int x, y, width, height;
169 wnck_window_get_geometry(window, &x, &y, &width, &height);160 wnck_window_get_geometry(window, &x, &y, &width, &height);
170 QRect rect(x, y, width, height);161 QRect rect(x, y, width, height);

Subscribers

People subscribed via source and target branches