Enter from event loop in the portal title controls layout watcher

This commit is contained in:
Ilya Fedin 2024-03-13 03:57:29 +04:00 committed by John Preston
parent fb1716c91f
commit 6bce493029

View file

@ -8,6 +8,8 @@
#include "base/platform/linux/base_linux_xdp_utilities.h" #include "base/platform/linux/base_linux_xdp_utilities.h"
#include "base/integration.h"
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION #ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
#include "base/platform/linux/base_linux_xsettings.h" #include "base/platform/linux/base_linux_xsettings.h"
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION #endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
@ -75,7 +77,11 @@ TitleControls::Layout TitleControlsLayout() {
static const XDP::SettingWatcher settingWatcher( static const XDP::SettingWatcher settingWatcher(
"org.gnome.desktop.wm.preferences", "org.gnome.desktop.wm.preferences",
"button-layout", "button-layout",
[] { NotifyTitleControlsLayoutChanged(); }); [] {
base::Integration::Instance().enterFromEventLoop([] {
NotifyTitleControlsLayoutChanged();
});
});
return true; return true;
}(); }();