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

Proposed by Albert Astals Cid
Status: Merged
Approved by: Gerry Boland
Approved revision: 1080
Merged at revision: 1079
Proposed branch: lp:~aacid/unity-2d/menu_wrong_screen
Merge into: lp:unity-2d
Diff against target: 55 lines (+14/-1)
4 files modified
libunity-2d-private/src/indicatorentrywidget.cpp (+5/-0)
libunity-2d-private/src/indicatorentrywidget.h (+2/-0)
panel/applets/appname/menubarwidget.cpp (+1/-1)
tests/manual-tests/panel.txt (+6/-0)
To merge this branch: bzr merge lp:~aacid/unity-2d/menu_wrong_screen
Reviewer Review Type Date Requested Status
Gerry Boland Pending
Review via email: mp+103117@code.launchpad.net

Commit message

[panel] [multi-monitor] Only consider a menubarwidget open if the entry activated belongs to that menubarwidget and not to one in a different screen

Fixes menu item opening in the wrong screen when a window has exact same area on multiple screens.

Description of the change

Only consider a menubarwidget open if the entry activated belongs to that menubarwidget and not to one in a different screen

Fixes menu item opening in the wrong screen when a window is "maximized" over two screens
UNBLOCK

To post a comment you must log in.
Revision history for this message
Unity Merger (unity-merger) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libunity-2d-private/src/indicatorentrywidget.cpp'
2--- libunity-2d-private/src/indicatorentrywidget.cpp 2012-03-20 10:58:24 +0000
3+++ libunity-2d-private/src/indicatorentrywidget.cpp 2012-04-23 16:05:24 +0000
4@@ -353,6 +353,11 @@
5 m_activatedByThisEntry = true;
6 }
7
8+bool IndicatorEntryWidget::activatedByThisEntry() const
9+{
10+ return m_activatedByThisEntry;
11+}
12+
13 void IndicatorEntryWidget::setPadding(int padding)
14 {
15 if (m_padding != padding) {
16
17=== modified file 'libunity-2d-private/src/indicatorentrywidget.h'
18--- libunity-2d-private/src/indicatorentrywidget.h 2012-03-09 14:18:09 +0000
19+++ libunity-2d-private/src/indicatorentrywidget.h 2012-04-23 16:05:24 +0000
20@@ -61,6 +61,8 @@
21 */
22 void showMenu(Qt::MouseButton button);
23
24+ bool activatedByThisEntry() const;
25+
26 Q_SIGNALS:
27 void isEmptyChanged();
28
29
30=== modified file 'panel/applets/appname/menubarwidget.cpp'
31--- panel/applets/appname/menubarwidget.cpp 2012-03-10 02:18:49 +0000
32+++ panel/applets/appname/menubarwidget.cpp 2012-04-23 16:05:24 +0000
33@@ -165,7 +165,7 @@
34 if (!id.empty()) {
35 // We only cares about menubar entries
36 Q_FOREACH(IndicatorEntryWidget* widget, m_widgetList) {
37- if (widget->entry()->id() == id) {
38+ if (widget->entry()->id() == id && widget->activatedByThisEntry()) {
39 isOpened = true;
40 break;
41 }
42
43=== modified file 'tests/manual-tests/panel.txt'
44--- tests/manual-tests/panel.txt 2012-04-05 09:46:21 +0000
45+++ tests/manual-tests/panel.txt 2012-04-23 16:05:24 +0000
46@@ -35,3 +35,9 @@
47 * Click on the desktop.
48 * Verify that desktop menu is available again when mouse is over it.
49 ----
50+ * Have two monitors of exact same resolution side by side
51+ * Have launcher set in autohide mode
52+ * Get a firefox window to occupy the total width of the two screens
53+ * Open a menu item in the first screen
54+ * Verify the menu shows in the first screen and not in the second
55+----

Subscribers

People subscribed via source and target branches