[Libreoffice-commits] core.git: vcl/qt5
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Sat May 4 22:59:02 UTC 2019
vcl/qt5/Qt5Widget.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit acbab790126ddeea7ec6b72cffac68b9d01f756d
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Sat May 4 00:55:24 2019 +0000
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun May 5 00:58:09 2019 +0200
Qt5 IM update input position on keypress
At least my ibus installation doesn't ask for the current input
position (Qt::ImCursorRectangle), in comparison to fcitx. So just
as gtk3, we now actively updates the IM position on every
keypress. Fixes the ibus hint window position for me, which would
otherwise be displayed in the top-left screen corner.
Change-Id: I9e5f0fb6b134615bc00cdd169ce8592f01239d20
Reviewed-on: https://gerrit.libreoffice.org/71785
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx
index bef3c61798b4..b25d26092a83 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -27,6 +27,7 @@
#include <QtCore/QMimeData>
#include <QtGui/QDrag>
#include <QtGui/QFocusEvent>
+#include <QtGui/QGuiApplication>
#include <QtGui/QImage>
#include <QtGui/QKeyEvent>
#include <QtGui/QMouseEvent>
@@ -394,6 +395,8 @@ bool Qt5Widget::handleKeyEvent(QKeyEvent* pEvent, bool bDown)
aEvent.mnCode = GetKeyCode(pEvent->key(), pEvent->modifiers());
aEvent.mnCode |= GetKeyModCode(pEvent->modifiers());
+ QGuiApplication::inputMethod()->update(Qt::ImCursorRectangle);
+
bool bStopProcessingKey;
if (bDown)
bStopProcessingKey = m_pFrame->CallCallback(SalEvent::KeyInput, &aEvent);
More information about the Libreoffice-commits
mailing list