GNOME Bugzilla – Bug 394787
Menu button doesn't use pressed state
Last modified: 2016-08-18 13:35:31 UTC
Please describe the problem: When I define a "pressed" state for the menu button in Metacity, the menu button still doesn't change when clicked. Steps to reproduce: Actual results: Expected results: Does this happen every time? Yes Other information:
Are you talking about Metacity's themes?
(In reply to comment #1) > Are you talking about Metacity's themes? > Yes. I made a theme that defines button state = "pressed" for the menu button. And that is tied to drawing operations drawing a pressed in bevel. But it never shows when pressing the button. Though the prelight state works.
I can confirm this bug occurs; I was playing with a Metacity theme on the weekend and noticed this exact same behaviour: holding the left-mouse-button down over the menu button on the titlebar does not cause the "pressed" state to display. Steps to reproduce: 1. Configure Metacity to use the Metabox theme (other themes exhibit the same effect, but this is a standard well-known theme and should eliminate per-theme bugs). 2. Find a window with a minimize button (again, other buttons will work, but for the sake of a reproducable test case...) 3. Hold down the mouse button on the minimize button. 4. Notice that the background of the minimize button is a darker shade than the surrounding titlebar. 5. Hold down the mouse button on the menu button. 6. Compare the colour of the menu-button background with the colour of the surrounding titlebar. Actual results: - Colour is identical. Expected results: - Colour is darker, like it was with the minimize button. If I had more than fifteen minutes before going to bed, I'd whip up a ultra-simple Metacity theme that drew normal buttons in red and pressed buttons in green to highlight the difference, but I'll leave that for now. I'm using Metacity 2.22.0 on Debian Unstable: -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: powerpc (ppc64) Kernel: Linux 2.6.26-1-powerpc64 (SMP w/1 CPU core) Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash
Created attachment 123171 [details] A simple test-case theme. This theme is a simple bare-bones test case theme. Buttons in the NORMAL state have normal colours, buttons in the PRELIGHT state are red, and buttons in the ACTIVE state are green. These colours work perfectly for buttons like minimize and close, but menu never turns green, it goes back to NORMAL. Hypothesis: when the menu pops up, it grabs the mouse and Metacity assumes the mouse is no longer being held down so it reverts the button to the normal state.
I just noticed the same bug and ask my brother (Benjamin Berg) about it. He supports the hypothesis, meaning he came up with the same one independently. I guess it's hard to fix but it still should be fixed. Thanks!