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
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)