Commit 33550a21 authored by Florian Müllner's avatar Florian Müllner

windows: Stop overriding the Gtk/DecorationLayout xsetting

gnome-settings-daemon monitors the button-layout setting and uses
it to set Gtk/Decoration - unless there's an explicit override.
In the best case, the override matches the setting and it doesn't
make any difference, in all other cases it causes client- and
server-side decorations to go out of sync.

https://bugzilla.gnome.org/show_bug.cgi?id=737533
parent 4c976788
...@@ -30,7 +30,6 @@ class ShowWindowButtons(GSettingsSwitchTweakValue): ...@@ -30,7 +30,6 @@ class ShowWindowButtons(GSettingsSwitchTweakValue):
def __init__(self, name, value, **options): def __init__(self, name, value, **options):
self.value = value self.value = value
self._xsettings = XSettingsOverrides()
GSettingsSwitchTweakValue.__init__(self, GSettingsSwitchTweakValue.__init__(self,
name, name,
"org.gnome.desktop.wm.preferences", "org.gnome.desktop.wm.preferences",
...@@ -51,7 +50,6 @@ class ShowWindowButtons(GSettingsSwitchTweakValue): ...@@ -51,7 +50,6 @@ class ShowWindowButtons(GSettingsSwitchTweakValue):
val = val.replace(self.value+",", "") val = val.replace(self.value+",", "")
self.settings.set_string(self.key_name, val) self.settings.set_string(self.key_name, val)
self._xsettings.set_window_buttons(val.replace(":", "menu:"))
class WindowScalingFactorTweak(Gtk.Box, Tweak): class WindowScalingFactorTweak(Gtk.Box, Tweak):
def __init__(self, **options): def __init__(self, **options):
......
...@@ -235,7 +235,6 @@ class XSettingsOverrides: ...@@ -235,7 +235,6 @@ class XSettingsOverrides:
VARIANT_TYPES = { VARIANT_TYPES = {
'Gtk/ShellShowsAppMenu': GLib.Variant.new_int32, 'Gtk/ShellShowsAppMenu': GLib.Variant.new_int32,
'Gtk/EnablePrimaryPaste': GLib.Variant.new_int32, 'Gtk/EnablePrimaryPaste': GLib.Variant.new_int32,
'Gtk/DecorationLayout': GLib.Variant.new_string,
'Gdk/WindowScalingFactor': GLib.Variant.new_int32, 'Gdk/WindowScalingFactor': GLib.Variant.new_int32,
} }
...@@ -281,8 +280,6 @@ class XSettingsOverrides: ...@@ -281,8 +280,6 @@ class XSettingsOverrides:
self._set_override('Gtk/EnablePrimaryPaste', int(v)) self._set_override('Gtk/EnablePrimaryPaste', int(v))
def get_enable_primary_paste(self): def get_enable_primary_paste(self):
return self._get_override('Gtk/EnablePrimaryPaste', True) return self._get_override('Gtk/EnablePrimaryPaste', True)
def set_window_buttons(self, v):
self._set_override('Gtk/DecorationLayout', v)
def set_window_scaling_factor(self, v): def set_window_scaling_factor(self, v):
self._set_override('Gdk/WindowScalingFactor', int(v)) self._set_override('Gdk/WindowScalingFactor', int(v))
def get_window_scaling_factor(self): def get_window_scaling_factor(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment