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 658069 - 1 pixel high area in titlebar that doesn't raise the window on click
1 pixel high area in titlebar that doesn't raise the window on click
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
3.1.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-09-02 15:53 UTC by Sebastian Keller
Modified: 2011-09-16 22:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
frames: Add back silly condition (751 bytes, patch)
2011-09-15 20:05 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
frames: Fall back to title bar if nothing else matched (1.05 KB, patch)
2011-09-16 17:12 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
frames: Fall back to title bar if nothing else matched (929 bytes, patch)
2011-09-16 19:30 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Sebastian Keller 2011-09-02 15:53:59 UTC
In the titlebar there is a 1px high area right above the menubar that when you click on it focuses the window, but  doesn't raise it. Neither can you drag the window using this area.
This is on 3.1.90.1 and I don't think I have seen this in 3.1.4, so it probably got introduced in the changes to allow aa-corners and increased resize areas.
Comment 1 Adam Williamson 2011-09-08 20:34:38 UTC
seeing this too. For me it's 2px high and it's not *right* above the menu bar, but a few pixels above it. There's a few pixels below the 'danger zone' but above the menu bar which cause a correct switch.

Seeing this in 3.1.90 and 3.1.91 in current F16.
Comment 2 Adam Williamson 2011-09-08 20:43:01 UTC
for me, the very top of the titlebar is also a danger zone, which is why I'm hitting this so often - I have two monitors and Firefox is maximized across the entire right-hand screen, so to switch to the Firefox window, I usually just shove my mouse a long way upwards and click.

actually that seems to be the case only for that Firefox window; on the left-hand monitor I have a similarly maximized Evo window, but the Shell panel is above it, and I can't reproduce the bug with the very top of Evo's title bar, only with the 'just above the menubar' danger zone.

So it seems like there's a danger zone at the very top of the titlebar of a window that's maximized to the very top of my right-hand monitor, but not at the very top of the titlebar of a window that's maximized under a panel on the left-hand monitor. Interesting.
Comment 3 Adam Williamson 2011-09-08 20:44:32 UTC
also note that once you trigger the bug, you can cause a proper raise by clicking anywhere else in the titlebar, but not by clicking anywhere else in the *window*. If I click a danger zone and trigger the big, repeatedly clicking on the danger zone doesn't foreground the window; neither does clicking anywhere outside of the titlebar; but clicking somewhere in the titlebar that's not a danger zone *does* trigger a correct foregrounding.
Comment 4 Jasper St. Pierre (not reading bugmail) 2011-09-15 20:05:35 UTC
Created attachment 196670 [details] [review]
frames: Add back silly condition

--

OK, the actual issue is because of this silly title_border item in the frame geometry. It's not used while painting the title background, just for button layout and input. In Adwaita, the title_border bottom is set to 2, which is this gap. The original frames.c get_control_rect had an if test similar to this. I removed it, thinking it was unnecessary and confusing. I'm not entirely sure what title_border is meant for.
Comment 5 Adam Williamson 2011-09-15 21:59:35 UTC
just tested, fix looks good here. both the 2 pixel and the top-of-window danger zones are gone. thanks!
Comment 6 drago01 2011-09-16 16:56:57 UTC
Review of attachment 196670 [details] [review]:

Seems to work fine ... but can we have a better commit message / subject and probably even a comment in the code as well?
Comment 7 Florian Müllner 2011-09-16 16:58:57 UTC
Review of attachment 196670 [details] [review]:

Re-adding that snippet fixes the problem, so the code looks good. The commit message on the other hand ...
Comment 8 Jasper St. Pierre (not reading bugmail) 2011-09-16 17:12:06 UTC
Created attachment 196752 [details] [review]
frames: Fall back to title bar if nothing else matched

With a non-zero title_border, there would that many "dead pixels"
where there were no controls since the title_rect is a bit smaller.
Since I'm not sure how/what title_border is supposed to be used for,
fall back to the title bar if nothing else matched and the cursor
is above the client window.
Comment 9 Florian Müllner 2011-09-16 18:09:14 UTC
(In reply to comment #8)
> Created an attachment (id=196752) [details] [review]
> frames: Fall back to title bar if nothing else matched
> 
> With a non-zero title_border, there would that many "dead pixels"

ENOPARSE.


> Since I'm not sure how/what title_border is supposed to be used for,
> fall back to the title bar if nothing else matched and the cursor
> is above the client window.

"I don't know what this is, I'll just do this" would sound a lot less scarier if you mentioned that this is restoring code that was removed recently ;-)
Comment 10 Jasper St. Pierre (not reading bugmail) 2011-09-16 19:30:01 UTC
Created attachment 196771 [details] [review]
frames: Fall back to title bar if nothing else matched

The condition got removed in eeb2efe01001fef7655b2ba95ca1456f7fe9214b but that
had a side effect of adding a couple of rows of dead pixels so add it back.
Comment 11 Florian Müllner 2011-09-16 21:50:20 UTC
Review of attachment 196771 [details] [review]:

Sure.
Comment 12 Jasper St. Pierre (not reading bugmail) 2011-09-16 22:17:04 UTC
Attachment 196752 [details] pushed as 5f1c3de - frames: Fall back to title bar if nothing else matched
Attachment 196771 [details] pushed as 5f1c3de - frames: Fall back to title bar if nothing else matched