Make use of the new XDP::SettingWatcher constructor
This commit is contained in:
parent
725339be33
commit
9bf89715b1
1 changed files with 5 additions and 11 deletions
|
|
@ -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;
|
||||
}();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue