From 1f78850989837d060d35241f5fabd5d90f416b19 Mon Sep 17 00:00:00 2001 From: tangjie02 Date: Thu, 10 Aug 2023 16:35:58 +0800 Subject: [PATCH] Fix the problem that variable serial isn't increased when xsettings registry property is updated Signed-off-by: tangjie02 --- ...x-the-problem-that-variable-serial-i.patch | 63 +++++++++++++++++++ kiran-cc-daemon.spec | 6 +- 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 0001-fix-xsettings-Fix-the-problem-that-variable-serial-i.patch diff --git a/0001-fix-xsettings-Fix-the-problem-that-variable-serial-i.patch b/0001-fix-xsettings-Fix-the-problem-that-variable-serial-i.patch new file mode 100644 index 0000000..1882168 --- /dev/null +++ b/0001-fix-xsettings-Fix-the-problem-that-variable-serial-i.patch @@ -0,0 +1,63 @@ +From b4411b9fd05760433c8b15b3a9baa1dbe788a1f0 Mon Sep 17 00:00:00 2001 +From: tangjie02 +Date: Thu, 10 Aug 2023 15:55:34 +0800 +Subject: [PATCH] fix(xsettings): Fix the problem that variable serial isn't + increased when xsettings registry property is updated. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 修复当xsettings registry属性变化时serial变量未递增问题 + +Related #11637 + +Signed-off-by: tangjie02 +--- + plugins/xsettings/xsettings-registry.cpp | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/plugins/xsettings/xsettings-registry.cpp b/plugins/xsettings/xsettings-registry.cpp +index 13472de..4d76599 100644 +--- a/plugins/xsettings/xsettings-registry.cpp ++++ b/plugins/xsettings/xsettings-registry.cpp +@@ -209,19 +209,19 @@ bool XSettingsRegistry::init() + + bool XSettingsRegistry::update(const std::string &name, int32_t value) + { +- auto var = std::make_shared(name, value); ++ auto var = std::make_shared(name, value, this->serial_); + return this->update(var); + } + + bool XSettingsRegistry::update(const std::string &name, const Glib::ustring &value) + { +- auto var = std::make_shared(name, value.raw()); ++ auto var = std::make_shared(name, value.raw(), this->serial_); + return this->update(var); + } + + bool XSettingsRegistry::update(const std::string &name, const XSettingsColor &value) + { +- auto var = std::make_shared(name, value); ++ auto var = std::make_shared(name, value, this->serial_); + return this->update(var); + } + +@@ -282,6 +282,7 @@ bool XSettingsRegistry::notify() + data.append(std::string("\0\0\0", 3)); + data.append(std::string((char *)&this->serial_, 4)); + data.append(std::string((char *)&nsettings, 4)); ++ ++this->serial_; + + // 填充body + for (const auto &iter : this->properties_) +@@ -310,4 +311,4 @@ char XSettingsRegistry::byte_order() + return (*(char *)&myint == 1) ? MSBFirst : LSBFirst; + } + +-} // namespace Kiran +\ No newline at end of file ++} // namespace Kiran +-- +2.36.1 + diff --git a/kiran-cc-daemon.spec b/kiran-cc-daemon.spec index 4bf266d..ff9722e 100644 --- a/kiran-cc-daemon.spec +++ b/kiran-cc-daemon.spec @@ -1,6 +1,6 @@ Name: kiran-cc-daemon Version: 2.5.1 -Release: 17 +Release: 18 Summary: DBus daemon for Kiran Desktop License: MulanPSL-2.0 @@ -21,6 +21,7 @@ Patch0012: 0001-fix-keyboard-Add-capslock-and-numlock-tips-switch.patch Patch0013: 0001-fix-power-Add-battery-charging-and-discharging-time.patch Patch0014: 0001-fix-keyboard-Fix-ci-build-error.patch Patch0015: 0001-fix-display-Fix-nvidia-display-while-no-enabled-moni.patch +Patch0016: 0001-fix-xsettings-Fix-the-problem-that-variable-serial-i.patch BuildRequires: cmake >= 3.2 BuildRequires: pkgconfig(glibmm-2.4) @@ -190,6 +191,9 @@ glib-compile-schemas /usr/share/glib-2.0/schemas &> /dev/nulls || : %{_libdir}/pkgconfig/kiran-cc-daemon.pc %changelog +* Thu Aug 10 2023 tangjie02 - 2.5.1-18 +- KYOS-F: Fix the problem that variable serial isn't increased when xsettings registry property is updated.(#11637) + * Mon Jul 31 2023 meizhigang - 2.5.1-17 - KYOS-F: Fix nvidia display while no enabled monitor (#9609) -- Gitee