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

Close to Tray

Open kevincox opened this issue 13 years ago • 111 comments

There have been similar reports (#11 and #270) but they have been closed because they were talking about adding a system tray icon which already exists. So to everyone who is reading this without a tray icon don't comment as it will get closed for the same reason.

Currently, when pressing the close or minimize buttons in the main steam window it causes steam to minimize. It would be nice if the minimize button retained it's current behavior while the close button closed the main window but kept it running in the tray.

Currently the only way to have steam running in the tray is by launching it as steam --applaunch $id because the window is never opened. Of course, once you open the window you have no way to close it.

I understand if this is a low priority enhancement request because it does not affect Unity but it would be a nice feature to eventually have implemented for traditional desktops. It is really annoying to have the steam window taking up space in my panel when I am not actively using it and am just keeping it open to receive notifications.

kevincox avatar Jan 29 '13 15:01 kevincox

When the Steam window is minimized where does it go? Does your window manager not support some form of display of minimized windows? The thinking behind the Steam UI is that there's an expectation minimized windows are tracked and available to the user in some way, plus then there's the app indicator icon.

gdrewb-valve avatar Jan 29 '13 20:01 gdrewb-valve

It goes to my panel.

The issue is that I don't want it taking up space there when I hit the close button. I want the window itself to be closed (while leaving the systray icon in my notification area).

kevincox avatar Jan 29 '13 20:01 kevincox

@gdrewb-valve: On Gnome Shell, the window minimizes (disappears), but it is still present in the overlay as an regularly opened window, same for alt+tabbing.

Majkl578 avatar Jan 29 '13 21:01 Majkl578

Ah, I see, you don't want even the minimized form of the window. We deliberately switched the close box to minimize because of the number of people where the app indicator didn't work. If the window actually closes and there is no app indicator there's no UI at all for Steam even though it's still running, so we switched to minimizing. Unfortunately there's no way to know if app indicators are working (presence/absence is not sufficient as even if they're present they do not always work). Our hope is that the problems there will get worked out and then we can remove our workarounds and rely on the app indicator, at which point closing the window will close it.

gdrewb-valve avatar Jan 29 '13 21:01 gdrewb-valve

EDIT: Posted before I saw gdrewb-vavle's reply.

There are three states a window can be in open, minimized or shaded. Open, is as you would expect. The window is on the screen (but may be hidden below other windows). Minimized means the window exists but is not currently on the screen. And shaded is generally a window manager feature for just displaying a titlebar on the screen. All three window types are displayed in the "window buttons" type feature of a panel (a list of all windows).

What I am looking for is when I click the 'X' in the steam UI for the window actually close so that it doesn't appear in this panel.

I probably went more in depth then necessary but I was having trouble articulating.

kevincox avatar Jan 29 '13 21:01 kevincox

I see. That makes perfect sense. Is there any way that you could provide an option to make close behave properly? Even if I had to edit a config file or set an environment variable.

kevincox avatar Jan 29 '13 21:01 kevincox

OK, in the next client if you have STEAM_FRAME_FORCE_CLOSE=1 in your environment the close box will close the window instead of minimize. This is also hopefully temporary as we want to get rid of all of these oddities once we can rely on app inidicators.

gdrewb-valve avatar Jan 29 '13 21:01 gdrewb-valve

Thanks, that is awesome. I already have it set in my shortcut :D I guess this is closed then unless it happens not to work.

kevincox avatar Jan 29 '13 21:01 kevincox

I'm just confirming that this works! Thanks for all of the hard work.

kevincox avatar Jan 31 '13 02:01 kevincox

Hmm where do i pop "STEAM_FRAME_FORCE_CLOSE=1" as adding it to the end of my shortcut so it reads: /usr/bin/steam %U STEAM_FRAME_FORCE_CLOSE=1 Doesn't work for me.

sirsquidfly avatar Jan 31 '13 15:01 sirsquidfly

It is an environment variable so you have to set it one of the following ways.

STEAM_FRAME_FORCE_CLOSE=1 steam

but this might not work for shortcuts. You can work around this by calling the shell directly.

sh -c 'STEAM_FRAME_FORCE_CLOSE=1 steam'

Or you can set it in your environment.

export STEAM_FRAME_FORCE_CLOSE=1
steam

Whatever works for you.

kevincox avatar Jan 31 '13 15:01 kevincox

With the last update, in KDE, the systray icon are fully showing with image and all, but itself can't close to tray. If i opening Steam with STEAM_FRAME_FORCE_CLOSE=1 steam do it, but when i click (one, twice or all times i do) in the Steam tray icon it doesn't do anything, only do something if i open the menu with the secondary button and choose the option.

The questions:

  • When STEAM_FRAME_FORCE_CLOSE=1 steam or a proper fix will be added to Steam automaticly?
  • In your case, clicking only in the systray icon do anything? will it be fixed?

I could create a new issue, but i think to do the questions here first and do it later if it's needed

LukasThyWalls avatar Feb 08 '13 11:02 LukasThyWalls

@LukasThyWalls: The variant with env variable is temporary workaround, since they're now using minimizing instead of closing (due the absence of tray icon for some people). They will change (correct) it later. Clicking on the icon doesn't do anything for me either. The menu that pops up is extremely laggy and extremely ugly. I just hope that must be some kind of joke or something… :)

Majkl578 avatar Feb 08 '13 12:02 Majkl578

There's no firm timeframe for when STEAM_FRAME_FORCE_CLOSE will become the default behavior.

Steam doesn't define the behavior of the icon, what happens when it's clicked on is up to the window manager.

gdrewb-valve avatar Feb 09 '13 00:02 gdrewb-valve

@kevincox I can't figure out where to put the command lines you've suggested. Does it go on the "Exec=" line of the .desktop?

austincrft avatar Feb 17 '13 09:02 austincrft

Yes, but you might need to use the sh one. I'm not sure if the other one will work.

kevincox avatar Feb 17 '13 16:02 kevincox

@kevincox If I'm editing the steam .desktop, would I erase the line that says "Exec=/usr/bin/Steam %U" ?

austincrft avatar Feb 17 '13 16:02 austincrft

Changing that line to

Exec=sh -c 'STEAM_FRAME_FORCE_CLOSE=1 steam' %U

Should work.

kevincox avatar Feb 17 '13 16:02 kevincox

If anyone is interested there is now an AUR package that you can install to make this the default.

https://aur.archlinux.org/packages/steam-closetotray/

kevincox avatar Feb 24 '13 18:02 kevincox

You say "what happens when it's clicked on is up to the window manager". That is nonsense.

You found a way how to assign a context menu to right click, so there must be a way how to assign "open window" action to left click. All the other applications can do it - eg. dropbox opens the folder on left click and has a menu on right. Similarly works pidgin, all music players and all kinds of other dockable apps.

Also, there is no reason why it should take five seconds to open a simple text-only menu!

MightyPork avatar Mar 05 '13 21:03 MightyPork