diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-06-09 16:52:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-06-10 11:03:34 +0200 |
commit | a977df3015f84506a3636d278b981cb2bd12083b (patch) | |
tree | b547c873d635b3a44e8765a4d056f58ee5b23b86 /vcl/source/window/event.cxx | |
parent | f9fb86408e6e06c262332be26674305ae5c05bb7 (diff) |
ignore WB_DIALOGCONTROL state of parent if we're a floating window
for tab key cycling
When WB_DIALOGCONTROL is set the control has sub controls in it and pressing
tab cycles through those widgets, and back to the start.
If a WB_DIALOGCONTROL control is inside a WB_DIALOGCONTROL control
the toplevel container is the one that processes the tab.
But we don't want a floating popup window, like ScCheckListMenuControl, which
has its own toplevel floating window, to pass the tab key to its parent
ScGridWindow for that to process, we want it to stop at the
ScCheckListMenuControl level so it will cycle back to ScCheckListMenuControl's
first child after passing the last one, not into some other child of
ScGridWindow.
ScGridWindow is unusual as a document window to have WB_DIALOGCONTROL set for
its own reasons: i.e. "WB_DIALOGCONTROL needed for UNO-Controls" so this
problem does't arise in other applications
Change-Id: Ib1f02ca4b0bf5bf3b2ed00b5838f8df2e3eb5b7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95957
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/window/event.cxx')
-rw-r--r-- | vcl/source/window/event.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index a31964ecd7fd..23bb7b00a43c 100644 --- a/vcl/source/window/event.cxx +++ b/vcl/source/window/event.cxx @@ -183,7 +183,11 @@ bool Window::EventNotify( NotifyEvent& rNEvt ) // if the parent also has dialog control activated, the parent takes over control if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) || (rNEvt.GetType() == MouseNotifyEvent::KEYUP) ) { - if (ImplIsOverlapWindow() || parentNotDialogControl(this)) + // ScGridWindow has WB_DIALOGCONTROL set, so pressing tab in ScCheckListMenuControl won't + // get processed here by the toplevel DockingWindow of ScCheckListMenuControl by + // just checking if parentNotDialogControl is true + bool bTopLevelFloatingWindow = (pWrapper && pWrapper->IsFloatingMode()); + if (ImplIsOverlapWindow() || parentNotDialogControl(this) || bTopLevelFloatingWindow) { bRet = ImplDlgCtrl( *rNEvt.GetKeyEvent(), rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ); } |