Make use of the new XDP::SettingWatcher constructor

This commit is contained in:
Ilya Fedin 2023-09-17 16:03:57 +04:00 committed by John Preston
parent 725339be33
commit 9bf89715b1

View file

@ -71,17 +71,11 @@ TitleControls::Layout TitleControlsLayout() {
}
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
using XDPSettingWatcher = base::Platform::XDP::SettingWatcher;
static const XDPSettingWatcher settingWatcher(
[=](
const Glib::ustring &group,
const Glib::ustring &key,
const Glib::VariantBase &value) {
if (group == "org.gnome.desktop.wm.preferences"
&& key == "button-layout") {
NotifyTitleControlsLayoutChanged();
}
});
namespace XDP = base::Platform::XDP;
static const XDP::SettingWatcher settingWatcher(
"org.gnome.desktop.wm.preferences",
"button-layout",
[] { NotifyTitleControlsLayoutChanged(); });
return true;
}();