steam-for-linux
steam-for-linux copied to clipboard
Alt+F4 does not behave as expected when using STEAM_FRAME_FORCE_CLOSE=1
Hi. I use steam On KDE 4.11. I tried the option STEAM_FRAME_FORCE_CLOSE=1 to make steam minimize to tray when closing. When clicking on the close button on steam, it work like a charm. And then I tried to close it by Alt + F4 or by the window Manager (example: expo) it shutdown steam. It should minimize to tray, like any other applications do or when you press the close button.
This is expected behavior as STEAM_FRAME_FORCE_CLOSE only affects the close box. We deliberately exit steam on Alt+F4 of the last window to handle cases where the tray doesn't work. We could add a new environment variable to control Alt+F4 behavior so leaving this open as a feature request.
Then the close button should shutdown steam, just like other close button displayed by the window manager or Alt + F4. The user expect that all close button (including Alt+ F4) behave the same way, and the environment variable should affect all the possibles ways to close it. This would be more user friendly to standardise the multiple way to close it to get the expected behaviour. It's strange to see steam window minimize when clicking on the close button and shutdown when right clicking on the task manager and then clicking on close.
Second this. I expected Alt-F4 to minimize the window, same as clicking the close button (which I absolutely never do anyway; I always use Alt-F4). I wondered why Steam was closing on me all the time until I suspected that Alt-F4 might not behave the same way as the close button. Please implement this! :)
Thirded. Killing the window should have the same behavior as clicking the close button.
Me too. In Windows® Alt-F4 behaves the same as the close button. Should the shell icon fail using the Windows task manager is required. Why the special behaviour for Linux? There are equivalents to the task manager on Linux.
Quinted. It's annoying when I accidently quit steam because I hit alt+f4 like with all my other windows.
I am also experiencing this behavior in GNOME 3.36. Many other apps that have a tray icon (i.e. Discord, Telegram Desktop) close the window but keep running in the background with a tray icon. Closing the Steam window by clicking on the close button works as expected and leaves an icon in the tray.
Alt+F4 fully closes Steam, however.
I also would expect Alt f4 to minimize steam to tray, just like in windows....
I made a thread requesting that Ctrl+q be bound to exiting steam and found out about Alt+F4 and was directed to this thread. Why is the kotkey to exit steam Alt+F4 instead of Ctrl+q? It doesn't seem like Ctrl+q is bound to anything else in client as far as I can tell.
I understand that steam isn't the only app that doesn't have this kotkey bound this way. For example neither does Spoitfy and chromium based browsers and to be honest I have the same question for the devs of those apps as well but I already knew about this issue tracker I wanted to ask here first.
Seems to me the standard is for alt+f4 to close windows (and where applicable leave the app running with a tray icon) whereas ctrl+q outright quits the application.
I often accidentally quit Steam by pressing alt+f4 because I keep expecting it to close to the tray instead of quitting entirely
over 7 years later this error still bugs me :( I'm on Ubuntu 20.04...
over 7 years later this error still bugs me :( I'm on Ubuntu 20.04...
I didn't realized this issue is that old. Please valve, just do this simple change
I don't want to install third programs to add the functionality to the client because I don't want to lose my account
Why is this still not fixed, anyway???
@ValveSoftware, please fix
Still an issue nine years later. I find this very frustrating, as I often do it by accident when I Alt+F4 with the wrong window focused. For example, I mean to Alt+F4 my authenticator app after logging into something, but Steam was actually focused (difficult to tell as Steam doesn't seem to change appearance at all to indicate whether it's focused or unfocused). As a result, Steam then closes out entirely, and I have to waste time waiting for it to fully exit, then launch it again and get set back up.
This problem also happens with i3. I have a key bound to kill
, and when I use that on the Steam window, it terminates all Steam processes. I would have expected it to do the same thing as when I press the X
button: Only close the window, but leave the tray running, as well as any Steam games.
This can be reproduced by running i3-msg '[title="Steam"]' kill
in a terminal, which should close all windows with the title Steam
. Don't do this if you have another program running, also called Steam, which is doing something important like controlling the steam flow of your nuclear reactor.
I looked at https://i3wm.org/docs/userguide.html and found this:
If an application does not provide a mechanism for closing (most applications provide a menu, the escape key or a shortcut like Control+w to close), you can press $mod+Shift+q to kill a window. For applications which support the WM_DELETE protocol, this will correctly close the application (saving any modifications or doing other cleanup). If the application doesn’t support the WM_DELETE protocol your X server will kill the window and the behaviour depends on the application.
So it looks like this WM_DELETE
is the key thing here. I'm guessing other WM/DE also send WM_DELETE
on Alt+F4. The last bit about X killing the window sounds about right.
Perhaps the solution is to implement this WM_DELETE
on Linux?
I've been using i3 for quite some time, and Steam is the first program I've seen that has this behavior. For everything else, i3 kill
does the same thing as the X
button. For example:
- If I open a new window of Firefox,
kill
will only close that window, not the entire Firefox. - If I open ckb-next,
kill
will only close the main window, but leave it running as tray.
In i3 at least, it is possible to define special commands for specific windows. Is there any command or signal at all that can be used to close the main Steam window, without exiting Steam itself (the tray)? I could configure i3 to send this command, instead of kill
, when I use the regular close key on a Steam window. This doesn't help people on other WM/DE though.
Also, @gdrewb-valve above, many years ago (lol), said:
This is expected behavior as STEAM_FRAME_FORCE_CLOSE only affects the close box. We deliberately exit steam on Alt+F4 of the last window to handle cases where the tray doesn't work. We could add a new environment variable to control Alt+F4 behavior so leaving this open as a feature request.
Sounds like he's saying they could add an envar, and when I set this, Alt+F4 on Steam's window will no longer exit Steam. That sounds like a reasonable solution, but there's a bunch of :-1: on it. :shrug:
I can no longer reproduce it on the latest steam beta update.
@kisak-valve I think it's finally a time to close this issue!
Indeed, it seems fixed in the new beta client.
I also can no longer reproduce on the newest beta update.
Does this UI update mean we're heading in the direction of native Wayland support as well?
Closing per the last several comments.