Kaydet (Commit) acbab790 authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski

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: 's avatarJan-Marek Glogowski <glogow@fbihome.de>
üst da310336
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <QtCore/QMimeData> #include <QtCore/QMimeData>
#include <QtGui/QDrag> #include <QtGui/QDrag>
#include <QtGui/QFocusEvent> #include <QtGui/QFocusEvent>
#include <QtGui/QGuiApplication>
#include <QtGui/QImage> #include <QtGui/QImage>
#include <QtGui/QKeyEvent> #include <QtGui/QKeyEvent>
#include <QtGui/QMouseEvent> #include <QtGui/QMouseEvent>
...@@ -394,6 +395,8 @@ bool Qt5Widget::handleKeyEvent(QKeyEvent* pEvent, bool bDown) ...@@ -394,6 +395,8 @@ bool Qt5Widget::handleKeyEvent(QKeyEvent* pEvent, bool bDown)
aEvent.mnCode = GetKeyCode(pEvent->key(), pEvent->modifiers()); aEvent.mnCode = GetKeyCode(pEvent->key(), pEvent->modifiers());
aEvent.mnCode |= GetKeyModCode(pEvent->modifiers()); aEvent.mnCode |= GetKeyModCode(pEvent->modifiers());
QGuiApplication::inputMethod()->update(Qt::ImCursorRectangle);
bool bStopProcessingKey; bool bStopProcessingKey;
if (bDown) if (bDown)
bStopProcessingKey = m_pFrame->CallCallback(SalEvent::KeyInput, &aEvent); bStopProcessingKey = m_pFrame->CallCallback(SalEvent::KeyInput, &aEvent);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment