[Libreoffice-commits] core.git: vcl/qt5
Michael Weghorn (via logerrit)
logerrit at kemper.freedesktop.org
Thu Feb 20 09:39:20 UTC 2020
vcl/qt5/Qt5Widget.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 69e708868f6046cada955a16bca966370ce3218a
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Thu Feb 20 08:14:36 2020 +0100
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Thu Feb 20 10:38:45 2020 +0100
tdf#130794 qt5: Actually, ignore non-spontaneous QEvent::ShortcutOverride
In fact, the assumption in commit
034f56015c1c7a61faede33fb5306f63b5585632
("tdf#126785 qt5: Ignore external QEvent::ShortcutOverride") was
a fallacy and it's exactly the other way around:
"Normal" typing leads to "spontaneous" events of type
QEvent::ShortcutOverride, since those originate from
outside, are triggered via X11 events or Wayland equivalent,
and the non-spontaneous ones are the additional ones that
happen when e.g. the Orca screen reader is enabled.
In a short test, no non-spontaneous QEvent::ShortcutOverride
ever occured when using LibreOffice a bit with Orca disabled
on X11 or Wayland (and on Wayland also not with Orca enabled,
since Qt accessibility is broken there, s. QTBUG-73945 [1]).
(Side note: In a quick test with Qt 5.12.5 and Plasma on Wayland,
'xcbSourceDispatch' from Qt library's qxcbeventdispatcher.cpp
was also used in the Wayland case to when processing the keyboard
events).
[1] https://bugreports.qt.io/browse/QTBUG-73945
Change-Id: I1be1977e67f84fa657f6fc197e0b91822b6a3a2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89073
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx
index 0bca51ea55c8..27b617a91568 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -450,12 +450,12 @@ bool Qt5Widget::handleEvent(Qt5Frame& rFrame, const QWidget& rWidget, QEvent* pE
{
if (pEvent->type() == QEvent::ShortcutOverride)
{
- // ignore QEvent::ShortcutOverride events originating from outside the application,
+ // ignore non-spontaneous QEvent::ShortcutOverride events,
// since such an extra event is sent e.g. with Orca screen reader enabled,
- // so that two events of that kind (the "real one" and one from outside)
+ // so that two events of that kind (the "real one" and a non-spontaneous one)
// would otherwise be processed, resulting in duplicate input as 'handleKeyEvent'
// is called below (s. tdf#122053)
- if (pEvent->spontaneous())
+ if (!pEvent->spontaneous())
{
return false;
}
More information about the Libreoffice-commits
mailing list