summaryrefslogtreecommitdiff
path: root/vcl/source/window/winproc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/winproc.cxx')
-rw-r--r--vcl/source/window/winproc.cxx21
1 files changed, 13 insertions, 8 deletions
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index c1b31962b6a5..280db2325733 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -2165,17 +2165,22 @@ static void ImplHandleSalKeyMod( vcl::Window* pWindow, SalKeyModEvent* pEvent )
// #105224# send commandevent to allow special treatment of Ctrl-LeftShift/Ctrl-RightShift etc.
- // find window
- vcl::Window* pChild = ImplGetKeyInputWindow( pWindow );
- if ( !pChild )
- return;
+ // find window - first look to see if the system window is available
+ vcl::Window* pChild = pWindow->ImplGetWindowImpl()->mpFirstChild;
- // send modkey events only if useful data is available
- if( pEvent->mnModKeyCode != 0 )
+ while ( pChild )
{
- CommandModKeyData data( pEvent->mnModKeyCode );
- ImplCallCommand( pChild, CommandEventId::ModKeyChange, &data );
+ if ( pChild->ImplGetWindowImpl()->mbSysWin )
+ break;
+ pChild = pChild->ImplGetWindowImpl()->mpNext;
}
+ //...if not, try to find a key input window...
+ if (!pChild) ImplGetKeyInputWindow( pWindow );
+ //...otherwise fail safe...
+ if (!pChild) pChild = pWindow;
+
+ CommandModKeyData data( pEvent->mnModKeyCode );
+ ImplCallCommand( pChild, CommandEventId::ModKeyChange, &data );
}
static void ImplHandleInputLanguageChange( vcl::Window* pWindow )