[PATCH] fdo#60213- fix the right-click misbehavior
Faisal al-otaibi (via Code Review)
gerrit at gerrit.libreoffice.org
Sat Feb 2 21:21:13 PST 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/1971
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/71/1971/1
fdo#60213- fix the right-click misbehavior
Change-Id: Iea44c9e70efeb84482aefc70b311f1781241b030
---
M sd/source/ui/toolpanel/LayoutMenu.cxx
1 file changed, 8 insertions(+), 6 deletions(-)
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 @@
{
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 @@
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;
--
To view, visit https://gerrit.libreoffice.org/1971
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea44c9e70efeb84482aefc70b311f1781241b030
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Faisal al-otaibi <fmalotaibi at kacst.edu.sa>
More information about the LibreOffice
mailing list