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
=== modified file 'libunity-2d-private/src/indicatorentrywidget.cpp'
--- libunity-2d-private/src/indicatorentrywidget.cpp 2012-03-20 10:58:24 +0000
+++ libunity-2d-private/src/indicatorentrywidget.cpp 2012-04-23 16:05:24 +0000
@@ -353,6 +353,11 @@
353 m_activatedByThisEntry = true;353 m_activatedByThisEntry = true;
354}354}
355355
356bool IndicatorEntryWidget::activatedByThisEntry() const
357{
358 return m_activatedByThisEntry;
359}
360
356void IndicatorEntryWidget::setPadding(int padding)361void IndicatorEntryWidget::setPadding(int padding)
357{362{
358 if (m_padding != padding) {363 if (m_padding != padding) {
359364
=== modified file 'libunity-2d-private/src/indicatorentrywidget.h'
--- libunity-2d-private/src/indicatorentrywidget.h 2012-03-09 14:18:09 +0000
+++ libunity-2d-private/src/indicatorentrywidget.h 2012-04-23 16:05:24 +0000
@@ -61,6 +61,8 @@
61 */61 */
62 void showMenu(Qt::MouseButton button);62 void showMenu(Qt::MouseButton button);
6363
64 bool activatedByThisEntry() const;
65
64Q_SIGNALS:66Q_SIGNALS:
65 void isEmptyChanged();67 void isEmptyChanged();
6668
6769
=== modified file 'panel/applets/appname/menubarwidget.cpp'
--- panel/applets/appname/menubarwidget.cpp 2012-03-10 02:18:49 +0000
+++ panel/applets/appname/menubarwidget.cpp 2012-04-23 16:05:24 +0000
@@ -165,7 +165,7 @@
165 if (!id.empty()) {165 if (!id.empty()) {
166 // We only cares about menubar entries166 // We only cares about menubar entries
167 Q_FOREACH(IndicatorEntryWidget* widget, m_widgetList) {167 Q_FOREACH(IndicatorEntryWidget* widget, m_widgetList) {
168 if (widget->entry()->id() == id) {168 if (widget->entry()->id() == id && widget->activatedByThisEntry()) {
169 isOpened = true;169 isOpened = true;
170 break;170 break;
171 }171 }
172172
=== modified file 'tests/manual-tests/panel.txt'
--- tests/manual-tests/panel.txt 2012-04-05 09:46:21 +0000
+++ tests/manual-tests/panel.txt 2012-04-23 16:05:24 +0000
@@ -35,3 +35,9 @@
35 * Click on the desktop.35 * Click on the desktop.
36 * Verify that desktop menu is available again when mouse is over it.36 * Verify that desktop menu is available again when mouse is over it.
37----37----
38 * Have two monitors of exact same resolution side by side
39 * Have launcher set in autohide mode
40 * Get a firefox window to occupy the total width of the two screens
41 * Open a menu item in the first screen
42 * Verify the menu shows in the first screen and not in the second
43----

Subscribers

People subscribed via source and target branches