diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2020-02-20 08:14:36 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2020-02-20 10:38:45 +0100 |
commit | 69e708868f6046cada955a16bca966370ce3218a (patch) | |
tree | 58a136b543a42992cff839d99a76563f0044fa66 | |
parent | 91df0fcf7642059c5c2e5a98eabdff348b6254dd (diff) |
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@posteo.de>
-rw-r--r-- | vcl/qt5/Qt5Widget.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |