Fix fdo#84795 Menu, DropDown-List not disappears with right mouse click
Set for menu and float-list-box the PopupModeFlags to FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK + FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE Improving the comments Change-Id: I313e4ec38637fa3d46567e08bdb9560ce8475b6a Reviewed-on: https://gerrit.libreoffice.org/11881 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
This commit is contained in:
committed by
Samuel Mehrbrodt
parent
faa6455995
commit
53c836701e
@@ -3073,7 +3073,10 @@ void ImplListBoxFloatingWindow::StartFloat( bool bStartTracking )
|
|||||||
if( pGrandparent->ImplIsAntiparallel() )
|
if( pGrandparent->ImplIsAntiparallel() )
|
||||||
pGrandparentOutDev->ReMirror( aRect );
|
pGrandparentOutDev->ReMirror( aRect );
|
||||||
|
|
||||||
StartPopupMode( aRect, FLOATWIN_POPUPMODE_DOWN );
|
// mouse-button right: close the List-Box-Float-win and don't stop the handling fdo#84795
|
||||||
|
const sal_uLong nFlags = FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK | FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE;
|
||||||
|
|
||||||
|
StartPopupMode( aRect, FLOATWIN_POPUPMODE_DOWN | nFlags );
|
||||||
|
|
||||||
if( nPos != LISTBOX_ENTRY_NOTFOUND )
|
if( nPos != LISTBOX_ENTRY_NOTFOUND )
|
||||||
mpImplLB->ShowProminentEntry( nPos );
|
mpImplLB->ShowProminentEntry( nPos );
|
||||||
|
@@ -2816,7 +2816,8 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, sal_
|
|||||||
WinBits nStyle = WB_BORDER;
|
WinBits nStyle = WB_BORDER;
|
||||||
if (bRealExecute)
|
if (bRealExecute)
|
||||||
nPopupModeFlags |= FLOATWIN_POPUPMODE_NEWLEVEL;
|
nPopupModeFlags |= FLOATWIN_POPUPMODE_NEWLEVEL;
|
||||||
if (!pStartedFrom || !pStartedFrom->IsMenuBar())
|
|
||||||
|
// mouse-button right: close the sub-menu (float-win) and don't stop the handling fdo#84795
|
||||||
nPopupModeFlags |= FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK | FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE;
|
nPopupModeFlags |= FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK | FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE;
|
||||||
|
|
||||||
nPopupModeFlags |= FLOATWIN_POPUPMODE_NOKEYCLOSE;
|
nPopupModeFlags |= FLOATWIN_POPUPMODE_NOKEYCLOSE;
|
||||||
|
@@ -101,7 +101,7 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& rMousePo
|
|||||||
pLastLevelFloat = pSVData->maWinData.mpFirstFloat->ImplFindLastLevelFloat();
|
pLastLevelFloat = pSVData->maWinData.mpFirstFloat->ImplFindLastLevelFloat();
|
||||||
nPopupFlags = pLastLevelFloat->GetPopupModeFlags();
|
nPopupFlags = pLastLevelFloat->GetPopupModeFlags();
|
||||||
pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL );
|
pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL );
|
||||||
return true;
|
return false; // don't stop the handling fdo#84795
|
||||||
}
|
}
|
||||||
else if ( nHitTest == HITTEST_RECT )
|
else if ( nHitTest == HITTEST_RECT )
|
||||||
{
|
{
|
||||||
@@ -381,7 +381,7 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, sal_uInt16 nSVEvent, bool bMous
|
|||||||
// #106845# if the window was disabed during capturing we have to pass the mouse events to release capturing
|
// #106845# if the window was disabed during capturing we have to pass the mouse events to release capturing
|
||||||
if ( pSVData->maWinData.mpCaptureWin != pChild && (!pChild->IsEnabled() || !pChild->IsInputEnabled() || pChild->IsInModalNonRefMode() ) )
|
if ( pSVData->maWinData.mpCaptureWin != pChild && (!pChild->IsEnabled() || !pChild->IsInputEnabled() || pChild->IsInModalNonRefMode() ) )
|
||||||
{
|
{
|
||||||
ImplHandleMouseFloatMode( pChild, aMousePos, nCode, nSVEvent, bMouseLeave );
|
bool bStopHdl = ImplHandleMouseFloatMode( pChild, aMousePos, nCode, nSVEvent, bMouseLeave );
|
||||||
if ( nSVEvent == EVENT_MOUSEMOVE )
|
if ( nSVEvent == EVENT_MOUSEMOVE )
|
||||||
{
|
{
|
||||||
ImplHandleMouseHelpRequest( pChild, aMousePos );
|
ImplHandleMouseHelpRequest( pChild, aMousePos );
|
||||||
@@ -401,6 +401,8 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, sal_uInt16 nSVEvent, bool bMous
|
|||||||
pChild->ImplNotifyKeyMouseCommandEventListeners( aNEvt );
|
pChild->ImplNotifyKeyMouseCommandEventListeners( aNEvt );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(bStopHdl) // mouse-button left: don't stop the handling for the click fdo#84795
|
||||||
|
{
|
||||||
if ( nSVEvent == EVENT_MOUSEBUTTONDOWN )
|
if ( nSVEvent == EVENT_MOUSEBUTTONDOWN )
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
@@ -412,6 +414,7 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, sal_uInt16 nSVEvent, bool bMous
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// End ExtTextInput-Mode, if the user click in the same TopLevel Window
|
// End ExtTextInput-Mode, if the user click in the same TopLevel Window
|
||||||
if ( pSVData->maWinData.mpExtTextInputWin &&
|
if ( pSVData->maWinData.mpExtTextInputWin &&
|
||||||
|
Reference in New Issue
Block a user