[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 30 17:27:39 UTC 2020
vcl/source/window/event.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 2760949d2ffe0bf719ee0d65c5f2103b39811201
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jun 9 16:52:31 2020 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Mon Nov 30 18:27:05 2020 +0100
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>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106891
Tested-by: Szymon Kłos <szymon.klos at collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 31733682c18f..82e248bf3710 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