GNOME Bugzilla – Bug 633796
Minimize, Maximize, Close buttons on title bar not visible when compiling w/o gconf
Last modified: 2015-04-16 11:17:17 UTC
Metacity 2.30.3 was built with the following configure options: --enable-compositor --disable-gconf --disable-scrollkeeper --disable-schemas-install --disable-verbose-mode --disable-sm --disable-startup-notification Such a configuration should satisfy embedded systems where the use of gconf is not required. Configure correctly and fittingly warns me that 'hacks' in the code would be required if certain preferences are to be changed. I hardcoded the use of the "Human" theme inside prefs.c and set up my system with this theme which has png images and support for the maximize, minimize and close buttons in the titlebar inside the theme. However on launching Metacity, everything comes up apart from the titlebar max/min/close icons. The menu icon - to the left of the titlebar - appears and functions correctly. The right icons are the only ones missing. Closer inspection of prefs.c reveals that the routine init_button_layout() is using the structure MetaButtonLayout incorrectly: Currently: init_button_layout(void) { MetaButtonLayout button_layout_ltr = { { /* buttons in the group on the left side */ META_BUTTON_FUNCTION_MENU, META_BUTTON_FUNCTION_LAST }, { /* buttons in the group on the right side */ META_BUTTON_FUNCTION_MINIMIZE, META_BUTTON_FUNCTION_MAXIMIZE, META_BUTTON_FUNCTION_CLOSE, META_BUTTON_FUNCTION_LAST } }; ... }; Structure definition inside common.h: typedef struct _MetaButtonLayout MetaButtonLayout; struct _MetaButtonLayout { /* buttons in the group on the left side */ MetaButtonFunction left_buttons[MAX_BUTTONS_PER_CORNER]; gboolean left_buttons_has_spacer[MAX_BUTTONS_PER_CORNER]; /* buttons in the group on the right side */ MetaButtonFunction right_buttons[MAX_BUTTONS_PER_CORNER]; gboolean right_buttons_has_spacer[MAX_BUTTONS_PER_CORNER]; }; The following did the trick and the buttons to the right of the titlebar appeared and functioned as expected: init_button_layout(void) { MetaButtonLayout button_layout_ltr = { { /* buttons in the group on the left side */ META_BUTTON_FUNCTION_MENU, META_BUTTON_FUNCTION_LAST }, {}, { /* buttons in the group on the right side */ META_BUTTON_FUNCTION_MINIMIZE, META_BUTTON_FUNCTION_MAXIMIZE, META_BUTTON_FUNCTION_CLOSE, META_BUTTON_FUNCTION_LAST }, {} }; ... }; Same thing for button_layout_rtl.
Is it possible to have some feedback regarding this please? The issue was reported many months ago too (Bug #570044) and no reply was given.
*** This bug has been marked as a duplicate of bug 570044 ***