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
1=== modified file 'launcher/app/intellihidebehavior.cpp'
2--- launcher/app/intellihidebehavior.cpp 2011-03-14 15:25:50 +0000
3+++ launcher/app/intellihidebehavior.cpp 2011-03-15 11:41:04 +0000
4@@ -151,20 +151,11 @@
5 WnckWindowState state = wnck_window_get_state(window);
6
7 // Skip hidden (==minimized and other states) windows
8- // Note: check this *before* checking if window is maximized
9- // because a window can be both minimized and maximized
10 if (state & WNCK_WINDOW_STATE_HIDDEN) {
11 continue;
12 }
13
14- // Maximized window should always be considered as crossing the
15- // window
16- if (state & WNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY) {
17- crossWindow = true;
18- break;
19- }
20-
21- // Not maximized => really check the window rect
22+ // Check the window rect
23 int x, y, width, height;
24 wnck_window_get_geometry(window, &x, &y, &width, &height);
25 QRect rect(x, y, width, height);

Subscribers

People subscribed via source and target branches