After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 633796 - Minimize, Maximize, Close buttons on title bar not visible when compiling w/o gconf
Minimize, Maximize, Close buttons on title bar not visible when compiling w/o...
Status: RESOLVED DUPLICATE of bug 570044
Product: metacity
Classification: Other
Component: general
2.30.x
Other Linux
: Normal major
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2010-11-02 11:02 UTC by Stormshadow
Modified: 2015-04-16 11:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stormshadow 2010-11-02 11:02:58 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.
Comment 1 Stormshadow 2010-11-04 08:08:09 UTC
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.
Comment 2 Alberts Muktupāvels 2015-04-16 11:17:17 UTC

*** This bug has been marked as a duplicate of bug 570044 ***