Merge lp:~aacid/unity-2d/update_pips_on_shell_monitor_reshuffle into lp:unity-2d

Proposed by Albert Astals Cid
Status: Merged
Approved by: Gerry Boland
Approved revision: 1105
Merged at revision: 1106
Proposed branch: lp:~aacid/unity-2d/update_pips_on_shell_monitor_reshuffle
Merge into: lp:unity-2d
Diff against target: 32 lines (+11/-0)
2 files modified
shell/launcher/LauncherList.qml (+4/-0)
tests/manual-tests/launcher.txt (+7/-0)
To merge this branch: bzr merge lp:~aacid/unity-2d/update_pips_on_shell_monitor_reshuffle
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Review via email: mp+107211@code.launchpad.net

Commit message

[shell] Update pips if the geometry of the screen we are on changes which probably means our physical screen

Description of the change

Update pips if the geometry of the screen we are changes

Which might mean our physhical screen changed

To post a comment you must log in.
Revision history for this message
Gerry Boland (gerboland) wrote :

Well the obvious problem I see with this is if you have 2 screens with identical resolutions. Can we not watch the screen number?

review: Needs Information
Revision history for this message
Albert Astals Cid (aacid) wrote :

Maybe you did not understand the problem in the test.

I start with this setup

Screen 0: Pos:0,0 Resolution: 1920x1080

Now i add a new monitor, that monitor is on the right and configured to be the primary monitor, after plugin i have

Screen 0: Pos:1920,0 Resolution: 1920x1080
Screen 1: Pos:0,0 Resolution: 1920x1080

As you can see, the geometry of Screen 0 changed, thus i need to update its pips since the windows that were in that launcher screen aren't there anymore

Revision history for this message
Gerry Boland (gerboland) wrote :

I mis-understood. Yep your fix covers that problem perfectly. Approving!

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

Attempt to merge into lp:unity-2d failed due to conflicts:

text conflict in tests/manual-tests/launcher.txt

1104. By Albert Astals Cid

Merge lp:unity-2d

1105. By Albert Astals Cid

Fix merging minor issue

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'shell/launcher/LauncherList.qml'
2--- shell/launcher/LauncherList.qml 2012-04-25 09:43:11 +0000
3+++ shell/launcher/LauncherList.qml 2012-05-25 07:24:18 +0000
4@@ -391,6 +391,10 @@
5 target: shellManager
6 onActiveWorkspaceChanged: updatePips()
7 }
8+ Connections {
9+ target: declarativeView.screen
10+ onGeometryChanged: updatePips()
11+ }
12 Component.onCompleted: updatePips()
13 }
14 }
15
16=== modified file 'tests/manual-tests/launcher.txt'
17--- tests/manual-tests/launcher.txt 2012-05-24 08:33:50 +0000
18+++ tests/manual-tests/launcher.txt 2012-05-25 07:24:18 +0000
19@@ -176,6 +176,13 @@
20
21 Verify the launcher hides
22 ----
23+ * Have a two monitor setup in which the second monitor becomes screen 0 when plugged
24+ * Start unity-2d-shell with only one monitor plugged
25+ * Start a program
26+ * Plug in the second monitor (which will become screen 0)
27+
28+Verify the launcher of that second monitor does not show if the program we started (and still is) on the first monitor was in that screen
29+----
30 * Plug an external device
31 * Make it busy (e.g. go to it in a terminal)
32 * Try to safe eject the device

Subscribers

People subscribed via source and target branches