sd/source/ui/toolpanel/LayoutMenu.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
New commits: commit 35a45a4508ca4156ebaa4f17df776a971084160d Author: Faisal M. Al-Otaibi <fmalota...@kacst.edu.sa> Date: Sun Feb 3 08:17:01 2013 +0300 fdo#60213- fix the right-click misbehavior Change-Id: Iea44c9e70efeb84482aefc70b311f1781241b030 Reviewed-on: https://gerrit.libreoffice.org/1971 Reviewed-by: Norbert Thiebaud <nthieb...@gmail.com> Tested-by: Norbert Thiebaud <nthieb...@gmail.com> diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx index b602b2f..24bcdc1 100644 --- a/sd/source/ui/toolpanel/LayoutMenu.cxx +++ b/sd/source/ui/toolpanel/LayoutMenu.cxx @@ -857,13 +857,15 @@ void LayoutMenu::Command (const CommandEvent& rEvent) { if (GetShellManager() != NULL) GetShellManager()->MoveToTop(this); + Point aPosition (0,0); if (rEvent.IsMouseEvent()) { // Do not show the context menu when the mouse was not // pressed over an item. + // We have to explicitly specify the location of the menu + // when the LayoutMenu is undocked if (GetItemId(rEvent.GetMousePosPixel()) > 0) - mrBase.GetViewFrame()->GetDispatcher()->ExecutePopup( - SdResId(RID_TASKPANE_LAYOUTMENU_POPUP)); + aPosition = rEvent.GetMousePosPixel(); } else { @@ -873,13 +875,13 @@ void LayoutMenu::Command (const CommandEvent& rEvent) if (GetSelectItemId() != (sal_uInt16)-1) { Rectangle aBBox (GetItemRect(GetSelectItemId())); - Point aPosition (aBBox.Center()); - mrBase.GetViewFrame()->GetDispatcher()->ExecutePopup( + aPosition = aBBox.Center(); + } + } + mrBase.GetViewFrame()->GetDispatcher()->ExecutePopup( SdResId(RID_TASKPANE_LAYOUTMENU_POPUP), this, &aPosition); - } - } } break; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits