Connect to title layout changes right in TitleControlsLayout on Linux
This commit is contained in:
parent
4d865f8313
commit
b82cdd7e58
1 changed files with 9 additions and 0 deletions
|
|
@ -259,6 +259,15 @@ bool ShowWindowMenu(QWindow *window) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TitleControls::Layout TitleControlsLayout() {
|
TitleControls::Layout TitleControlsLayout() {
|
||||||
|
if (static auto Once = false; !std::exchange(Once, true)) {
|
||||||
|
const auto integration = base::Platform::GtkIntegration::Instance();
|
||||||
|
if (integration && integration->checkVersion(3, 12, 0)) {
|
||||||
|
integration->connectToSetting(
|
||||||
|
"gtk-decoration-layout",
|
||||||
|
NotifyTitleControlsLayoutChanged);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const auto gtkResult = []() -> std::optional<TitleControls::Layout> {
|
const auto gtkResult = []() -> std::optional<TitleControls::Layout> {
|
||||||
const auto integration = base::Platform::GtkIntegration::Instance();
|
const auto integration = base::Platform::GtkIntegration::Instance();
|
||||||
if (!integration || !integration->checkVersion(3, 12, 0)) {
|
if (!integration || !integration->checkVersion(3, 12, 0)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue