Kaydet (Commit) 454f5c30 authored tarafından Caolán McNamara's avatar Caolán McNamara

Revert "Fix fdo#84795 Menu, DropDown-List not disappears with right mouse click"

This reverts commit 53c83670.

because it means that all disabled buttons get their "click" delivered
so disabled buttons are only visually disabled.

e.g. writer: insert->table->autoformat, click on the disabled "rename" or "add"
or "remove" and the sub dialog appears. Or in calc insert->object->chart and
click on the disabled "back" -> crash
üst 908d1b6e
......@@ -3073,10 +3073,7 @@ void ImplListBoxFloatingWindow::StartFloat( bool bStartTracking )
if( pGrandparent->ImplIsAntiparallel() )
pGrandparentOutDev->ReMirror( aRect );
// 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 );
StartPopupMode( aRect, FLOATWIN_POPUPMODE_DOWN );
if( nPos != LISTBOX_ENTRY_NOTFOUND )
mpImplLB->ShowProminentEntry( nPos );
......
......@@ -2816,9 +2816,8 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, sal_
WinBits nStyle = WB_BORDER;
if (bRealExecute)
nPopupModeFlags |= FLOATWIN_POPUPMODE_NEWLEVEL;
// mouse-button right: close the sub-menu (float-win) and don't stop the handling fdo#84795
nPopupModeFlags |= FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK | FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE;
if (!pStartedFrom || !pStartedFrom->IsMenuBar())
nPopupModeFlags |= FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK | FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE;
nPopupModeFlags |= FLOATWIN_POPUPMODE_NOKEYCLOSE;
......
......@@ -101,7 +101,7 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& rMousePo
pLastLevelFloat = pSVData->maWinData.mpFirstFloat->ImplFindLastLevelFloat();
nPopupFlags = pLastLevelFloat->GetPopupModeFlags();
pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL );
return false; // don't stop the handling fdo#84795
return true;
}
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
if ( pSVData->maWinData.mpCaptureWin != pChild && (!pChild->IsEnabled() || !pChild->IsInputEnabled() || pChild->IsInModalNonRefMode() ) )
{
bool bStopHdl = ImplHandleMouseFloatMode( pChild, aMousePos, nCode, nSVEvent, bMouseLeave );
ImplHandleMouseFloatMode( pChild, aMousePos, nCode, nSVEvent, bMouseLeave );
if ( nSVEvent == EVENT_MOUSEMOVE )
{
ImplHandleMouseHelpRequest( pChild, aMousePos );
......@@ -401,18 +401,15 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, sal_uInt16 nSVEvent, bool bMous
pChild->ImplNotifyKeyMouseCommandEventListeners( aNEvt );
}
if(bStopHdl) // mouse-button left: don't stop the handling for the click fdo#84795
if ( nSVEvent == EVENT_MOUSEBUTTONDOWN )
return true;
else
{
if ( nSVEvent == EVENT_MOUSEBUTTONDOWN )
return true;
else
{
// Set normal MousePointer for disabled windows
if ( nSVEvent == EVENT_MOUSEMOVE )
ImplSetMousePointer( pChild );
// Set normal MousePointer for disabled windows
if ( nSVEvent == EVENT_MOUSEMOVE )
ImplSetMousePointer( pChild );
return false;
}
return false;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment