ValveSoftware / Dota-2

Tracker for issues specific to Linux and Mac in the Reborn client. If you have a general issue or non-system-specific feature request please go to dev.dota2.com
469 stars 38 forks source link

Dota 2 windows won't give focus to other windows when switching applications with alt tab #1911

Open astroty opened 3 years ago

astroty commented 3 years ago

https://gist.github.com/astroty/ebea2793cfd5f5b7662e925041a6528e (Multi monitor setup) (Desktop-friendly fullscreen without minimize on focus loss)

Ever since the newcomers update, dota 2 has been having issues with windows focus. When I start playing a game (watching doesn't have this issue), the mouse stays stuck in dota, not being able to exit the window unless I go back to main menu.

Alt tabbing doesn't work, as if I tab into any windows under dota, it just grabs back focus and the window never switches. Switching to other windows only works if, while I'm with alt tab pressed, and the window being switched to isn't behind dota, I push my cursor over to the edge of the game before releasing it. This leads me to assume that since it's on the edge, maybe one pixel more, dota doesn't detect the mouse as being hovering over the window so it doesn't try to grab focus again.

Hovering the mouse over dota when it doesn't have focus doesn't make it grab focus back. Im not sure if this is due to the window manager focus loss prevention, but this is something I observed.

Disabling the Bring fota 2 to front options doesn't seem to take any effect on this issue.

Steam runtime active and inactive doesn't seem to make a difference to this issue.

ucan35 commented 3 years ago

Having similar issue with single monitor here. Dota 2 keeps stealing focus while in-game. Unless the cursor is outside of the window when tabbing out, dota 2 keeps focus to itself. This does not happen while in main menu (or anything that is not in-game). My system is xfce4, nvidia and opengl/vulkan.

astroty commented 3 years ago

Issue persists after the update

dagolinuxoid commented 3 years ago

Yeah alt tabbing sometimes is buggy. This is the reason why I run dota on a separate workspace - switching between workspaces is good (super+1/ super+2)

CallMeDinsdale commented 6 months ago

Still a thing sadly...

theghettofresh commented 2 months ago

I had the same issue. Try running it on Borderless Window. For some odd reason when it's on "Exclusive Fullscreen", it gives Dota 2 complete focus and will put all windows behind it even when your mouse is moving it. But I changed it to Borderless Window and it fixed it. Just make sure you hit Apply and it should fix it. If not, I'm not sure what your true problem really is. Hope this helps.