GNOME Bugzilla – Bug 736974
Too many buttons in client-side window decorations!
Last modified: 2014-09-19 19:28:17 UTC
Since bug 730629 we are supposed to sync the Gtk/DecorationLayout xsetting with the correct wm setting. Except that I'm stupid, so we occasionally end up using the classic schema in a normal session :-( I'll attach two possible fixes, not quite sure which one I prefer ...
Created attachment 286627 [details] [review] xsettings: Fix swapping out of WM settings schemas Until we get session-specific defaults in GSettings, we pick up the button-layout setting from different schemas depending on whether we are running in classic mode or not. However there is a serious thinko in the current implementation: When running in classic mode, the settings value is swapped with the one from the classic schema, otherwise it is used directly - which turns out to be wrong when the value itself is taken from the classic schema, e.g. during initialization or when the classic value changed. Fix this by ignoring the passed in value and picking the actual one from the appropriate schema.
Created attachment 286628 [details] [review] xsettings: Fix swapping out of WM settings schemas Until we get session-specific defaults in GSettings, we pick up the button-layout setting from different schemas depending on whether we are running in classic mode or not. However there is a serious thinko in the current implementation: When running in classic mode, the settings value is swapped with the one from the classic schema, otherwise it is used directly - which turns out to be wrong when the value itself is taken from the classic schema, e.g. during initialization or when the classic value changed. Avoid this confusion by not trying to add the classic schema unless actually running in a classic session.
Review of attachment 286628 [details] [review]: looks right to me... I think i would mention in the commit message the problem is triggered by a spurious change event at start up. freeze break?
Comment on attachment 286627 [details] [review] xsettings: Fix swapping out of WM settings schemas (I auto-obsoleted the first alternative, but halfline figured it out anyway and reviewed the one he liked better)
(In reply to comment #4) > (I auto-obsoleted the first alternative, but halfline figured it out anyway and > reviewed the one he liked better) Small tidbit aside - while waiting for the freeze break, it occurred to me that I should check GTK+ as well (which does something similar on wayland) ... turns out that the code there already looks suspiciously like the first variant [0] :-) [0] https://git.gnome.org/browse/gtk+/tree/gdk/wayland/gdkscreen-wayland.c#n726
Attachment 286628 [details] pushed as a3e3513 - xsettings: Fix swapping out of WM settings schemas