SHA256
1
0
forked from pool/fcitx5
Files
fcitx5/fcitx5-gcc7.patch
Fuminobu Takeyama 486976c789 Rebased the fix of Fcitx 5 start up problem.
- Add fcitx-autostart to check $INPUT_METHOD so that fcitx5 does
  not breake the other input methods
  * Fix boo#1246418
  * Add fcitx5-autostart.patch

OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx5?expand=0&rev=65
2025-08-07 15:54:47 +00:00

63 lines
2.5 KiB
Diff

Index: fcitx5-5.1.11/src/frontend/ibusfrontend/ibusfrontend.cpp
===================================================================
--- fcitx5-5.1.11.orig/src/frontend/ibusfrontend/ibusfrontend.cpp
+++ fcitx5-5.1.11/src/frontend/ibusfrontend/ibusfrontend.cpp
@@ -598,23 +598,39 @@ private:
FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY(
contentType, "ContentType", "(uu)",
([]() -> dbus::DBusStruct<uint32_t, uint32_t> { return {0, 0}; }),
+#if __GNC__ < 9
+ ([&](dbus::DBusStruct<uint32_t, uint32_t> type) {
+#else
([this](dbus::DBusStruct<uint32_t, uint32_t> type) {
+#endif
setContentType(std::get<0>(type), std::get<1>(type));
}),
dbus::PropertyOption::Hidden);
FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY(
clientCommitPreedit, "ClientCommitPreedit", "(b)",
+#if __GNC__ < 9
+ ([&]() -> dbus::DBusStruct<bool> { return {clientCommitPreedit_}; }),
+ ([&](dbus::DBusStruct<bool> value) {
+#else
([this]() -> dbus::DBusStruct<bool> { return {clientCommitPreedit_}; }),
([this](dbus::DBusStruct<bool> value) {
+#endif
clientCommitPreedit_ = std::get<0>(value);
}),
dbus::PropertyOption::Hidden);
FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY(
effectivePostProcessKeyEvent, "EffectivePostProcessKeyEvent", "(b)",
+#if __GNC__ < 9
+ ([&]() -> dbus::DBusStruct<bool> {
+ return {effectivePostProcessKeyEvent_};
+ }),
+ ([&](dbus::DBusStruct<bool> value) {
+#else
([this]() -> dbus::DBusStruct<bool> {
return {effectivePostProcessKeyEvent_};
}),
([this](dbus::DBusStruct<bool> value) {
+#endif
effectivePostProcessKeyEvent_ = std::get<0>(value);
}),
dbus::PropertyOption::Hidden);
Index: fcitx5-5.1.11/test/testdbus.cpp
===================================================================
--- fcitx5-5.1.11.orig/test/testdbus.cpp
+++ fcitx5-5.1.11/test/testdbus.cpp
@@ -70,8 +70,13 @@ private:
FCITX_OBJECT_VTABLE_PROPERTY(testProperty, "testProperty", "i",
[]() { return 5; });
FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY(
+#if __GNUC__ < 9
+ testProperty2, "testProperty2", "i", [&]() { return prop2; },
+ [&](int32_t v) { prop2 = v; });
+#else
testProperty2, "testProperty2", "i", [this]() { return prop2; },
[this](int32_t v) { prop2 = v; });
+#endif
};
#define TEST_SERVICE "org.fcitx.Fcitx.TestDBus"