Double-click to close

doble clickWindow decorations on Windows 3.1 had no close button, so they used to let you double-click the menu button to close a window. When Windows 95 came along, they added a close button, but they kept the double-clicking behaviour. The ability to close a window by double-clicking the menu button has lasted right up until Vista; apparently Microsoft tried to take it out in the beta, but so many users complained that they left it in in the end.

Many *nix window managers support double-click to close for the benefit of people moving from Windows who learned how to close a window before 1995 and haven’t broken the habit yet.  Metacity doesn’t, and in GNOME bug 83892 people have been saying it should.  Often, they add that there’d be no harm in adding the behaviour because people who wouldn’t know about it wouldn’t trigger it.  However, other people say that the effect of accidentally double-clicking the close button, and losing anything which happens to be in the window, is too disastrous to add a feature for such a marginal audience.

The HIG also (apparently) says that the top entry in a context menu should be the one triggered by a double click.  “Close” is not currently the top entry in Metacity’s window menu.

A good while ago, Thomas Thurman provided a patch to add this behaviour, which has rotted, and today provided a current one.  The current consensus among the maintainers is that this will not be added.  However, you might be able to change our minds if at least one distro includes the patch.  For example , Debian bug 381509 discusses the matter; if you know corresponding bugs in other distros, please let me know and I’ll add them here.

Photo © saba♫dija, cc-by.

20 Comments

  1. Posted October 9, 2008 at 3:48 am | Permalink

    I don’t miss the Windows 3.1 behaviour, but apparently some people do.

    The application can’t let the user lose its work for an accidental “window close” command. The “close window” button is right next to the “maximize” one, so it’s very easy already to click on it by accident; double-clicking the window icon by accident is much more difficult.

  2. Posted October 9, 2008 at 9:19 am | Permalink

    I filed that bug more than 6 years ago. How time flies. :-)

  3. Posted October 9, 2008 at 10:40 am | Permalink

    From a users point of view having the ability to choose would be nice. Whether that was what your distribution used, or if you just wanted to change it in the gconf-editor.

    From a configuration point of view having two gconf entries that allowed you to set the application context-menu double click action would cover the majority of peoples needs. One entry for using the top context menu item to maintain HID compliance, and one for the bottom entry in the menu. I can’t think of a system that hasn’t had close at the bottom of the menu. You could then uncheck both if you didn’t want either functionality; which is what double-clicking the application context menu does in most distributions these days.

  4. Günther
    Posted October 9, 2008 at 11:02 am | Permalink

    I configured Metacity to not show a Close button so I wouldn’t accidently click it when I wanted to maximize the window or something, and close windows with the window menu or the keyboard. I’m not sure wether close-on-double-click would be an improvement. I’d have to wait until I accidently closed a window that way, which might take years…

  5. Posted October 9, 2008 at 12:09 pm | Permalink

    @Leonardo: good point.

    @Jay: there are not going to be GConf changes over such a minor issue as this one, though.

  6. Posted October 9, 2008 at 12:21 pm | Permalink

    I do find myself double clicking the icon to close windows often although should have stopped long ago.
    Must say: that teacher does nothing for the stereotype UK people have of Americans or the state of the education system over there (although ours is not great either).

  7. simplisticton
    Posted October 9, 2008 at 1:23 pm | Permalink

    I’m not sure if there’s a bug report in Ubuntu or Fedora for this (the two distros I use), but if you find them, I’d love to know — so I can vote emphatically against the behavior. There’s already enough ways to close a window… in my opinion, there should only be one way to do something that can cause you to lose work.

  8. Posted October 10, 2008 at 2:00 am | Permalink

    Any app that closes *for any reason* without prompting the user about unsaved work is broken. I don’t see accidental double-clicks as an issue.

  9. Ken
    Posted October 10, 2008 at 4:13 pm | Permalink

    I still can’t figure out why the window-menu needs to be a control you can access with left-click, anyway. Right-click to get an advanced/context menu is the standard across GNOME (and every other modern desktop I’ve used). I can’t think of anywhere else that left-click-on-an-icon brings up a menu. The rationale for its very existence seems to be legacy Windows compatibility.

    If you’re worried about it being a dangerous operation which can be triggered by accident, then maybe we should start with the even easier dangerous operation: having the close-box right next to the other (nondestructive) operations. Move the close-box to the opposite end of the titlebar, like the Mac used to do.

  10. Posted October 10, 2008 at 4:15 pm | Permalink

    @Brian: good point.

    @Ken: that *is* actually configurable, although I suppose we could change the default.

  11. Posted October 11, 2008 at 1:27 pm | Permalink

    Although I did not use old Windows versions you had to double-click on the window’s top left corner to close them, I used to display the close button on the left in order to avoid closing a window when I wanted to maximise it. But I stopped doing so for two reasons:
    – it was adding another layer of stress for friends using my computer beyond the « WTF you did with the start button?!»…
    – hiding the menu button mean hiding the window icon, and while you can live without it, it’s still enjoyable to see it.

    As Ken said, the popup menu is already available on the whole bar, so this button is redundant IMHO (And when I want to raise it, I right click the window icon).

    There is probably no simple solution, but maybe keeping the current configuration by default and adding new button types for the button_layout can make everybody happy:
    – icon: not a button, just the icon of the window and does nothing;
    – close_icon: button that shows the window icon and close it when [double] clicked.

  12. Carl Simpson
    Posted October 11, 2008 at 11:07 pm | Permalink

    Good Lord, that sounds like a terrible idea.

    Having an invisible way to close a window doesn’t seem sane at all, not because of a negative effect of it being there, but because there is no positive reason to put it there in the first place. When placing any button or clickable space, the first thought should be that the user know exactly what that button will do when they see it, and that if they want to invoke the function of the button they will be able to find it.*

    This sort of precludes having close buttons hidden beneath icons that could look at any one time like any one thing, surely?

    I say “no” to pandering to old, silly ways of doing things and “yes” to finding new, better ways that all people can use- because they make sense- not ways that only some people can use because they happen to have seen something similar before.

    *It’s for this reason, in fact, that I don’t have the application’s little picture displayed in that space- I use a theme that puts a button that looks like a drop-marker there to make it more obvious a menu is invoked. I already have the application’s icon in the window list, thank-you-very-much.

  13. Lennie
    Posted October 23, 2008 at 6:57 am | Permalink

    I don’t think Ubuntu has a bug for it, but I do see these:
    http://brainstorm.ubuntu.com/idea/1584/
    http://brainstorm.ubuntu.com/idea/8394/
    https://answers.launchpad.net/ubuntu/+question/42973

    Thus, there seems to be an interest for it.

    My personal opinion is: I agree with a lot of people who say, I doubt anyone would accidentally close a window this way, there are easier ways to do this. Also a good application should ask the user if he/she would like to save his work.

    If a patch is to be accepted, I think it should have a new configuration option to enable/disable it. And the default should be disabled.

    Thus it will not change current behaviour, but it will be something people can turn on if they really want it. I know it’s probably a compromise, but I’m fairly certain it does satisfy pretty much everyone.

  14. Posted October 23, 2008 at 11:58 am | Permalink

    @Lennie:

    Okay, so there is interest among Ubuntu users. Please go to Launchpad and raise a bug against Ubuntu’s packaging of Metacity and ask them to include the patch, and if they do we can consider it further here. If they do, we can consider whether we’ll include it upstream. There will not be a GConf switch for reasons I have explained.

  15. Lennie
    Posted October 23, 2008 at 1:35 pm | Permalink

    @Thomas

    If it’s not configurable I don’t think you should do it.

    Atleast in my opinion, you should not default behaviour to much.

  16. Posted October 23, 2008 at 2:45 pm | Permalink

    @Lennie:

    *nods* that was pretty much the consensus here, I think.

  17. Posted October 29, 2008 at 1:25 pm | Permalink

    Good Lord, that sounds like a terrible idea.

    Here, here.

    It is a terrible idea, and one that goes against the general feel of GNOME.

    This is not Windows. Windows is not the ultimate say in “doing things the right way”. As a matter of fact, most people would probably rank it high up in the “doing things the lousiest way possible” list.

    If people want to close the window from the right side, how about this ?

    Customization option allowing windows to switch their menu and buttons’ positions, allowing for most mac-wannabes/mac-deserters to get naturally what they usually tweak otherwise.

    If you want an option for it, I can’t say I’m dead against it .. Just don’t go getting too kaydee’ee’ie on us =)

  18. Posted October 29, 2008 at 1:59 pm | Permalink

    For reference, it was the IBM Common User Access guidelines that specified double-click system menu to close window. Windows wasn’t the first or only graphical environment to implement this functionality.

  19. Posted November 4, 2008 at 2:36 pm | Permalink

    Not only should the window menu be double-clickable to close windows, but there should be a gconf-editor option to disable the little app-icon on the menu button.

    That way, I’d be able to emulate the Motif window manager (my all-time favourite) with Metacity.

  20. Posted November 4, 2008 at 3:05 pm | Permalink

    @Andrea:

    You can actually turn off the app icon in the theme, if you want (not that that’s quite what you were asking for).

2 Trackbacks

  1. [...] For those of you who don’t read news.gnome.org, here’s a new Metacity post: should double-clicking the menu button close the window? [...]

  2. [...] The double-click-to-close issue is still attracting comments.  Gentle reader, if you want this feature, please persuade your distro maintainers to consider it and not us, since we have done it to death here.  When they approve it, we’ll consider it. [...]