Fix the problem that variable serial isn't increased when xsettings registry property is updated
Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
This commit is contained in:
parent
1ac2e13c43
commit
1f78850989
@ -0,0 +1,63 @@
|
||||
From b4411b9fd05760433c8b15b3a9baa1dbe788a1f0 Mon Sep 17 00:00:00 2001
|
||||
From: tangjie02 <tangjie02@kylinsec.com.cn>
|
||||
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 <tangjie02@kylinsec.com.cn>
|
||||
---
|
||||
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<XSettingsPropertyInt>(name, value);
|
||||
+ auto var = std::make_shared<XSettingsPropertyInt>(name, value, this->serial_);
|
||||
return this->update(var);
|
||||
}
|
||||
|
||||
bool XSettingsRegistry::update(const std::string &name, const Glib::ustring &value)
|
||||
{
|
||||
- auto var = std::make_shared<XSettingsPropertyString>(name, value.raw());
|
||||
+ auto var = std::make_shared<XSettingsPropertyString>(name, value.raw(), this->serial_);
|
||||
return this->update(var);
|
||||
}
|
||||
|
||||
bool XSettingsRegistry::update(const std::string &name, const XSettingsColor &value)
|
||||
{
|
||||
- auto var = std::make_shared<XSettingsPropertyColor>(name, value);
|
||||
+ auto var = std::make_shared<XSettingsPropertyColor>(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
|
||||
|
||||
@ -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 <tangjie02@kylinsec.com.cn> - 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 <meizhigang@kylinsec.com.cn> - 2.5.1-17
|
||||
- KYOS-F: Fix nvidia display while no enabled monitor (#9609)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user