steam-for-linux icon indicating copy to clipboard operation
steam-for-linux copied to clipboard

Chat window steals focus from a game when it pops-up

Open ghost opened this issue 7 years ago • 123 comments

Your system information

Ubuntu 18.04x x64 GTX980 Properitary driver Gnome 3.26

  • Steam client version (build number or date): 1-07-2018
  • Distribution (e.g. Ubuntu): Ubuntu 18.04
  • Opted into Steam client beta?: [Yes/No] No
  • Have you checked for system updates?: [Yes/No] Yes

Please describe your issue in as much detail as possible:

Describe what you expected should happen and what did happen. Please link any large code pastes as a Github Gist Chat window steals window focus when someone sends me a message, but leaving it open in background fixes the issue.

Steps for reproducing this issue:

  1. Open any game
  2. Make someone send you a message
  3. Observe keybaord input and mouse input taken away from a game into the chat window

ghost avatar Dec 16 '17 16:12 ghost

Hello @Qik000, do you happen to have the steam overlay disabled with the games you are seeing this issue with?

kisak-valve avatar Dec 16 '17 18:12 kisak-valve

I have overlay enabled. When i open the chat in the overlay it also opens a new separate chat window which steals the focus again.

ghost avatar Dec 16 '17 21:12 ghost

same problem, game minimize when steam create chat window and gift too debian sid 64 bit, gnome 3.26, nvidia 384.98, steam beta

steamlinux avatar Dec 19 '17 16:12 steamlinux

@steamlinux i think i doesnt matter that you opted into beta. It happens on every update channel

ghost avatar Dec 19 '17 19:12 ghost

@triage-valve can we get some help ? Or at least get info on how to disable chat window popups ?

ghost avatar Dec 20 '17 20:12 ghost

try at 1st open chat with someone, before you start game

steamlinux avatar Dec 21 '17 01:12 steamlinux

@steamlinux it helps but its not exactly a solution. Valve could easily fix this.

ghost avatar Dec 21 '17 13:12 ghost

I have also run into this issue on my system:

Fedora 27 64-bit Gnome 3.26 GTX 970 w/ proprietary driver

jimbair avatar Jan 08 '18 01:01 jimbair

Imagine trying to play an online multiplayer game, you get a message from a friend and it causes the game to minimize. You quickly try to alt tab back into the game but you've died. GG. Fix this please!

dearlygparted avatar Jan 22 '18 21:01 dearlygparted

@dearlygparted thats exactly wat happend to me. And since Ubuntu is now using Gnome Valve should really fix it ASAP.

ghost avatar Feb 06 '18 13:02 ghost

@triage-valve is anyone working on this issue ?

ghost avatar Feb 06 '18 13:02 ghost

It happens EVERY DAY. Its always nice when it happens on the middle of a Team Fight while playing dota

admshao avatar Feb 13 '18 02:02 admshao

It's worse on i3. Let's say I leave Steam BigPicture open on a workspace, and I'm with the terminal emulator Termite in another workspace. If I'm on the workspace with the Termite taking the entire screen and someone from Steam chat communicates with me, a normal Steam chat window opens up and this happens:

  • https://github.com/i3/i3/issues/2401#issuecomment-367519037

oblitum avatar Feb 22 '18 03:02 oblitum

Settings > Friends > Flash window when I receive a message > Never Even with this it pops up chat windows on Gnome 3.26 Worked fine in Xfce 4

ghost avatar Feb 25 '18 10:02 ghost

@hickop do you know any way how to fix this ? It seems that Valve doesnt give a cup boout it.

ghost avatar Feb 26 '18 19:02 ghost

Valve pls, this must be fixed asap

ghost avatar May 19 '18 22:05 ghost

Looks like this is the the default behavior for any newly spawned windows and Gnome.

~Check if running gsettings set org.gnome.desktop.wm.preferences focus-new-windows 'strict' in a terminal makes Gnome behave as expected.~

~Note: This setting can be reverted to default with gsettings set org.gnome.desktop.wm.preferences focus-new-windows 'smart'.~

~Note for a Valve dev: If newly spawned chat windows can have _NET_WM_USER_TIME set to 0 when there is a game running, that should give the desired effect.~

kisak-valve avatar May 19 '18 23:05 kisak-valve

I have the new focus setting set to strict but the windows still steal focus anyways.

robobenklein avatar May 20 '18 01:05 robobenklein

@kisak-valve that works on everything EXCEPT steam...

ghost avatar May 20 '18 12:05 ghost

Fix this please. I hate having to login into a Unity session everytime I want to play some DOTA.

takdw avatar Jun 01 '18 08:06 takdw

Tried using all the above mentioned but still no solution yet.

vibhas77 avatar Jun 11 '18 06:06 vibhas77

@kisak-valve I switched to Ubuntu 18.04 which is an LTS build, and you claim that steam is working perfectly on LTS, well ITS NOT. With the stock Gnome from 18.04 EXACT same thing happens. Can you finally fix it ?

ghost avatar Jun 15 '18 18:06 ghost

Tested with the new beta chat and it's still the same problem there as well.

robobenklein avatar Jun 16 '18 03:06 robobenklein

I'm also having this problem on Arch with Gnome 3.28 on both the stable and beta chat clients.

Edit: To add some detail, setting 'focus-new-window' to strict does improve things - the game no longer minimizes, however there's still duplicate Steam chat windows that pop up (one in overlay, one 'real' window in the desktop) and the desktop one still displays over the game. On top of that, my Gnome title bar appears as well as the dock (as I have 'dash to dock' installed, the dock shows whenever a topmost window is not nearby or fullscreen).

Vash63 avatar Jun 16 '18 15:06 Vash63

Yup, this issue is annoying to say the least. In old chat I just used to keep chat window open - that wouldn't minimize the game while playing and receiving a message. But with new chat beta it's worse - it minimizes the games on every single message received. No matter if window was already spawned or not.

furai avatar Jun 19 '18 06:06 furai

@triage-valve can you filnally do something about your program on a system that you claim that steam WORKS PERFECTLY ? It doesnt work as intended, setting windows policy to strict affects all applications EXCEPT steam !

CAN YOU FINALLY FIX THIS AFTER ALL THIS TIME ? And also the notofication popup in the corner laggs the whole Gnome while its moving. Is there anything else you will leave broken ?!

ghost avatar Jul 01 '18 14:07 ghost

~~There seems to be a workaround: https://askubuntu.com/questions/906328/games-minimize-on-steam~~ It doesn't work

Right click the game, select properties, then set launch options. Put this in the field:

SDL_VIDEO_MINIMIZE_ON_FOCUS_LOST=0 %command%

Then click OK and you're done.

mdesantis avatar Jul 17 '18 17:07 mdesantis

@mdesantis I wouldn't really consider that a workaround, since the keyboard input is still shifted from the SDL application to the new Steam window, the envvar doesn't actually prevent the change of window focus at all.

robobenklein avatar Jul 17 '18 18:07 robobenklein

@robobenklein you're right, it doesn't even work.

mdesantis avatar Jul 18 '18 07:07 mdesantis

I have the same issue on Pop!_OS using Gnome 3.28.2. I don't have this issue on KDE.

timjstacey avatar Jul 24 '18 02:07 timjstacey