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
steamlinux commented 5 years ago

one solution at this moment - remember for open chat, before start the game

gpt3ch commented 5 years ago

i am having the same issue on ubuntu 18.04, cannot believe this is being faced by all the linux users still valve wont fix it!! :(

Strykar commented 5 years ago

Same issue on Ubuntu 18.10, Dota 2 alt-tabs out to the message window every time someone PMs me. Occasionally, when Steam starts, it will load previous chat messages and some of the tabs appear as unread, when in fact, I have read and closed those chat messages before.

Steam sysinfo

kaadmy commented 5 years ago

Another issue I'm having of a similar vein is that Steam gets forced focus sometimes (mainly when starting a game), and switches to the workspace that Steam is running in. Using i3wm.

steamlinux commented 5 years ago

for me steam always get focus, when create some window

dauddimas commented 5 years ago

[Complaint Part] Same thing happens to me. I have to change my username in steam "Don't whisper me while playing". And even if my friends knew the issue I have, sometimes they forget and still whisper me, which leads to get blamed by my teammates and lose the game. Although I'm only playing dota2 but I have pretty much MMR, that's why it's very unpleasant since my games now getting intense and harder, every second counts. Hope valve will fix it soon.

[Question Part] Does KDE have the same issue? Installed KDE not long ago because of curiosity, thanks for your answer.

OvermindDL1 commented 5 years ago

Does KDE have the same issue? Installed KDE not long ago because of curiosity, thanks for your answer.

At least for me I've not had the chat window grab focus, I've had multiple times where it's been blinking away in the background trying to get my attention but I don't see it because the game is focused. Might be a setting I use though?

dauddimas commented 5 years ago

At least for me I've not had the chat window grab focus, I've had multiple times where it's been blinking away in the background trying to get my attention but I don't see it because the game is focused. Might be a setting I use though?

Any settings you've changed? Wanna get workaround for this problem, but pretty confused of windows setting in KDE Tweak, since I'm a newcomer. I have no more patience, because even accidentally press menu hotkey would steal focus of the game ._.

OvermindDL1 commented 5 years ago

Any settings you've changed? Wanna get workaround for this problem, but pretty confused of windows setting in KDE Tweak, since I'm a newcomer. I have no more patience, because even accidentally press menu hotkey would steal focus of the game ._.

Probably, but I've been running this install for so long that I'm not sure what is 'standard' about it anymore... ^.^;

What do you mean by 'menu hotkey'? Steam's overlay? Something else?

headlesscyborg commented 5 years ago

Th issue doesn't bother my anymore since the new Steam chat update a few months ago - Steam now opens a chat window automatically when I launch it so it's not stealing focus anymore. Do you people manually close all chat windows before closing Steam itself?

steamlinux commented 5 years ago

I always use '-silent' option and steam ingnore tyis at last week they stealing focus on startup, but message dialog doesn't create

rastating commented 5 years ago

Also experiencing this on Ubuntu 18.04

rastating commented 5 years ago

I've found a work around to this tonight. In the friends window, to the left of the minimise button will be a button to "Toggle chat window docking". If you click this, it will open new chat windows as a tab within the friends window. As long as you have the friends window open before launching the game, any new chats will become tabs of that window, and thus will stop your game minimising and focusing on a new window - as there isn't a new window being created.

Not the best of solutions, if you like to have separate windows for every open conversation, but it's certainly better than getting minimised out of a game at a crucial moment!

ghost commented 5 years ago

I've found a work around to this tonight. In the friends window, to the left of the minimise button will be a button to "Toggle chat window docking". If you click this, it will open new chat windows as a tab within the friends window. As long as you have the friends window open before launching the game, any new chats will become tabs of that window, and thus will stop your game minimising and focusing on a new window - as there isn't a new window being created.

Not the best of solutions, if you like to have separate windows for every open conversation, but it's certainly better than getting minimised out of a game at a crucial moment!

But it still SHOULD`T be an issue, and should be fixed.

rastating commented 5 years ago

But it still SHOULD`T be an issue, and should be fixed.

Of course - I didn't suggest otherwise. Until such time as Valve fix it though, the above is a way to work around it; as opposed to not using Steam.

Saroumane commented 5 years ago

18 months later, bug still not fixed. Thanks @rastating for the workaround.

soprendi commented 5 years ago

Why is this still an issue? This is depressing!

KatharineKatharsis commented 5 years ago

it is appalling that valve has done checks notes ZERO to fix this shit...

ghost commented 5 years ago

@KatharineKatharsis look when i made this issue...

dauddimas commented 5 years ago

I've found a work around to this tonight. In the friends window, to the left of the minimise button will be a button to "Toggle chat window docking". If you click this, it will open new chat windows as a tab within the friends window. As long as you have the friends window open before launching the game, any new chats will become tabs of that window, and thus will stop your game minimising and focusing on a new window - as there isn't a new window being created.

Not the best of solutions, if you like to have separate windows for every open conversation, but it's certainly better than getting minimised out of a game at a crucial moment!

this solution works pretty well on high-tier computer, but for average computer like mine, this workaround costs your patience more than you think. since you have to be patient when all of a sudden your computer is freezing in-game, turns out it's your friend sends you message.

KibaGasteiz commented 5 years ago

this solution works pretty well on high-tier computer, but for average computer like mine, this workaround costs your patience more than you think. since you have to be patient when all of a sudden your computer is freezing in-game, turns out it's your friend sends you message.

And what are your specs? Never had a problem with this.

mscharstrom commented 5 years ago

I'm also having issues with this. Still no solution?

erikrecio commented 5 years ago

Hey man, this issue just happened to me as well. I have Win10 and it never happened before, until i reinstalled Steam. I always had it in my main storage disc SD250, but now i put it in my secondary one with 2TB (not SD).

Probably this has something to do with the problem, at least for windows, although it shouldn't be happening. I'll use the chat solution for now, hope it gets fixed.

ghost commented 4 years ago

+1 It has been almost two years and this bug still hasn't been resolved, could someone at least be assigned to this?

KibaGasteiz commented 4 years ago

This, i just have the merged window activated so any new friend message won't create a new window, but it's annoying.

at94official commented 4 years ago

Good Day, Valve Team. Still no solution for this bug? It's bothering.

ghost commented 4 years ago

This, i just have the merged window activated so any new friend message won't create a new window, but it's annoying.

I asked about this on the Steam LUG and one person suggested using do-not-disturb, this fixed the issue for me although now I don't get any chat notifications. Not a great solution but at least I don't get pulled out of my game every time someone pings me

AFPV-au commented 4 years ago

It's totally broken actually if you open a chat window at all (ie, to send a message, not just receiving) from within the steam overlay the source engine game is minimized and then broken when you tab back in.

This happens on current Ubuntu / Pop!_OS 19.10 (gnome 3.34.1), it's apparently gnome related which is the default window manager on these OS.

One work around is to enable "dock chats to the friends list" from "friends list" then 'settings -> chat'. This prevents new windows from opening (if you start the game with the friends list open) and so wont steal focus and minimize your game and corrupt the offset of the full screen view.

This bug is particularly bad on Pop!_OS as the custom gnome front end they use has a top bar that causes a game malfunction once focus is stolen. Alt-tab to switch back to your game after receiving a chat message the full-screen view will be shifted down about 30 pixels from where the hit box for menus is located. I noticed this behaviour in Left for Dead 2, probably does it in other source engine games as well but I haven't tested. The bottom of the full screen view is cut-off, and the top has a bar that is now not redrawn. So you can't even use the game after alt-tabbing back. A severe bug as it destroys an online game every time you get a message, not acceptable!

There surely must be a work around for this that can be implemented in the steam client. The end user should not be having this experience on the officially supported Linux distribution of steam !?

AFPV-au commented 4 years ago

Hey thanks guys, I realise you guys are probably trying to find a way to make it work, but unless people complain to reinforce the issue is ongoing and its severity I think some bugs get forgotten about. Overall it's really impressive the support Linux now has with steam. Fantastic, really.

On Thu, 16 Jan 2020 at 03:42, Efthimios Chaskaris notifications@github.com wrote:

"should your issue not be resolved immediately, it does not mean that a resolution is not being researched or tested"

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/steam-for-linux/issues/5286?email_source=notifications&email_token=AOIHOYD775W7A7BIUTVRZX3Q544GLA5CNFSM4EIRRLEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJA66LY#issuecomment-574746415, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOIHOYBVUIFLO42MVISUSKDQ544GLANCNFSM4EIRRLEA .

rindo-eiji commented 4 years ago

Having the same issue on manjaro-gnome. whenever i play Dota I lose the focus of the window when someone messages me. and they do that everytime I play. in crucial moments. I tried the dock chat window to the friends list. hope it works. I know there is a lot of DE in the linux world but I really hope someone is working on this.

takdw commented 4 years ago

Having the same issue on manjaro-gnome. whenever i play Dota I lose the focus of the window when someone messages me. and they do that everytime I play. in crucial moments. I tried the dock chat window to the friends list. hope it works. I know there is a lot of DE in the linux world but I really hope someone is working on this.

I went around this problem, by leaving one chat window open at all times. The focus steal happens only when its opening up a new chat window. So if you leave a chat window open, the next new chat will just be added to the same window but in a different tab, and there will be no focus loss from the game.

ghost commented 4 years ago

This really needs to be fixed, its still around in February 2020

dearlygparted commented 4 years ago

I went around this problem, by leaving one chat window open at all times. The focus steal happens only when its opening up a new chat window. So if you leave a chat window open, the next new chat will just be added to the same window but in a different tab, and there will be no focus loss from the game.

Yes, leaving a chat window open works (there is an option to have new chats open a tab rather than a new window which is enabled by default).

Another workaround is to enable Do Not Disturb mode (you'll get notifications for any received messages, but it will prevent new chat windows from popping up automatically).

AFPV-au commented 4 years ago

So I noticed recently an update fixed the issue with the top bar in gnome causing the full screen to be offset once you alt-tab back to the game. At least it's not terminal anymore if the game minimizes due to a chat message, or if you alt-tab out of it to check other software.

So as of now, in gnome 3.34.2 at least on Pop!_OS 19.1, the alt-tab works with full screen.

If you have "dock chat windows to friends list" enabled then the chat messages no longer steal focus as long as you start the game with the friends list open. If you had the friends list window closed the game will minimize still on the first message, but then subsequent messages will not steal focus anymore if you leave it open. Alt-tab works to get back to the game. Great.

So that's partially fixed, but much better behaviour now.

udekmp commented 4 years ago

Hey I think this is the same problem I had on both Ubuntu and Pop!_OS 20.04 with GNOME. The two workarounds above me work fine.

box2- commented 4 years ago

This is now happening on Windows too.

AFPV-au commented 4 years ago

Lol.

On Sun, 14 Jun 2020 at 09:58, box2- notifications@github.com wrote:

This is now happening on Windows too.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/steam-for-linux/issues/5286#issuecomment-643695735, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOIHOYAPFYWRPJUUXDNBMMLRWQHBNANCNFSM4EIRRLEA .

robobenklein commented 4 years ago

Got really tired of this issue so I wrote a small program to grab focus back when it's stolen: https://github.com/robobenklein/protectmyfocus

Has been working for me and prevents chat windows, etc. from stealing focus from games, browsers, terminals, etc. It should work for any window (hooks on X11 events) but having focus taken and immediately returned might mess with fullscreen apps.

I obviously don't have every game so I'd like some help testing.

soprendi commented 4 years ago

Good job

guustflater commented 4 years ago

Same problem here (Ubuntu 20.04)

AFPV-au commented 4 years ago

Further on this issue;

It worth nothing that having the "friends" list open actually has a negative impact on frame rates in competitive games (such as liftoff and counterstrike).. I notice a drop of around 50FPS if any embedded content is present in the text, when the chat is left open. On this quad core cpu when im otherwise getting 300fps. It's not enough to leave it open you need to close it sometimes after replying (yes I have turned off content embedding, I still get performance drops) so the issue returns when they send another message.. I've taken simply to logging out of friends now when I go to steam. Over it frankly.

Got really tired of this issue so I wrote a small program to grab focus back when it's stolen: https://github.com/robobenklein/protectmyfocus

Nice work robobenklein, I'll give it a try.

To Valve: If this a gnome issue, isn't it obvious by now they are NOT going to change the behaviour, so maybe its time to fix the steam client to work around it?

jcnils commented 4 years ago

Same problem on manjaro. Going offline and online again seems to fix the for a while

I am using gnome, and it happens with all games

LevBernstein commented 4 years ago

Problem still exists on Ubuntu 20.04.

Moskonfyt commented 4 years ago

I FIXED IT! I have been a linux user for about 8 months now and used Manjaro to ease myself into Linux, there have been a few frustrations but the other day I had to draw the line and discovered Pop OS, everything was nice and dandy till I started playing Csgo. The fps was on par and felt good until the invites started, so I started searching and found no results, so I told myself I'll give it a month and see if I can resolve it.. so I did it in the first day. I started with the desktop customization and found it's very limited (actually a lot) but that could be because I'm a new Linux user and still need some experience, I got used to XFCE and wanted that back.

The search began and quickly found the command to transform to XFCE and whuala you won't believe it my Csgo is fixed... can receive messages without me loosing my focus in a comp and invited can flow again... there is still one thing that worked on Manjaro but not in Pop Os tho and it's Windowed Full Screen, because I have 3 monitors with Manjaro the game won't minimize when working on another screen during a game/overwatch... I find it strange that Pop Os haven't been paying attention to the community seeing as there is a full team working to polish the system? I hope my solution help you guys, and really hope someone from Pop Os fix the windowed Full screen otherwise I'll keep on tinkering till it's fixed or...

soprendi commented 4 years ago

I FIXED IT! I have been a linux user for about 8 months now and used Manjaro to ease myself into Linux, there have been a few frustrations but the other day I had to draw the line and discovered Pop OS, everything was nice and dandy till I started playing Csgo. The fps was on par and felt good until the invites started, so I started searching and found no results, so I told myself I'll give it a month and see if I can resolve it.. so I did it in the first day. I started with the desktop customization and found it's very limited (actually a lot) but that could be because I'm a new Linux user and still need some experience, I got used to XFCE and wanted that back.

The search began and quickly found the command to transform to XFCE and whuala you won't believe it my Csgo is fixed... can receive messages without me loosing my focus in a comp and invited can flow again... there is still one thing that worked on Manjaro but not in Pop Os tho and it's Windowed Full Screen, because I have 3 monitors with Manjaro the game won't minimize when working on another screen during a game/overwatch... I find it strange that Pop Os haven't been paying attention to the community seeing as there is a full team working to polish the system? I hope my solution help you guys, and really hope someone from Pop Os fix the windowed Full screen otherwise I'll keep on tinkering till it's fixed or...

Not all heroes wear capes!

KibaGasteiz commented 4 years ago

I FIXED IT!

I don't understand, what we need to do to fix this?

echaskaris commented 4 years ago

I FIXED IT!

I don't understand, what we need to do to fix this?

From what I understand, switch to xfce desktop manager

Chiitoo commented 4 years ago

Several different window managers offer varying levels of 'focus stealing prevention', which may help at least some people with this kind of issues. It's not a perfect solution, nor a fix, but perhaps better than nothing (I haven't tried how Steam would react with, say, 'extreme' level of prevention, but if it gets past that, I'd imagine it would take this issue to another level).

Moskonfyt commented 4 years ago

Just some feedback regarding Pop Os, after switching to Xfce desktop a few things happened regarding repositories and struggled to get that fixed... tried a few repositories but nothing worked, started the old fashion apt-get update in terminal after that had some authentication issues. Long story short I moved over to MX and boy is this a treat, everything works as it should Windowed Full screen everything and the speed is amazing... if anyone want to move over from ubuntu based distros give MX a go.

Meister1593 commented 3 years ago

I have pretty nasty issue on AwesomeWM, when someone starts chatting to me in-game, whole screen starts being obstructed by steam chat because i use tiling by default, and game is full screen (not entirely on-top for everything) - so i have to alt-tab to chat and move it somewhere else. Thought i think it's quite easy to fix for me - just make a rule for such thing, but i had somewhat similar issues in other DE's and wm's