Reproduction:
config WindowManager Background Wallpaper /res/wallpapers/grid.png
config WindowManager Background Wallpaper /res/wallpapers/tile.png
The following patch makes this bug easier to watch:
diff --git a/Userland/Libraries/LibConfig/Client.cpp b/Userland/Libraries/LibConfig/Client.cpp
index 3394d22b58..4251bc74e2 100644
--- a/Userland/Libraries/LibConfig/Client.cpp
+++ b/Userland/Libraries/LibConfig/Client.cpp
@@ -77,6 +77,7 @@ void Client::remove_key(StringView domain, StringView group, StringView key)
void Client::notify_changed_string_value(String const& domain, String const& group, String const& key, String const& value)
{
+ dbgln("{} was notified of a change for {}::{}::{}", this, domain, group, key);
Listener::for_each([&](auto& listener) {
listener.config_string_did_change(domain, group, key, value);
});
diff --git a/Userland/Services/ConfigServer/ClientConnection.cpp b/Userland/Services/ConfigServer/ClientConnection.cpp
index d52e2bf237..115a8ef2df 100644
--- a/Userland/Services/ConfigServer/ClientConnection.cpp
+++ b/Userland/Services/ConfigServer/ClientConnection.cpp
@@ -207,6 +207,7 @@ void ClientConnection::write_string_value(String const& domain, String const& gr
start_or_restart_sync_timer();
for_each_monitoring_connection(domain, this, [&domain, &group, &key, &value](ClientConnection& connection) {
+ dbgln("Notifying {} of change", &connection);
connection.async_notify_changed_string_value(domain, group, key, value);
});
}
Example output:
17.122 ConfigServer(9:9): Notifying 0x011a1020 of change
17.122 ConfigServer(9:9): Syncing 1 dirty domains to disk
17.130 FileManager (Desktop)(23:23): 0x02081820 was notified of a change for WindowManager::Background::Wallpaper
17.282 [#0 SyncTask(3:3)]: Ext2FS: Flushed 4 blocks to disk
18.495 ConfigServer(9:9): Notifying 0x011a1020 of change
18.500 ConfigServer(9:9): Syncing 1 dirty domains to disk
18.500 FileManager (Desktop)(23:23): 0x02081820 was notified of a change for WindowManager::Background::Wallpaper
18.750 FileManager (Desktop)(23:23): 0x02081820 was notified of a change for WindowManager::Background::Wallpaper
18.961 FileManager (Desktop)(23:23): 0x02081820 was notified of a change for WindowManager::Background::Wallpaper
19.208 FileManager (Desktop)(23:23): 0x02081820 was notified of a change for WindowManager::Background::Wallpaper
19.391 [#0 SyncTask(3:3)]: Ext2FS: Flushed 4 blocks to disk
19.451 FileManager (Desktop)(23:23): 0x02081820 was notified of a change for WindowManager::Background::Wallpaper
19.698 FileManager (Desktop)(23:23): 0x02081820 was notified of a change for WindowManager::Background::Wallpaper
19.917 FileManager (Desktop)(23:23): 0x02081820 was notified of a change for WindowManager::Background::Wallpaper
Result:
First run of first command will result as expected
First run of second command will result as expected
Additional runs of first command will cause the client to be notified 7 times (exactly). however, the server only says it notifies that client once.
Additional runs of the second command will continue to result as expected.
The logs have a short delay between them. Inverting the command order will make this delay disappear. I assume gird.png
takes slightly longer to load into a bitmap than tile.png
.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too