Merge lp:~aacid/unity-2d/unity-2d-shell_resize_shell_on_desktop_resize into lp:~unity-2d-team/unity-2d/unity-2d-shell

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michał Sawicz
Approved revision: 924
Merged at revision: 925
Proposed branch: lp:~aacid/unity-2d/unity-2d-shell_resize_shell_on_desktop_resize
Merge into: lp:~unity-2d-team/unity-2d/unity-2d-shell
Diff against target: 38 lines (+10/-0)
2 files modified
shell/app/shelldeclarativeview.cpp (+9/-0)
shell/app/shelldeclarativeview.h (+1/-0)
To merge this branch: bzr merge lp:~aacid/unity-2d/unity-2d-shell_resize_shell_on_desktop_resize
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
Review via email: mp+89727@code.launchpad.net

Description of the change

[shell] Update shell position on desktop work area resize

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :
Revision history for this message
Michał Sawicz (saviq) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'shell/app/shelldeclarativeview.cpp'
2--- shell/app/shelldeclarativeview.cpp 2012-01-19 14:40:22 +0000
3+++ shell/app/shelldeclarativeview.cpp 2012-01-23 16:28:29 +0000
4@@ -98,6 +98,7 @@
5 }
6
7 //connect(desktop, SIGNAL(resized(int)), SLOT(updateDashModeDependingOnScreenGeometry()));
8+ connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), SLOT(updateShellPosition(int)));
9 }
10
11 // TODO: this is probably expressed more nicely in QML.
12@@ -114,6 +115,14 @@
13 }
14
15 void
16+ShellDeclarativeView::updateShellPosition(int screen)
17+{
18+ if (screen == QX11Info::appScreen()) {
19+ move(QApplication::desktop()->availableGeometry(screen).topLeft());
20+ }
21+}
22+
23+void
24 ShellDeclarativeView::focusOutEvent(QFocusEvent* event)
25 {
26 Unity2DDeclarativeView::focusOutEvent(event);
27
28=== modified file 'shell/app/shelldeclarativeview.h'
29--- shell/app/shelldeclarativeview.h 2012-01-13 11:39:29 +0000
30+++ shell/app/shelldeclarativeview.h 2012-01-23 16:28:29 +0000
31@@ -110,6 +110,7 @@
32
33 private Q_SLOTS:
34 void updateDashModeDependingOnScreenGeometry();
35+ void updateShellPosition(int screen);
36
37 private:
38 void focusOutEvent(QFocusEvent* event);

Subscribers

People subscribed via source and target branches