16

I would like to configure Ubuntu 20.04 (with Gnome shell) so that if I click a window which does not have focus, that click raises the window and does nothing else; in particular, that click to raise the window does not actually have an effect on the window (so I can click where a button is without activating that button). In the old days on the Mac this, clicks triggering actions in background windows, was called "click-through"; it's the default in GNOME Shell and I'd like to disable it.

The reason for this is that it is very hard to click on a window to raise it without also clicking on a button inside it!

A Nautilus window mostly covered by other windows

Almost all the visible areas of that Nautilus window are "active" areas in some way; clicking in that window to focus and raise it will also change the folder that it is currently displaying.

Some clarifications:

  1. This is not about the window focus mode (focus-follows-mouse or sloppy focus). Windows are focused by clicking on them; I do not want focus-follows-mouse, and it is not what this question is about.
  2. This is about raising a window and giving it the focus by clicking on the window. I can switch to that window in other ways (alt-tab, for example, or by choosing it from the Dock) but I want to be able to click on a window to focus it and raise it, exactly as I currently can, but I don't want to have to be careful to only click on an "inactive" area of that window to focus it.
  3. Yes, this problem is exacerbated by how there are not very many "inactive" areas in a window now that the title bar contains buttons. That's not what this question is about, and I am quite happy with the window containing many buttons, as long as I'm not forced to click one of them just in order to give the window focus.

I am informed by Mattias Wernér that Super+Click does exactly this (raises a window without the click being received by the window itself), which is great, and so it is possible that this question should be rephrased as "how do I make click on unfocused windows do what Super+click does?".

1
  • I found a partial solution for this problem. It only works for XWayland applications and it uses middle click to focus the window. Using actual middle click then has to be done by holding down one of the modifier keys.
    – StanVL
    Commented Jun 16, 2022 at 15:38

2 Answers 2

2

I think, short of a code change, you can't. I'm basing that on the following.

Judging by https://github.com/GNOME/gnome-tweaks/blob/35e3a5bebebb94a631e5ccbb7c29b2e482595a9a/gtweak/tweaks/tweak_group_windows.py#L20-L21 the setting is org.gnome.desktop.wm.preference, and the key is focus-mode. That lead to https://github.com/GNOME/gsettings-desktop-schemas/blob/2bb055b3c1b87e6db80d891bd788f1d4b9a62af3/schemas/org.gnome.desktop.wm.preferences.gschema.xml.in#L41-L50, which indicates there are only three possible values

“click” means windows must be clicked in order to focus them,

“sloppy” means windows are focused when the mouse enters the window, and

“mouse” means windows are focused when the mouse enters the window and unfocused when the mouse leaves the window.

1
  • 1
    To clarify, I've also asked this question on the GNOME Discourse at discourse.gnome.org/t/disabling-click-through-in-gnome-shell/…. At time of writing, there have been no answers, and I think I'd agree that the GNOME design team have decided that this case should have no answers and that there should be no way to raise a window without activating some button within it. But we shall see if there's some good answer.
    – sil
    Commented Jul 13, 2020 at 22:05
0

I think the answer is still no on this one.

a workaround:

holding the click while doing a pixel's worth drag(just until the grab-hand appears)...

it's wack.. but it won't activate the button when you let go.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .