Merge lp:~azzar1/unity/fix-820293 into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Mirco Müller
Approved revision: no longer in the source branch.
Merged at revision: 1437
Proposed branch: lp:~azzar1/unity/fix-820293
Merge into: lp:unity
Diff against target: 24 lines (+6/-1)
1 file modified
plugins/unityshell/src/PanelMenuView.cpp (+6/-1)
To merge this branch: bzr merge lp:~azzar1/unity/fix-820293
Reviewer Review Type Date Requested Status
Mirco Müller (community) Approve
Review via email: mp+72415@code.launchpad.net

Description of the change

Doesn't show the application menu when the launcher is a little left/bottom/up to window buttons.

To test:
* Maximize a window
* Move the mouse a little left to window buttons.
* The application should NOT be shown.

I've used absolute values so it works also on multi-head setup (I've tested and at least in my case it works fine).

To post a comment you must log in.
Revision history for this message
Mirco Müller (macslow) wrote :

Looks alright, verified it working.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/unityshell/src/PanelMenuView.cpp'
--- plugins/unityshell/src/PanelMenuView.cpp 2011-08-19 15:17:30 +0000
+++ plugins/unityshell/src/PanelMenuView.cpp 2011-08-22 12:32:33 +0000
@@ -257,6 +257,11 @@
257 {257 {
258 found_area = _window_buttons->FindAreaUnderMouse(mouse_position, event_type);258 found_area = _window_buttons->FindAreaUnderMouse(mouse_position, event_type);
259 NUX_RETURN_VALUE_IF_NOTNULL(found_area, found_area);259 NUX_RETURN_VALUE_IF_NOTNULL(found_area, found_area);
260
261 // #820293
262 if (mouse_position.x <= _window_buttons->GetAbsoluteX() + _window_buttons->GetAbsoluteWidth())
263 return NULL;
264
260 }265 }
261266
262 if (_panel_titlebar_grab_area)267 if (_panel_titlebar_grab_area)
@@ -1129,7 +1134,7 @@
11291134
1130void1135void
1131PanelMenuView::OnPanelViewMouseEnter(int x, int y, unsigned long mouse_button_state, unsigned long special_keys_state)1136PanelMenuView::OnPanelViewMouseEnter(int x, int y, unsigned long mouse_button_state, unsigned long special_keys_state)
1132{1137{
1133 if (_is_inside != true)1138 if (_is_inside != true)
1134 {1139 {
1135 if (_is_grabbed)1140 if (_is_grabbed)