ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.26k stars 175 forks source link

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

Open ghost opened 6 years ago

ghost commented 6 years ago

Your system information

Ubuntu 18.04x x64 GTX980 Properitary driver Gnome 3.26

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
kisak-valve commented 6 years ago

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

ghost commented 6 years ago

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.

steamlinux commented 6 years ago

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

ghost commented 6 years ago

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

ghost commented 6 years ago

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

steamlinux commented 6 years ago

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

ghost commented 6 years ago

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

jimbair commented 6 years ago

I have also run into this issue on my system:

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

dearlygparted commented 6 years ago

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!

ghost commented 6 years ago

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

ghost commented 6 years ago

@triage-valve is anyone working on this issue ?

admshao commented 6 years ago

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

oblitum commented 6 years ago

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:

ghost commented 6 years ago

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 commented 6 years ago

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

ghost commented 6 years ago

Valve pls, this must be fixed asap

kisak-valve commented 6 years ago

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.~

robobenklein commented 6 years ago

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

ghost commented 6 years ago

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

takdw commented 6 years ago

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

vibhas77 commented 6 years ago

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

ghost commented 6 years ago

@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 ?

robobenklein commented 6 years ago

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

Vash63 commented 6 years ago

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).

furai commented 6 years ago

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.

ghost commented 6 years ago

@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 ?!

mdesantis commented 6 years ago

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.

robobenklein commented 6 years ago

@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.

mdesantis commented 6 years ago

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

timjstacey commented 6 years ago

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

ghost commented 6 years ago

@timjstacey they claim that steam works 100% perfectly on Ubuntu - which uses GNOME ! And on top of that its an LTS release !!!

headlesscyborg commented 6 years ago

@qik000 I'm 100% sure they never said that.

I am however experiencing the same on Arch with Gnome 3.28. I got used to it and learned to open a chat window before playing anything (Steam beta does it automatically now).

ghost commented 6 years ago

@kisak-valve still NOT FIXED in the new update.

mdesantis commented 6 years ago

And it's even more annoying now, since with new Friends UI is not possible to disable friends at Steam startup!

timjstacey commented 6 years ago

The below is not a workaround for Gnome, see comment below from @robobenklein. Leaving text here for context.

I stumbled over something here that seems to do the trick for me https://superuser.com/questions/143044/how-to-prevent-new-windows-from-stealing-focus-in-gnome

sudo apt install compizconfig-settings-manager ccsm

Go to General > General Options > Focus & Raise Behaviour. Change Focus Prevention Level to normal

Not sure what impact this has in Gnome, or if it's actually fixing the problem. Seems to be working so far.

steamlinux commented 6 years ago

maybe gnome have similar option on dconf?

steamlinux commented 6 years ago

I type "focus" on dconf and see some options. maybe someone know, what need to change? idk

kisak-valve commented 6 years ago

Hello @steamlinux, see https://github.com/ValveSoftware/steam-for-linux/issues/5286#issuecomment-390438395 and discussion following it.

steamlinux commented 6 years ago

new behavior? hm.... but, if other app create new window, I doesn't focus to him only steam always get focus. example while run and install updates (without -silent option). steam, while start, create some windows (install update, connect to profile, open library) and always steam windows get focus. another apps doesn't do this

robobenklein commented 6 years ago

@timjstacey What DE does that work for you on? Gnome Shell is using metacity, not compiz, so my first thought would be that it wouldn't have the same effect.

timjstacey commented 6 years ago

@robobenklein I'm using Gnome 3.28.2 and you are right, it didn't fix it. I have a friend in steam that when ever I opened a chat with them in game, the desktop window would steal focus and dump me onto desktop. After running compiz I opened a chat window with that same friend and didn't get dumped to desktop, so thought it had fixed the issue. After testing a little further, I realised that the opening a chat window in steam overlay with the last person you spoke with will dump you onto desktop.

To replicate: Start a game, in my case cs:go Open steam overlay Open friends list Open chat window with the last friend that sent you a message in your previous session

Result: Desktop chat window steals focus

The only successful workaround I have found is to open a chat window with the last person you spoke with before starting a game. Hardly the best work around, but seems to stop the issue from reoccurring in the testing I have done.

ghost commented 6 years ago

@timjstacey its not really a workaround. Its a hassle

ghost commented 6 years ago

@headlesscyborg and they said to me a while ago back when i was on arch and i wrote on the steam support: "We can only guarantee steam`s functionality on Ubuntu [...] we cannot help you if you are not using the Ubuntu OS"

ovollbrecht commented 6 years ago

I came here from Windows and its the damn same desaster! It's driving me insane..

Mher594 commented 6 years ago

I wonder how long will it take to fix this issue xD

steamlinux commented 6 years ago

I report issue about sound on l4d2 in 2014, valve doesn't fix it (4 year) how many time for this issue? hmmm....

AlexsanderAR commented 6 years ago

Same issue here. Every single chat message steals the focus minimizing the game. It's so annoying and frustrating. Now I'm playing with chat offline to prevent that. Ubuntu 18.04 Gnome 3.28 Game: Dota2

lucifertdark commented 6 years ago

For me the chat window is stealing focus from the entire system every time it pops up, is there any way to stop it popping up at all unless I want to use it? Ubuntu 18.04 Gnome 3.28

vmavromatis commented 6 years ago

I hate to spam threads, but can you please fix this issue as it's been almost a year? Thank you

dearlygparted commented 5 years ago

Hello, can we get an update on this?

This is a real problem especially given other issues like this one:

https://github.com/ValveSoftware/Dota-2/issues/985