GNOME Bugzilla – Bug 757044
Button layout preference ignored
Last modified: 2016-01-12 21:30:01 UTC
In current version of metacity button layout can not be changed. I digged source code, and found in src/core/prefs.c option button-layout from org.gnome.desktop.wm.preferences must be used. But it's seems to be ignored. After digging further i tracked down issue to release 3.17.2 where this was broken. I cloned code from git, and found exact source of problem: > commit: 5e694c3935c838bb2d1179d3cbb6da61f433a5c1 > Author: Alberts Muktupāvels <alberts.muktupavels@gmail.com> 2015-06-04 17:04:51 > prefs: use button layout from GtkSettings So, i tried to change Gtk DecorationLayout, following this page: http://roman-yagodin.github.io/how-to/2015/05/24/gtk-decoration-layout/ (by editing ~/.config/gtk-3.0/setting.ini) Seems like it does not work either. This can be fixed by reverting that commit (i just reverted it myself, compiled, works as expected) > gsettings set org.gnome.desktop.wm.preferences button-layout 'close,maximize,minimize:menu' window control button now on the left side. Or someone must investigate why it does not respect button-layout from GtkSettings, i don't have much expirience with gtk or c.
What desktop environment do you use? gnome-settings-daemon reads button-layout and translates to gtk-decoration-layout metacity use GtkSettings to get gtk-decoration-layout and translates back to button-layout. In GNOME-Flashback environment gnome-flashback application will overwrite changes from gnome-settings-daemon since we need different button-layout and there is still no way to set different default values for different sessions. So if you use GNOME Flashback desktop environment then you can change button-layout with dconf editor - org.gnome.gnome-flashback.workarounds fix-button-layout. If you use other desktop environment then most likely there is application that changes gtk-decoration-layout - that is why using settings.ini does not work. gnome-settings-daemon and/or unity-settings-daemon has xsettings plugin were you can set Gtk/DecorationLayout. org.gnome.settings-daemon.plugins.xsettings overrides. There you can set your layout - {'Gtk/DecorationLayout': <'your-botton-layout'>}. I will revert this only when this bug will be fixed: https://bugzilla.gnome.org/show_bug.cgi?id=746592 I might change this so gtk-decoration-layout is only used in GNOME-Flashback and in other environments still use button-layout...
I use gnome-flashback. I changed fix-button-layout to empty string, and now my decorations works as expected. Hovewer, if i set fix-button-layout to "close,maximize,minimize:menu", there is no "menu" button at the left.
First I guess you mean - at the right not left, right? button-layout: menu, appmenu, minimize, maximize, close Gtk/DecorationLayout: icon, menu, minimize, maximize, close So 'menu' button in button-layout is not same thing in fix-button-layout (Gtk/DecorationLayout). If you use "close,maximize,minimize:menu" in button-layout then in fix-button-layout right value is "close,maximize,minimize:icon". But with this you will be missing application menu in CSD windows. So maybe you want this - "close,maximize,minimize:menu,icon"?
Oh, yes, on the right! And maybe i want "...:menu,icon" But in this case CSD show "application menu with icon" and next to it just icon. It would be nice to have something like "menu_or_icon" that displays menu button for CSD and icon for non-CSD.
Created attachment 314517 [details] [review] prefs: use Gtk/DecorationLayout only under GNOME-Flashback
(In reply to Sergey Tereschenko from comment #4) > Oh, yes, on the right! > > And maybe i want "...:menu,icon" > But in this case CSD show "application menu with icon" and next to it just > icon. Why do you want menu button? You can access it by right clicking on title bar... > It would be nice to have something like "menu_or_icon" that displays menu > button for CSD and icon for non-CSD. There is no icon button for non-CSD... I guess then you can do this: 1) org.gnome.gnome-flashback.workarounds fix-button-layout - set to empty string. 2) org.gnome.desktop.wm.preferences button-layout - set to "close,maximize,minimize:menu" (this is for non-CSD windows). 3) org.gnome.settings-daemon.plugins.xsettings overrides - set to {'Gtk/DecorationLayout': <'close,maximize,minimize:menu'>} (this is for CSD window). Is that what you wanted?
Oh, sorry, still there will be menu + icon in CSD windows... :(
Yes, i wanted that. But it works not quite as expected( Setting Gtk/DecorationLayout overrides not only CSD but non-CSD too. So, i leave it with default value. Now, i set this: > dconf write /org/gnome/gnome-flashback/workarounds/fix-button-layout "''" > gsettings set org.gnome.desktop.wm.preferences button-layout "close,maximize,minimize:appmenu" And i have "buttons:nothing" for non-CSD And "buttons:appmenu" for CSD. If i set org.gnome.desktop.wm.preferences to close,maximize,minimize:menu, Then i have "buttons:menu" for non-CSD And "buttons:nothing" for CSD. For now i would use first variant. Thanks for help!