Merge lp:~aacid/unity-2d/fix_xmotionevent_sending into lp:unity-2d

Proposed by Albert Astals Cid
Status: Merged
Approved by: MichaƂ Sawicz
Approved revision: 980
Merged at revision: 983
Proposed branch: lp:~aacid/unity-2d/fix_xmotionevent_sending
Merge into: lp:unity-2d
Diff against target: 41 lines (+11/-3)
2 files modified
libunity-2d-private/src/indicatorsmanager.cpp (+3/-3)
tests/manual-tests/panel.txt (+8/-0)
To merge this branch: bzr merge lp:~aacid/unity-2d/fix_xmotionevent_sending
Reviewer Review Type Date Requested Status
Gerry Boland Pending
Review via email: mp+97061@code.launchpad.net

Description of the change

Fix delivery of fake XMotionEvent

The pos/relPos were switched and send relPos based on the outer QWidget not the inner one

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :

This should fix the problem in MM with the secondary screen menubar not being activated when the indicators menu is open

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

Can you please add a manual test for this please?

Revision history for this message
Albert Astals Cid (aacid) wrote :

Manual test added

980. By Albert Astals Cid

Manual test

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libunity-2d-private/src/indicatorsmanager.cpp'
2--- libunity-2d-private/src/indicatorsmanager.cpp 2011-10-14 21:01:28 +0000
3+++ libunity-2d-private/src/indicatorsmanager.cpp 2012-03-13 09:09:18 +0000
4@@ -145,18 +145,18 @@
5 QWidget* widget = QApplication::widgetAt(pos);
6 Display* display = QX11Info::display();
7
8- QPoint relPos = widget != 0 ? widget->mapFromGlobal(pos) : pos;
9+ QPoint relPos = widget != 0 ? widget->window()->mapFromGlobal(pos) : pos;
10 XMotionEvent event = {
11 MotionNotify,
12 0,
13 False,
14 display,
15- widget != 0 ? widget->effectiveWinId() : 0,
16+ widget != 0 ? widget->window()->effectiveWinId() : 0,
17 widget != 0 ? RootWindow(display, widget->x11Info().screen()) : 0,
18 0,
19 CurrentTime,
20+ relPos.x(), relPos.y(),
21 pos.x(), pos.y(),
22- relPos.x(), relPos.y(),
23 0,
24 False,
25 True
26
27=== modified file 'tests/manual-tests/panel.txt'
28--- tests/manual-tests/panel.txt 2012-02-14 12:43:09 +0000
29+++ tests/manual-tests/panel.txt 2012-03-13 09:09:18 +0000
30@@ -12,3 +12,11 @@
31 * Hit super key to Open Dash.
32
33 --> Verify top panel is transparent
34+----
35+ * Have a two monitor setup in a side by side configuration
36+ * Open a program and move its window to the rightmost monitor
37+ * Make sure that window is the active one
38+ * Click on the indicators in the panel of the rightmost monitor
39+ * While the indicators menu is open, move the mouse to the left over the menu area of the rightmost monitor
40+
41+--> Verify menu appears

Subscribers

People subscribed via source and target branches