Merge lp:~ivenvd/compiz/compiz.kwd-appmenu-position into lp:compiz/0.9.9

Proposed by Iven Hsu
Status: Merged
Approved by: Daniel van Vugt
Approved revision: 3529
Merged at revision: 3529
Proposed branch: lp:~ivenvd/compiz/compiz.kwd-appmenu-position
Merge into: lp:compiz/0.9.9
Diff against target: 17 lines (+6/-1)
1 file modified
kde/window-decorator-kde4/window.cpp (+6/-1)
To merge this branch: bzr merge lp:~ivenvd/compiz/compiz.kwd-appmenu-position
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+139656@code.launchpad.net

Description of the change

In the original code, the position of the appmenu is not recalculated based
on the client window geometry. This commit fixes it, and now the menu popups
at the right postion instead of left-top corner.
(LP: #1089863)

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Cool, thanks. Could you create a bug for the problem please?

Revision history for this message
Iven Hsu (ivenvd) wrote :

@Daniel Done. :)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It's KDE so I'm not going to test it. Looks fine and I'll trust you :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'kde/window-decorator-kde4/window.cpp'
2--- kde/window-decorator-kde4/window.cpp 2012-12-04 15:45:55 +0000
3+++ kde/window-decorator-kde4/window.cpp 2012-12-13 10:40:26 +0000
4@@ -566,7 +566,12 @@
5 void
6 KWD::Window::showApplicationMenu (const QPoint &p)
7 {
8- QList<QVariant> args = QList<QVariant> () << p.x () << p.y () << qulonglong (mClientId);
9+ QPoint pnt = mDecor->widget ()->mapFromGlobal (p);
10+
11+ pnt += QPoint (mGeometry.x () - mBorder.left - mPadding.left,
12+ mGeometry.y () - mBorder.top - mPadding.top);
13+
14+ QList<QVariant> args = QList<QVariant> () << pnt.x () << pnt.y () << qulonglong (mClientId);
15 QDBusMessage method = QDBusMessage::createMethodCall (
16 KDED_SERVICE, KDED_APPMENU_PATH, KDED_INTERFACE, "showMenu");
17 method.setArguments (args);

Subscribers

People subscribed via source and target branches