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.

Published by

Thomas Thurman

Mostly themes, triaging, and patch review.

22 thoughts on “Double-click to close”

  1. 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. 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.

  3. 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…

  4. 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).

  5. 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.

  6. 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.

  7. 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.

  8. 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.

  9. I don’t think Ubuntu has a bug for it, but I do see these:

    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.

  10. @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.

  11. 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 =)

  12. 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.

  13. 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.

Comments are closed.

Leave a Reply

Your email address will not be published. Required fields are marked *