summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-12-03 00:43:04 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-12-03 03:56:11 +0100
commit204e3eb3813524bf21aae58a76f54f29b969e9ed (patch)
treebab75cc120a7237e71f5d6cb4ea9c3de09f506a7 /vcl
parent06842a8583d3d77de74964cdce4fba811818bf90 (diff)
ugly hack to avoid virtual method in Window
Change-Id: I7ffc13167f5ecbfe3afab6451e1ef52e81130d48
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/vcl/window.hxx5
-rw-r--r--vcl/source/window/window.cxx9
-rw-r--r--vcl/source/window/winproc.cxx4
3 files changed, 12 insertions, 6 deletions
diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx
index 9ba556ce9507..6eabe159200b 100644
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -811,7 +811,10 @@ public:
*/
sal_Bool IsInModalMode() const;
- virtual bool IsInRefMode() const;
+ /**
+ * Necessary for calc ref input handling from modal dialogs
+ */
+ bool IsInModalNonRefMode() const;
void SetActivateMode( sal_uInt16 nMode );
sal_uInt16 GetActivateMode() const;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index d1ea694eebcd..fd96248026f1 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3974,7 +3974,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags )
}
// If the Window is disabled, then we don't change the focus
- if ( !IsEnabled() || !IsInputEnabled() /*|| IsInModalMode()*/ )
+ if ( !IsEnabled() || !IsInputEnabled() || IsInModalNonRefMode() )
return;
// we only need to set the focus if it is not already set
@@ -9275,9 +9275,12 @@ sal_Bool Window::IsInModalMode() const
return (mpWindowImpl->mpFrameWindow->mpWindowImpl->mpFrameData->mnModalMode != 0);
}
-bool Window::IsInRefMode() const
+bool Window::IsInModalNonRefMode() const
{
- return false;
+ if(mpWindowImpl->mnStyle & WB_REFMODE)
+ return false;
+
+ return IsInModalMode();
}
void Window::ImplIncModalCount()
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index b3494a1cff8e..56fc9b15fdfd 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -238,7 +238,7 @@ static void ImplHandleMouseHelpRequest( Window* pChild, const Point& rMousePos )
nHelpMode |= HELPMODE_BALLOON;
if ( nHelpMode )
{
- if ( pChild->IsInputEnabled() /*&& ! pChild->IsInModalMode() */)
+ if ( pChild->IsInputEnabled() && !pChild->IsInModalNonRefMode() )
{
HelpEvent aHelpEvent( rMousePos, nHelpMode );
pSVData->maHelpData.mbRequestingHelp = sal_True;
@@ -449,7 +449,7 @@ long ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse
// no mouse messages to disabled windows
// #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->IsInModalMode() && !pChild->IsInRefMode())*/ ) )
+ if ( pSVData->maWinData.mpCaptureWin != pChild && (!pChild->IsEnabled() || !pChild->IsInputEnabled() || pChild->IsInModalNonRefMode() ) )
{
ImplHandleMouseFloatMode( pChild, aMousePos, nCode, nSVEvent, bMouseLeave );
if ( nSVEvent == EVENT_MOUSEMOVE )