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

Proposed by Andrea Azzarone on 2011-08-22
Status: Merged
Approved by: Mirco Müller on 2011-08-25
Approved revision: 1405
Merged at revision: 1437
Proposed branch: lp:~andyrock/unity/fix-820293
Merge into: lp:unity
Diff against target: 24 lines (+6/-1) 1 file modified
To merge this branch: bzr merge lp:~andyrock/unity/fix-820293
Reviewer Review Type Date Requested Status
Mirco Müller 2011-08-22 Approve on 2011-08-25
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.
Mirco Müller (macslow) wrote :

Looks alright, verified it working.

review: Approve

Preview Diff

1=== modified file 'plugins/unityshell/src/PanelMenuView.cpp'
2--- plugins/unityshell/src/PanelMenuView.cpp 2011-08-19 15:17:30 +0000
3+++ plugins/unityshell/src/PanelMenuView.cpp 2011-08-22 12:32:33 +0000
4@@ -257,6 +257,11 @@
5 {
6 found_area = _window_buttons->FindAreaUnderMouse(mouse_position, event_type);
7 NUX_RETURN_VALUE_IF_NOTNULL(found_area, found_area);
8+
9+ // #820293
10+ if (mouse_position.x <= _window_buttons->GetAbsoluteX() + _window_buttons->GetAbsoluteWidth())
11+ return NULL;
12+
13 }
14
15 if (_panel_titlebar_grab_area)
16@@ -1129,7 +1134,7 @@
17
18 void
19 PanelMenuView::OnPanelViewMouseEnter(int x, int y, unsigned long mouse_button_state, unsigned long special_keys_state)
20-{
21+{
22 if (_is_inside != true)
23 {
24 if (_is_grabbed)