raise_on_click: not what you think

There is a GConf key called /apps/metacity/general/raise_on_click. It does not, as is widely assumed, cause windows to be raised when they’re clicked. You should never turn it off. Doing so will make your user experience confusing in subtle ways.

The short description of the key in the current schema says that it controls whether raising should be a side-effect of other user interactions. In other words, this key would have been better named “raise on click and also on a shedload of other random things like resizing”. The longer explanation runs:

Setting this option to false can lead to buggy behavior, so users are strongly discouraged from changing it from the default of true.

Many actions (e.g. clicking in the client area, moving or resizing the window) normally raise the window as a side-effect. Set this option to false to decouple raising from other user actions. Even when this option is false, windows can still be raised by an alt-left-click anywhere on the window, a normal click on the window decorations, or by special messages from pagers, such as activation requests from tasklist applets.

This option is currently disabled in click-to-focus mode.

Note that the list of ways to raise windows when raise_on_click is false does not include programmatic requests from applications to raise windows; such requests will be ignored regardless of the reason for the request. If you are an application developer and have a user complaining that your application does not work with this setting disabled, tell them it is their fault for breaking their window manager and that they need to change this option back to true or live with the bug they requested. See also bug 445447, comment 6.

(See also GNOME bug 326156.)

We still regularly receive bugs complaining that turning off raise_on_click breaks things. This is expected behaviour:

  1. We told you not to turn it off.
  2. raise_on_click doesn’t do what the name implies anyway.

We have to keep the key for backwards compatibility, but please, everyone, just leave this key the heck alone and turned on. Thanks. :)

5 Comments

  1. Hans de Graaff
    Posted November 21, 2007 at 6:56 pm | Permalink

    So I have raise_to_click off and I really, really like it that way. It’s just such a nice power user feature to be able to work in a partially obscured window, including clicking buttons in it and not have the window pop to the front and demand all and any attention just because I happened to interact with it. It makes me feel more in control and productive this way. Just thought I’d throw out a use case for it.

    I understand that this is really not a windowing mode that should be on by default as its behaviour is probably very confusing to unexpecting users, but I am glad that it’s still available as a gconf key. Then again, there was a time at which this behaviour was gone for some time and I just had to patch metacity on every update. :-)

  2. Posted November 22, 2007 at 3:43 am | Permalink

    Hehehe. I leave it off all the time other than when trying to reproduce metacity bug reports.

    Oh, and your explanation is a bit confusing:

    “It does not, as is widely assumed, cause windows to be raised when they’re clicked.”

    Uh, it does too…

    ““raise on click and also on a shedload of other random things like resizing”

    Um, one resizes a window by clicking on it, thus raise-on-click actually matches here quite nicely. And uh, raising as a side-effect of the click to start the resize is default behavior. In all window managers I know of. And if this is so bad, why do you say to leave it on?

    I would understand if you called the “off” behavior confusing and then say to not use it, but you are calling the default behavior confusing and asking users to leave it that way. Or so it sounds…

  3. Posted November 22, 2007 at 4:09 am | Permalink

    Yes, you’re right, it does. I wrote this on my lunchbreak from trying to understand the documentation and the bug reports and from whatever memories I had of the history of it all, and then tried things out for real, and I found that I had written the “It does not” part backwards and then there was no time left and I had to stay late fixing things :(

    On the other hand:

    Um, one resizes a window by clicking on it, thus raise-on-click actually matches here quite nicely. And uh, raising as a side-effect of the click to start the resize is default behavior. In all window managers I know of. And if this is so bad, why do you say to leave it on?

    Maybe it’s just late, but I don’t understand this. I don’t think I said it was bad to raise as a side-effect of the click, and if you leave it on it will raise as a side-effect of the click anyway.

    I should probably just delete this post, but I think we possibly need a post saying what ROC does, why the documentation says to leave ROC set to true, and why you shouldn’t complain about the result if it does what it says it will do.

  4. Anders Brander
    Posted November 27, 2007 at 5:50 am | Permalink

    Something tells me that metacity should respect programmatic raise requests with or without raise_on_click, then the power users who disables this feature will not be surprised by unrelated side effects?

  5. Posted November 27, 2007 at 11:49 am | Permalink

    @Anders:
    I don’t think this particular bug is the right forum to ask about that. (As you note, the programmatic raise behaviour is independent of raise_on_click.) I will try to put together a discussion of why Metacity behaves this way later.