[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 10 09:04:09 UTC 2020
vcl/source/window/event.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit a977df3015f84506a3636d278b981cb2bd12083b
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jun 9 16:52:31 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jun 10 11:03:34 2020 +0200
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 at redhat.com>
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 );
}
More information about the Libreoffice-commits
mailing list