pop-os / shell

Pop!_OS Shell
GNU General Public License v3.0
4.89k stars 268 forks source link

PopOS Navigation in Stacking (Super+S) breaks when having a terminal open #970

Open tyalie opened 3 years ago

tyalie commented 3 years ago

(1) Issue/Bug Description: When having a stack and a normal window running next to each other (horizontally) in tiling mode, the navigation from the window outside the stack into the stack will be inconsistent when having a gnome-terminal instance running inside the stack, as the focus will jump to the terminal instead of the left- / rightmost window.

(2) Steps to reproduce (if you know):

  1. Open a gnome-terminal and 3 files windows in the following orientation: image

  2. Navigate from the window outside the stack into the stack (for me it was Super+H)

  3. Your current window should now be the gnome-terminal independent where it is positioned inside the stack.

(3) Expected behavior: When navigating from the window outside the stack into the stack, the left- or rightmost window should be shown first. Independent if the terminal is open or not.

(4) Distribution (run cat /etc/os-release):

NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

(5) Gnome Shell version:

$ gnome-shell --version      
GNOME Shell 3.36.7

(6) Pop Shell version (run apt policy pop-shell or provide the latest commit if building locally):

My PopOS Shell is a local build from the commit 9507dc38f75f56e657cf071d5f8dc578c5dc9352. It was installed using make local-install and no further changes.

I've changed the Super+/ hotkey to Super+R using dbus config.

(7) Where was Pop Shell installed from: Directly from the GitHub repo

(8) Monitor Setup (2 x 1080p, 4K, Primary(Horizontal), Secondary(Vertical), etc): One 4K Monitor running with 200% (non-fractional) scaling under wayland.

(9) Other Installed/Enabled Extensions:

(10) Other Notes: When only using gnome-terminals with no other windows mixed in the back, the navigation works as one would expect.

tyalie commented 3 years ago

I don't know if this is considered a bug or feature and if there are other windows that have the same kind of special priority.

bflanagin commented 3 years ago

I'm not seeing the same issue on my end, yet. However, I'm using the latest version of pop-shell but on gnome 3.38 (not sure if it matters) I'll see if I can get a bit closer to your setup and test again.

tyalie commented 3 years ago

Now after identifying the issue I've been more vigilant and I haven't found another application that behaves like that. But it's very easily and consistently reproducible for me. It probably has something to do with the gnome-terminal. I'll see if it has something to do with the settings.

tyalie commented 3 years ago

Honestly I don't know if it is worth the risk resetting my gnome-terminal preferences, because these are the only changes I've done so far:

$ dconf dump /org/gnome/terminal/ 
[legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9]
background-color='rgb(0,0,0)'
foreground-color='rgb(170,170,170)'
palette=['rgb(46,52,54)', 'rgb(204,0,0)', 'rgb(78,154,6)', 'rgb(196,160,0)', 'rgb(52,101,164)', 'rgb(117,80,123)', 'rgb(6,152,154)', 'rgb(211,215,207)', 'rgb(85,87,83)', 'rgb(239,41,41)', 'rgb(138,226,52)', 'rgb(252,233,79)', 'rgb(114,159,207)', 'rgb(173,127,168)', 'rgb(52,226,226)', 'rgb(238,238,236)']
use-theme-colors=false

My gnome-terminal also has the following version:

$ gnome-terminal --version       
# GNOME Terminal 3.36.2 using VTE 0.60.3 +BIDI +GNUTLS +ICU +SYSTEMD
tyalie commented 3 years ago

This might be related to #712 as for me the stack automatically switch to the terminal.

thegass commented 3 years ago

have the same "feature". i solved it for me by switching to xfce4-terminal.

hoshsadiq commented 3 years ago

I've seen this behaviour on IntelliJ IDEA too. It seems to be a hit and miss though. Often it happens, but every now and then it's fine.

lhotari commented 3 years ago

PR #1007 fixes this issue.

jacobgkau commented 3 years ago

@lhotari I am not seeing this fixed by https://github.com/pop-os/shell/pull/1007 on an Ubuntu system.

This is caused by GNOME Terminal in Ubuntu locking its width to the nearest character, causing its width to be less than that of the Files windows it's stacked with. When navigating leftward from the right-most window, Pop Shell sees that the Files windows are "closer" since they're slightly larger. This is not an issue in Pop!_OS because we patch GNOME Terminal to not lock its size to character increments (specifically for better tiling support.)

See also: https://github.com/pop-os/shell/issues/213, https://github.com/pop-os/shell/issues/329, https://github.com/pop-os/shell/issues/440, https://github.com/pop-os/shell/issues/463, https://github.com/pop-os/shell/issues/551, https://github.com/pop-os/shell/issues/702.