paperwm / PaperWM

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

Godot constantly refocuses itself #740

Open tmayoff opened 9 months ago

tmayoff commented 9 months ago

Describe the bug When switching between windows, Godot always seems to refocus itself. This happens with the main godot editor then also when launching the game.

Godot is the only program I've experienced this with

To Reproduce I'm not sure if it's only godot causing this but

  1. Open Window 1 (anything, firefox or something)
  2. Open Godot
  3. Switch to window 1
  4. PaperWM scrolls back to godot

Expected behavior Should switch to Firefox and stay on firefox until keyboard shortcut/gesture to switch back

Screenshots Screencast from 2023-12-23 09-51-20.webm

System information: Please execute ./gather-system-info.sh in you PaperWM clone and paste the output below.

Distribution: NixOS
GNOME Shell 45.2
Display server: Wayland
PaperWM branch/tag: release
PaperWM commit: 6bead84704bf4db8fb7eb2ecd94bb1212059f7c3
Enabled extensions:
- nightthemeswitcher@romainvigier.fr
- paperwm@paperwm.github.com
- blur-my-shell@aunetx
- ddterm@amezin.github.com

Additional context A workaround for now seems to be to fullscreen the window (like double clicking the window's topbar), but it's tedious and annoying to have to do

jtaala commented 9 months ago

Thanks for reporting - yep, that would be annoying.

Any other applications this is happening on?

jtaala commented 9 months ago

Lastly, how was Godot installed? (distro repo or flatpak? or some other way?) - just going to try reproduce.

jtaala commented 9 months ago

Thanks @tmayoff - I can reproduce so will dig into this soon.

tmayoff commented 9 months ago

You reproduced it already, but to answer the questions, seems to just be Godot that this is happening with, it was installed through nixpkgs on nixos

jtaala commented 9 months ago

Right, Godot seems to be doing some really funny stuff when it comes to focusing/defocusing (sometimes when another window gets focus, it toggles focus on godot windows).

Anyways, suspect this is an upstream godot issue, as other linux window managers are seeing this behaviour, see:

Marking as upstream for now.

Lythenas commented 9 months ago

I noticed some games doing the same but don't remember which exactly. I think it also depended on if it was fullscreen or not and if it was capturing the mouse or not. But I haven't had the same problem with any "normal" desktop apps.

nicolas-yangli commented 8 months ago

I have a similar problem with Spotify (flatpak). It randomly steals focus and PaperWM scrolls to it. A workaround is to send it to scratch.