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 97703 - maximize button doesn't extend to top-right pixel of frame (fitt's law)
maximize button doesn't extend to top-right pixel of frame (fitt's law)
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
unspecified
Other other
: Normal enhancement
: future
Assigned To: Thomas Thurman
Metacity maintainers list
: 131325 158653 333939 341516 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-11-05 06:27 UTC by Wayne Schuller
Modified: 2006-08-07 18:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
cheap-ass hack to the simple theme to do this (3.59 KB, patch)
2004-01-27 01:13 UTC, Martijn Vernooij
none Details | Review
Make it possible to click above and beside the buttons as well as on them (7.88 KB, patch)
2006-08-03 00:03 UTC, Thomas Thurman
none Details | Review
Same again, but only works when maximised and has better field names (8.40 KB, patch)
2006-08-06 02:43 UTC, Thomas Thurman
committed Details | Review

Description Wayne Schuller 2002-11-05 06:27:39 UTC
I've been using metacity as it comes in RH 8.0 (bluecurve theme).

But I noticed that if a window is maximised (which most of mine are), and
you scroll the mouse into the top right hand corner and click, it actually
doesn't activate the close window button.

The same applies for the top left corner, or anywhere along the top.

I don't alway believe in fitts law... but in this case, when you have a
window maximised, I think it should apply to the top and top corners.

metacity and rh 8.0 rock, by the way. Good work.
Comment 1 Heath Harrelson 2002-11-05 06:53:03 UTC
If I understand bug 82542, this is a function of the theme, rather
than Metacity itself.
Comment 2 Heath Harrelson 2002-11-05 06:55:10 UTC
I think maybe I've misunderstood things.  Please disregard my comment
above.
Comment 3 Havoc Pennington 2002-11-20 05:24:11 UTC
I would expect this is a theme issue, though I haven't verified for sure.
Comment 4 Mattias Dahlberg 2003-02-07 15:20:08 UTC
This is true for all Metacity themes that I have (Bluecurve, Crux, 
Grand Canyon, High Contrast, Large Print, Mist, Ocean Dream, Simple, 
Smokey Blue and Traditional).

Should I start bugging all the creators of those themes or is there a 
chance Metacity could get a feature eliminating the border above the 
widgets, when in fullscreen mode?
Comment 5 Rob Adams 2003-02-19 05:36:39 UTC
Why should clicking in the top-right corner, as opposed to the close
button, close the window?  I don't get what you're trying to say...
Comment 6 Wayne Schuller 2003-02-19 06:28:28 UTC
you should do a google search on 'fitts law'

basically, the close button, in a maximised window, 'purports' to be
in the top right hand corner, but that is not what the user
experiences when they roll the mouse very fast into the top right hand
corner and click. it's bad UI
Comment 7 Havoc Pennington 2003-02-19 20:34:19 UTC
I do think this is probably the theme's fault; you might look to see if 
all these themes have some kind of padding around the button.
Comment 8 Rob Adams 2004-01-13 16:32:17 UTC
*** Bug 131325 has been marked as a duplicate of this bug. ***
Comment 9 Luke 'povman' Worth 2004-01-13 21:53:57 UTC
Well metacity should disregard what the themes think, when it is
dealing with a maximised window. There are many times i have tried to
close a maximised window by flicking the mouse into the top right hand
corner and clicking, but all this does is grab the window like i want
to move it.
Comment 10 Havoc Pennington 2004-01-14 00:22:23 UTC
metacity could probably extend the "hot area" of buttons to the edge
of the frame always. you'd have to look at the code to see how hard
that is.
Comment 11 Martijn Vernooij 2004-01-27 01:13:50 UTC
Created attachment 23788 [details] [review]
cheap-ass hack to the simple theme to do this
Comment 12 Martijn Vernooij 2004-01-27 01:21:23 UTC
I hacked the simple theme so it works like I want it to.

I changed the normal_small_borders frame definition to have no left
and right borders by overriding button_border. Then I increased the
button_height attribute until the top line became clickable. I set it
to 20, but that is probably dependent on the font you used.

Now it worked like I wanted it to, but the buttons were a bit too
high, so I duplicated the button drawing functions and made the
maximized state of the frame call those instead.

- What is the point of the button_height attribute? Why not expand the
buttons to fill the space?
- Perhaps there is a way to center the image relative to the available
space?

IMO the themes should not have a left and right border for the title
bar in the borderless frames. That would be half of the problem solved
without hacks.
Comment 13 Arvind Narayanan 2004-06-01 12:32:26 UTC
Just a little observation, it works for me with the "Esco" theme. Not only the
close button, but also the window menu works by clicking the top-left pixel.
Comment 14 Danielle Madeley 2004-06-05 16:46:10 UTC
Someone mailed me a URL, which is somewhat related to this bug.
http://www.asktog.com/columns/022DesignedToGiveFitts.html (see Question 5)
Comment 15 Wayne Schuller 2004-06-09 04:52:44 UTC
just installed fedora core 2 (bluecurve by default).

the problem is still there on the default fc2 theme.
Comment 16 Arvind Narayanan 2004-06-10 13:27:48 UTC
Coupla things:

1. I just noticed that in Windows XP the top right pixel does close the window.
This is in spite of the fact that close button doesn't *look* as though it
extends to the corner.

2. Someone mentioned elsewhere that Fitt's law shouldn't apply for "dangerous"
operations. I feel that closing a window should not be considered dangerous from
the point of view of the window manager, because if there is potential dataloss
then the app should warn the user before exiting (as most apps already do).

P.S: Thanks Davyd.
Comment 17 Greg 2004-06-16 20:09:59 UTC
See this GNOME mail list post for additional details:

http://mail.gnome.org/archives/gtk-list/2003-June/msg00308.html

This is an annoying little bug. It shows a lack of fit and finish.
Comment 18 Havoc Pennington 2004-06-16 23:04:10 UTC
Guys, everyone agrees this should be fixed, no need to post comments to that
effect. Instead, post a patch that always extends the "hot area" of the corner
buttons all the way to the edge and top, and always extends the "hot area" of
non-corner buttons all the way to the top. Code is what we're missing here.
Comment 19 Calum Benson 2004-09-21 11:46:04 UTC
Removing accessibility keyword, not sure it's pertinent here.
Comment 20 Ben Roe 2004-10-02 23:54:10 UTC
IMHO, this is a pretty serious bug that really hurts usability. I'm running with
a modified Simple theme with the button_border and title_bar_borders all set to
zero and it works fine. I can push the mouse into the corner and click to close
a window or maximize it.

Seeing as nobody seems to have time to fix this in code (this bug was reported
in 2002!), why not modify at least the default theme that most users will use to
not have any button_borders?
Comment 21 Elijah Newren 2004-11-19 00:30:16 UTC
*** Bug 158653 has been marked as a duplicate of this bug. ***
Comment 22 milky_cow_101 2004-11-21 13:45:46 UTC
Ubuntu Linux has a fix here similar to the Simple hack AFAIK:

https://bugzilla.ubuntu.com/show_bug.cgi?id=2655

http://people.ubuntulinux.org/~jdub/ubuntu-artwork_0.2.15-1_all.deb
Comment 23 milky_cow_101 2005-08-01 01:10:30 UTC
How come Clearlooks wasn't designed with Fitt's law in mind?  Just like the  
venerable "simple" theme, it doesn't use Fitt's law to extend to the top-right 
corner.
Comment 24 Elijah Newren 2005-10-02 03:08:28 UTC
Comment on attachment 23788 [details] [review]
cheap-ass hack to the simple theme to do this

This patch is backwards (it still applies cleanly with -R, though)
Comment 25 Elijah Newren 2006-03-08 19:07:52 UTC
*** Bug 333939 has been marked as a duplicate of this bug. ***
Comment 26 Elijah Newren 2006-07-26 21:37:23 UTC
*** Bug 341516 has been marked as a duplicate of this bug. ***
Comment 27 Thomas Thurman 2006-08-03 00:03:13 UTC
Created attachment 70101 [details] [review]
Make it possible to click above and beside the buttons as well as on them

I think it's a bad idea to fix this by modifying themes. Firstly, a theme might quite reasonably want to have a border around windows, and secondly, there are dozens and dozens of possible themes.

I think this patch is a better way of going about it. It defines two GdkRectangles for each button: "actually", which is the rectangle in which the image is drawn, and "virtually", which is the area which is sensitive around the button. For the button on the top right, this extends to the top and rightmost edge of the window.
Comment 28 oa 2006-08-03 07:25:41 UTC
When I read Thomas's patch, my first thought was "how come the 'actual' button is not the area that can be clicked?". I'd suggest naming them 'visually' and 'clickably' to remove any such possibility for confusion.
Comment 29 Havoc Pennington 2006-08-03 12:17:03 UTC
patch looks good. 

oa's naming suggestion seems sensible too
Comment 30 Thomas Thurman 2006-08-03 15:21:17 UTC
Over coffee, a coworker pointed out to me that this patch is wrong. It should only apply to maximised windows, right? (Or have I misunderstood?) Otherwise you can't resize a non-maximised window using the top right-hand corner without then closing it. I'll fix that this evening.
Comment 31 Thomas Thurman 2006-08-06 02:43:28 UTC
Created attachment 70289 [details] [review]
Same again, but only works when maximised and has better field names

Here's the new patch, substantially the same as the old patch, but only working on maximised windows, and incorporating the suggestion about better field names.
Comment 32 Elijah Newren 2006-08-07 17:41:48 UTC
Looks good to me.  A short comment or two explaining the reason for the fields of the MetaButtonSpace struct in src/theme.h couldn't hurt.  Thanks!
Comment 33 Thomas Thurman 2006-08-07 18:06:35 UTC
Okay, done and done. Thanks!

-> FIXED