GNOME 3.26 - Clicking one window brings another in the foreground (Ubuntu 17.10)
I'm on Ubuntu 17.10 with GNOME 3.26.
Often I have windows tiled on the left and right side of the screen. A typical setup is to have a browser and text editor on the left, a PDF reader and terminal on the right.
Something I've seen happen very often: I'm reading the PDF on the right, having the window in focus. The text editor on the left. When I click on the text editor to write something, it brings forward another window on the right (say the file browser), covering the PDF reader.
This seems to have something to do with the Alt-Tab view history.
My question is: Is it possible to remove the automatic bring-to-front of windows? I don't understand why unrelated windows are brought to the front when I click on another application.
I was puzzled by the same behavior in Fedora 27 / GNOME 3.26.
I found that GNOME 3.26 introduced a new feature which implicitly groups tiled windows and raises the entire group when one receives focus:
- Tiled windows that are not complementary sizes are not in the same T-Group
- When resizing, they join a T-Group if their borders match
- Resizing to screen borders change to maximized
- Keyboard tiling always join T-Groups
- When raising a window in a T-Group, the entire group is raised as well
Unfortunately, this grouping behavior is implicit, and the only way to break grouping in 3.26 is:
It is still possible to break tiled windows grouping by simply untiling the window with the keyboard or by grabbing and resizing or moving the window with the cursor.
However, this means you have to give up the convenience of tiling if you don't want windows to be grouped.
This new feature is an annoyance for my workflow as well, at least there is a todo item listed on the feature page that is slated for GNOME 3.28:
- Implement explicit group activation
-- UPDATE --
Per this comment in GNOME's bugzilla it appears that this behavior will be reverted in the next stable release.
I can't solve this problem with GNOME but I can suggest a workaround if you're willing to install the gtile extension (I am not affiliated with the developers). The extension was designed to support tiling modes other than just left/right split, but you can configure it to support such tiling as well. Windows resized by the extension don't seem to suffer from the issues caused by windows resized by GNOME itself.
Steps:
- Install the extension and clear the
Super+left
/Super+right
keyboard shortcuts using the settings application. - Use gnome tweak tool to change the settings for Gtile under the
Extensions
tab. - Enter the
accelerators
tab and set the shortcut forPreset resize 20
toSuper+left
andPreset resize 30
toSuper+right
(I chose these because they aren't used by the extension by default). - Enter the
Resize presets
tab and setPreset resize 20
to2x2 0:0 0:1
andPreset resize 30
to2x2 1:0 1:1
.
Note: in my experience gtile has issues taking into account the space taken up by the dock, so it might resize windows to overlap with the dock. I keep the dock hidden to save space so it's not an issue for me, but for you it might be exchanging one annoyance for another, unfortunately.