Merge lp:~gerboland/unity-2d/launcher-menu-mouse-focus into lp:unity-2d

Proposed by Gerry Boland
Status: Merged
Approved by: Michał Sawicz
Approved revision: 765
Merged at revision: 766
Proposed branch: lp:~gerboland/unity-2d/launcher-menu-mouse-focus
Merge into: lp:unity-2d
Diff against target: 37 lines (+10/-0)
2 files modified
libunity-2d-private/src/launchermenu.cpp (+9/-0)
libunity-2d-private/src/launchermenu.h (+1/-0)
To merge this branch: bzr merge lp:~gerboland/unity-2d/launcher-menu-mouse-focus
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
Review via email: mp+79861@code.launchpad.net

Description of the change

[launcher] Have ContextualMenu watch for focusOut event. Fixes bug:877388

To post a comment you must log in.
Revision history for this message
Michał Sawicz (saviq) wrote :

Looks good, does this, by any chance, actually fix bug 817417, too?

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

Yes it does actually. Sweet :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libunity-2d-private/src/launchermenu.cpp'
--- libunity-2d-private/src/launchermenu.cpp 2011-08-26 08:51:18 +0000
+++ libunity-2d-private/src/launchermenu.cpp 2011-10-19 17:48:48 +0000
@@ -157,6 +157,14 @@
157}157}
158158
159void159void
160LauncherContextualMenu::focusOutEvent(QFocusEvent* event)
161{
162 /* Hide menu if mouse click outside widget */
163 m_hidingDelayTimer.stop();
164 hide();
165}
166
167void
160LauncherContextualMenu::show(int x, int y)168LauncherContextualMenu::show(int x, int y)
161{169{
162 m_hidingDelayTimer.stop();170 m_hidingDelayTimer.stop();
@@ -304,6 +312,7 @@
304 break;312 break;
305 }313 }
306 }314 }
315 QMenu::setFocus();
307}316}
308317
309void318void
310319
=== modified file 'libunity-2d-private/src/launchermenu.h'
--- libunity-2d-private/src/launchermenu.h 2011-07-29 13:49:34 +0000
+++ libunity-2d-private/src/launchermenu.h 2011-10-19 17:48:48 +0000
@@ -62,6 +62,7 @@
62 void resizeEvent(QResizeEvent* event);62 void resizeEvent(QResizeEvent* event);
63 void leaveEvent(QEvent* event);63 void leaveEvent(QEvent* event);
64 void enterEvent(QEvent* event);64 void enterEvent(QEvent* event);
65 void focusOutEvent(QFocusEvent* event);
65 void paintEvent(QPaintEvent* event);66 void paintEvent(QPaintEvent* event);
66 void keyPressEvent(QKeyEvent* event);67 void keyPressEvent(QKeyEvent* event);
6768

Subscribers

People subscribed via source and target branches