GNOME Bugzilla – Bug 658069
1 pixel high area in titlebar that doesn't raise the window on click
Last modified: 2011-09-16 22:17:10 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.
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.
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.
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.
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.
just tested, fix looks good here. both the 2 pixel and the top-of-window danger zones are gone. thanks!
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?
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 ...
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.
(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 ;-)
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.
Review of attachment 196771 [details] [review]: Sure.
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