New upstream version 1.2.2
Boyuan Yang
6 years ago
18 | 18 | */ |
19 | 19 | |
20 | 20 | #include <QDBusConnection> |
21 | #include <QDebug> | |
21 | 22 | #include <QGuiApplication> |
22 | 23 | #include <QInputMethod> |
23 | 24 | #include <QKeyEvent> |
63 | 64 | return locale; |
64 | 65 | } |
65 | 66 | |
66 | struct xkb_context *_xkb_context_new_helper() { | |
67 | struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS); | |
68 | if (context) { | |
69 | xkb_context_set_log_level(context, XKB_LOG_LEVEL_CRITICAL); | |
70 | } | |
71 | ||
72 | return context; | |
73 | } | |
74 | ||
75 | 67 | static bool objectAcceptsInputMethod() { |
76 | 68 | bool enabled = false; |
77 | 69 | QObject *object = qApp->focusObject(); |
82 | 74 | } |
83 | 75 | |
84 | 76 | return enabled; |
77 | } | |
78 | ||
79 | struct xkb_context *_xkb_context_new_helper() { | |
80 | struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS); | |
81 | if (context) { | |
82 | xkb_context_set_log_level(context, XKB_LOG_LEVEL_CRITICAL); | |
83 | } | |
84 | ||
85 | return context; | |
85 | 86 | } |
86 | 87 | |
87 | 88 | QFcitxPlatformInputContext::QFcitxPlatformInputContext() |
704 | 705 | |
705 | 706 | if (!proxy->processKeyEventResult(*watcher)) { |
706 | 707 | filtered = |
707 | filterEventFallback(sym, code, state, type == QEvent::KeyPress); | |
708 | filterEventFallback(sym, code, state, type == QEvent::KeyRelease); | |
708 | 709 | } else { |
709 | 710 | filtered = true; |
710 | 711 | } |