Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
We already changed reset of code to use "isRelease" for
filterEventFallback. This check should be changed accordingly.
  • Loading branch information
wengxt committed Jan 24, 2018
1 parent 1561f18 commit d29dcb0
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions platforminputcontext/qfcitxplatforminputcontext.cpp
Expand Up @@ -19,6 +19,7 @@
*/

#include <QDBusConnection>
#include <QDebug>
#include <QGuiApplication>
#include <QInputMethod>
#include <QKeyEvent>
Expand Down Expand Up @@ -64,15 +65,6 @@ static inline const char *get_locale() {
return locale;
}

struct xkb_context *_xkb_context_new_helper() {
struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
if (context) {
xkb_context_set_log_level(context, XKB_LOG_LEVEL_CRITICAL);
}

return context;
}

static bool objectAcceptsInputMethod() {
bool enabled = false;
QObject *object = qApp->focusObject();
Expand All @@ -85,6 +77,15 @@ static bool objectAcceptsInputMethod() {
return enabled;
}

struct xkb_context *_xkb_context_new_helper() {
struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
if (context) {
xkb_context_set_log_level(context, XKB_LOG_LEVEL_CRITICAL);
}

return context;
}

QFcitxPlatformInputContext::QFcitxPlatformInputContext()
: m_watcher(new FcitxWatcher(this)), m_cursorPos(0),
m_useSurroundingText(false),
Expand Down Expand Up @@ -705,7 +706,7 @@ void QFcitxPlatformInputContext::processKeyEventFinished(

if (!proxy->processKeyEventResult(*watcher)) {
filtered =
filterEventFallback(sym, code, state, type == QEvent::KeyPress);
filterEventFallback(sym, code, state, type == QEvent::KeyRelease);
} else {
filtered = true;
}
Expand Down

0 comments on commit d29dcb0

Please sign in to comment.