mirror of https://gitee.com/openkylin/fcitx5.git
同步fcitx上游客户端应用程序控制虚拟键盘可见性的代码
1. 将客户端应用程序控制虚拟键盘可见性的dbus接口改为与fcitx上游一致 2. 需要确保使用旧的dbus接口的fcitx5-frontend-qt5不能与新的fcitx共存
This commit is contained in:
parent
102d8a0517
commit
be0dfe1354
|
@ -209,6 +209,7 @@ Breaks:
|
||||||
fcitx5-module-fcitx4 (<< 5.0.4-2),
|
fcitx5-module-fcitx4 (<< 5.0.4-2),
|
||||||
fcitx5-module-ibus (<< 5.0.4-2),
|
fcitx5-module-ibus (<< 5.0.4-2),
|
||||||
fcitx5-module-kimpanel (<< 5.0.4-2),
|
fcitx5-module-kimpanel (<< 5.0.4-2),
|
||||||
|
fcitx5-frontend-qt5 (<= 5.0.14-0ok3kylin0k0.1tablet5),
|
||||||
Replaces:
|
Replaces:
|
||||||
fcitx5-module-dbus (<< 5.0.4-2),
|
fcitx5-module-dbus (<< 5.0.4-2),
|
||||||
fcitx5-module-fcitx4 (<< 5.0.4-2),
|
fcitx5-module-fcitx4 (<< 5.0.4-2),
|
||||||
|
|
|
@ -85,13 +85,6 @@ public:
|
||||||
dbus::Bus *bus() { return bus_; }
|
dbus::Bus *bus() { return bus_; }
|
||||||
Instance *instance() { return module_->instance(); }
|
Instance *instance() { return module_->instance(); }
|
||||||
|
|
||||||
private:
|
|
||||||
static bool checkUseDefaultFocusBehavior(
|
|
||||||
std::unordered_map<std::string, std::string> &strMap,
|
|
||||||
const std::string &defaultFocusBehaviorName);
|
|
||||||
static void updateUseDefaultFocusBehavior(
|
|
||||||
InputContext &ic, std::unordered_map<std::string, std::string> &strMap);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FCITX_OBJECT_VTABLE_METHOD(createInputContext, "CreateInputContext",
|
FCITX_OBJECT_VTABLE_METHOD(createInputContext, "CreateInputContext",
|
||||||
"a(ss)", "oay");
|
"a(ss)", "oay");
|
||||||
|
@ -498,28 +491,6 @@ InputMethod1::createInputContext(
|
||||||
ic->path(), std::vector<uint8_t>(ic->uuid().begin(), ic->uuid().end()));
|
ic->path(), std::vector<uint8_t>(ic->uuid().begin(), ic->uuid().end()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
|
||||||
bool InputMethod1::checkUseDefaultFocusBehavior(
|
|
||||||
std::unordered_map<std::string, std::string> &strMap,
|
|
||||||
const std::string &defaultFocusBehaviorName) {
|
|
||||||
const std::string *useDefaultFocusBehavior =
|
|
||||||
findValue(strMap, defaultFocusBehaviorName);
|
|
||||||
return useDefaultFocusBehavior == nullptr ||
|
|
||||||
*useDefaultFocusBehavior != "false";
|
|
||||||
}
|
|
||||||
|
|
||||||
// static
|
|
||||||
void InputMethod1::updateUseDefaultFocusBehavior(
|
|
||||||
InputContext &ic, std::unordered_map<std::string, std::string> &strMap) {
|
|
||||||
bool useDefaultFocusInBehavior =
|
|
||||||
checkUseDefaultFocusBehavior(strMap, "useDefaultFocusInBehavior");
|
|
||||||
ic.setUseDefaultFocusInBehavior(useDefaultFocusInBehavior);
|
|
||||||
|
|
||||||
bool useDefaultFocusOutBehavior =
|
|
||||||
checkUseDefaultFocusBehavior(strMap, "useDefaultFocusOutBehavior");
|
|
||||||
ic.setUseDefaultFocusOutBehavior(useDefaultFocusOutBehavior);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::tuple<std::vector<DBusBlockedEvent>, bool>
|
std::tuple<std::vector<DBusBlockedEvent>, bool>
|
||||||
DBusInputContext1::processKeyEventBatch(uint32_t keyval, uint32_t keycode,
|
DBusInputContext1::processKeyEventBatch(uint32_t keyval, uint32_t keycode,
|
||||||
uint32_t state, bool isRelease,
|
uint32_t state, bool isRelease,
|
||||||
|
|
Loading…
Reference in New Issue