paperwm / PaperWM

Tiled scrollable window management for Gnome Shell
GNU General Public License v3.0
2.73k stars 122 forks source link

ctrl+___ chords are not going to active window #468

Closed borring closed 8 months ago

borring commented 1 year ago

I've got several Chrome windows. I've been experiencing 2 different odd scenarios.

  1. Chords like CTRL+N, CTRL+W, CTRL+T are going to a different window that isn't active. But all other keypresses are going to the active window.
  2. Chords are being buffered until something triggers it to be unleashed all at once on the active window.

~I'm not sure how to reproduce this since it seems to be sporadic.~

I think I may know how to reproduce this now.

  1. Open a Chrome window open on multiple monitors. (I have chrome with wayland enabled)
  2. Open a new tab in one window with CTRL+T (should work)
  3. Use the keyboard to bring focus onto the other monitor, or simply move mouse cursor to the other monitor.
  4. Once focus is on the other monitor, The other Chrome window should become active. Press CTRL+T to open a new tab here. (opens new tab in previous window despite accepting other keyboard inputs)

Most of the time, these shenanigans can be fixed by switching focus between 2 windows on the same workspace.

GNOME 43.2 Wayland

jtaala commented 9 months ago

@borring - can you let me know if you're still seeing this on a recent version of PaperWM (e.g. develop, release, or install via https://extensions.gnome.org/extension/6099/paperwm ?

Recent work on multimonitor should have resolved issues like this - but want to check.

borring commented 9 months ago

@jtaala Latest develop still has this issue 774140ceecbb11931e8a3f2783c0c7628bfd8643

Let me know how I can make debugging this easier.

jtaala commented 9 months ago

I've never seen this and can't reproduce this with chrome, brave, or firefox.

For others: is anyone else seeing this?

Can you please run the gather-system-info.sh script and paste the output here?

Also, can you please paste the output of ls ~/.local/share/gnome-shell/extensions/ here as well?

Thanks!

jtaala commented 9 months ago

Actually, to rule out what I'm thinking - can you run these commands (essentially running the gather-system-info.sh inside the actual user extensions folder to confirm what's checked out is running):

~/.local/share/gnome-shell/extensions/paperwm@paperwm.github.com/gather-system-info.sh

Also, note you need to logout/login whenever you switch branches or commits etc.

Thanks @borring!

borring commented 9 months ago
Please include this information in your bug report on GitHub!
Distribution: Fedora Linux
GNOME Shell 44.3
Display server: Wayland
PaperWM branch/tag: develop
PaperWM commit: 774140ceecbb11931e8a3f2783c0c7628bfd8643
Enabled extensions:
- freon@UshakovVasilii_Github.yahoo.com
- gsconnect@andyholmes.github.io
- blur-my-shell@aunetx
- appindicatorsupport@rgcjonas.gmail.com
- just-perfection-desktop@just-perfection
- paperwm@paperwm.github.com
- user-theme@gnome-shell-extensions.gcampax.github.com
total 12
drwxr-xr-x. 1 moymoy moymoy 462 Mar 18 20:07 appindicatorsupport@rgcjonas.gmail.com
drwxr-xr-x. 1 moymoy moymoy 222 Jul  6 12:18 blur-my-shell@aunetx
drwxr-xr-x. 1 moymoy moymoy 568 Apr 22 14:13 dash-to-panel@jderose9.github.com
drwxr-xr-x. 1 moymoy moymoy 158 Jul  6 12:18 desktop-cube@schneegans.github.com
drwxr-xr-x. 1 moymoy moymoy 144 Sep  4 13:29 flypie@schneegans.github.com
drwxr-xr-x. 1 moymoy moymoy 492 Apr 22 14:13 freon@UshakovVasilii_Github.yahoo.com
drwxr-xr-x. 1 moymoy moymoy 370 May  1 17:35 gsconnect@andyholmes.github.io
drwxr-xr-x. 1 moymoy moymoy 174 Aug 15 14:49 just-perfection-desktop@just-perfection
lrwxrwxrwx. 1 moymoy moymoy  33 Jul 16 03:23 paperwm@hedning:matrix.org -> /var/home/moymoy/software/PaperWM
lrwxrwxrwx. 1 moymoy moymoy  33 Sep  4 13:29 paperwm@paperwm.github.com -> /var/home/moymoy/software/PaperWM
lrwxrwxrwx. 1 moymoy moymoy  33 May 22 18:47 paperwm@paperwm-redux.github.com -> /var/home/moymoy/software/PaperWM

Note: I do have multiple paperwm symlinks in there, but that's because I was skipping around branches. They all point to the same directory, and right now, only PaperWM proper is enabled. The repo that it's pointing to is also at commit 774140ceecbb11931e8a3f2783c0c7628bfd8643

I also reported the drag-and-drop issue between monitors. That has been working fine.

Here's my worksapce settings in case it's relevant:

Workspaces

[x] Dynamic workspaces [ ] Fixed number of workspaces

Multi-Monitor

[ ] Workspaces on primary display only [x] Workspaces on all displays

App Switching

[ ] Include apps from all workspaces [x] Include apps from current workspace only

Multiple Displays - Join | Mirror

Lythenas commented 8 months ago

For what it's worth I also can't reproduce this. Ubuntu 22, Gnome 42.9, Wayland. I tried Chrome and Chromium. I think both are installed through snaps if that matters. I will try on my other machine that has a newer Gnome version this evening.

jtaala commented 8 months ago

Hey @borring ,

Can you please run this command from a terminal and confirm you have output there?

dconf read /org/gnome/shell/extensions/paperwm/restore-keybinds
jtaala commented 8 months ago

Also, to make sure we're on the same page, please remove the other references to PaperWM repos by:

rm -rf ~/.local/share/gnome-shell/extensions/paperwm@*

And going to the correct repo and then running the install.sh script again.

Logout/login etc.

Lythenas commented 8 months ago

Also can't reproduce on Arch, Gnome 44.4, wayland. Although I only had Chromium installed, not Chrome.

borring commented 8 months ago

@jtaala Deleted all the paperwm directories and re-ran ./install.sh from the repo. Logged out and back in and ran the dconf command.

  "move-to-workspace-up": {
    "bind": "[\\"<Shift><Super>k\\"]",
    "schema_id": "org.gnome.desktop.wm.keybindings"
  },
  "switch-to-workspace-1": {
    "bind": "[\\"<Super>Home\\"]",
    "schema_id": "org.gnome.desktop.wm.keybindings"
  },
  "move-to-workspace-down": {
    "bind": "[\\"<Shift><Super>j\\"]",
    "schema_id": "org.gnome.desktop.wm.keybindings"
  },
  "switch-to-workspace-last": {
    "bind": "[\\"<Super>End\\"]",
    "schema_id": "org.gnome.desktop.wm.keybindings"
  },
  "switch-to-workspace-up": {
    "bind": "[\\"<Super>k\\"]",
    "schema_id": "org.gnome.desktop.wm.keybindings"
  },
  "switch-group-backward": {
    "bind": "[\\"<Shift><Super>grave\\"]",
    "schema_id": "org.gnome.desktop.wm.keybindings"
  },
  "switch-to-workspace-down": {
    "bind": "[\\"<Super>j\\"]",
    "schema_id": "org.gnome.desktop.wm.keybindings"
  },
  "switch-group": {
    "bind": "[\\"<Super>grave\\"]",
    "schema_id": "org.gnome.desktop.wm.keybindings"
  },
  "focus-active-notification": {
    "bind": "[\\"<Super>n\\"]",
    "schema_id": "org.gnome.shell.keybindings"
  }
}
Please include this information in your bug report on GitHub!
Distribution: Fedora Linux
GNOME Shell 44.3
Display server: Wayland
PaperWM branch/tag: develop
PaperWM commit: 774140ceecbb11931e8a3f2783c0c7628bfd8643
Enabled extensions:
- freon@UshakovVasilii_Github.yahoo.com
- gsconnect@andyholmes.github.io
- blur-my-shell@aunetx
- appindicatorsupport@rgcjonas.gmail.com
- just-perfection-desktop@just-perfection
- paperwm@paperwm.github.com
- user-theme@gnome-shell-extensions.gcampax.github.com

I do have other extensions. I'll try disabling them to see if anything changes.

appindicatorsupport@rgcjonas.gmail.com
blur-my-shell@aunetx
freon@UshakovVasilii_Github.yahoo.com
gsconnect@andyholmes.github.io
just-perfection-desktop@just-perfection
paperwm@paperwm.github.com

update: disabled all other extensions and the issue still happens
jtaala commented 8 months ago

That output looks right.

Hmm - something else must be going on. How did you set the App Switching setting you mentioned previously?

Do you have anything like "focus follows mouse" or other settings on?

jtaala commented 8 months ago

Tried for the last 20mins multiple times and can't reproduce this (and haven't ever seen this). Simply doesn't happen for me.

When you have some time, can you please take a video of this happening? (on your phone is fine) - from start to finish, so I can look at replicating exactly what you're doing.

Thanks.

borring commented 8 months ago

As for app switching, I'm just using:

Switch to the right monitor
Ctrl + Alt + L

Switch to the left monitor
Ctrl + Alt + H

I don't have focus-on-hover enabled. Though, Paperwm does focus on the monitor that the mouse is hovering over. Other than that, window focus doesn't follow the mouse. 2023-09-08 00-58-28-svt.webm

Play-by-Play

  1. Switched to Chrome on R-Mon
  2. Switched over to L-Mon
  3. Ctrl+T (Tab opens on R-Mon)
  4. Ctrl+T again (nothing happens)
  5. Use mouse to close tab on R-mon (previous Ctrl+T seemed buffered) and spontaneously open a new tab
  6. Switch to L-Mon and Ctrl+T opens tab on R-Mon again
  7. App-switch between 2 different Chrome windows on R-Mon. This seems to "reset" the keyboard-chord focus.
  8. Ctrl+T on L-Mon opens new tab on L-Mon
  9. Ctrl+W on L-Mon closes tab on L-Mon
  10. Switch to R-Mon. Ctrl+W closes tab on L-Mon
borring commented 8 months ago

Doh. I just figured out what it was. Seeing how no one could reproduce the issue, I started eliminating PaperWM as the root cause. Turns out it was a Chrome extension I use firenvim.

Chrome allows it to intercept certain keyboard shortcuts. For some reason this didn't play well when paired with PaperWM (has never happened until I switched to PaperWM).

Sorry for wasting your time and thanks for taking this issue so seriously.

jtaala commented 8 months ago

All good @borring - glad you found it.

jtaala commented 8 months ago

Closing due to issue caused by chrome extension.