Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close to Tray #1025

Closed
kevincox opened this issue Jan 29, 2013 · 109 comments
Closed

Close to Tray #1025

kevincox opened this issue Jan 29, 2013 · 109 comments

Comments

@kevincox
Copy link

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.

@ghost ghost assigned gdrewb-valve Jan 29, 2013
@gdrewb-valve
Copy link
Contributor

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.

@kevincox
Copy link
Author

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

@Majkl578
Copy link

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

@gdrewb-valve
Copy link
Contributor

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.

@ghost ghost self-assigned this Jan 29, 2013
@kevincox
Copy link
Author

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
Copy link
Author

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.

@gdrewb-valve
Copy link
Contributor

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.

@kevincox
Copy link
Author

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
Copy link
Author

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

@LiamDawe
Copy link
Contributor

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.

@kevincox
Copy link
Author

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.

@LukasThyWalls
Copy link

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

@Majkl578
Copy link

Majkl578 commented Feb 8, 2013

@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… :)

@gdrewb-valve
Copy link
Contributor

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.

@austincrft
Copy link

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

@kevincox
Copy link
Author

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

@austincrft
Copy link

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

@kevincox
Copy link
Author

Changing that line to

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

Should work.

@kevincox
Copy link
Author

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/

@nmschulte-aviture
Copy link

nmschulte-aviture commented Nov 19, 2016

So exactly as I said. Valve can't control it, the Wm does.

I guess we're talking about two different "Its" then. The "it" I'm referring to, and what this issue is about (as Valve has even clarified, as per my last reply), is that Steam treats "close" like "minimize." If it would just treat "close" like "close," those with software compliant to the spec would have the expected behavior. ("close" closes the window). (Which is everyone: everyone's WM knows how to "close" a window.)

Valve can't control defects in Unity/Metacity/Compiz/"app indicator"-thing/..., sure, but they can control whether or not they let those defects cripple the functionality for everyone. i3bar seems to work fine w/ tray apps. https://unity.ubuntu.com/projects/appindicators/ -- Unity concept, whatever it's used for (I guess it's like an enhanced tray area for Unity), apparently did not (and still does not, as this issue is open still) support some critical tray functionality.

I haven't launched Steam in a good while, but I guess the environment variable to enstill the correct behavior still works.

This issue is going to be turning four years old in January. 🎂

@sharifzadesina
Copy link

@elm0829 I didn't thought you mean WM = Windows Manager!!! dude It is not cause of windows managers system tray is an special feature for desktop environments. WM is just an API for drawing not for controlling. for example all of the steam's tray icon's menu buttons are made with GTK2...

@sharifzadesina
Copy link

@elm0829 You are right, I confused with display servers...

@nmschulte-aviture
Copy link

This issue is going to be turning four years old in January.

@gdrewb-valve -- This issue has been rolling around for 4 years now; do the issues Valve/Steam was running up against w/ Ubuntu/Unity users and app indicators still apply, or can we remove the STEAM_FRAME_FORCE_CLOSE environment variable workaround and make it permanent/default?

@gdrewb-valve
Copy link
Contributor

That's up to the Steam team to decide, if they change anything they'll update this issue.

@alemansec
Copy link

STEAM_FRAME_FORCE_CLOSE=1 env var does not fix it :

$ env|grep STEAM
STEAM_FRAME_FORCE_CLOSE=1

$ steam

wait for it ...
click the close (x) icon

wait ...
keep waiting ...

steam still running minimized...
(stdout|stderr did not even notice the click event or at least shows nothing)

hitting the close button does nothing but minimize the steam client.

@nmschulte
Copy link

nmschulte commented Dec 21, 2016

@alemansec, It sounds like what you're running up against is a different issue, not this one. I tested this behavior, and it works as expected. I replied in your issue about this: #4772 (comment)


steam still running minimized...

As in, Steam still shows in the task panel (list of minimzed windows, not the system tray)? If Steam stays in the tray, but the window closes, then the environment variable is working as intended. It's not supposed to exit Steam, just close the window.

I just want to clarify, as those details got lost along the way to now somehow (at least that's my understanding from grok'ing the thread).

@alemansec
Copy link

alemansec commented Dec 21, 2016

Steam client minimizes when hitting the close icon, with the env var set, but this is ACTUALLY A PROBLEM to me, that's why i opened a issue related to this : issue #4772

in a few words : "close button" in title bar should actually close the dialog (and finally application if MainWindow was closed), not minimize its dialogs/windows ; the minimize icon was MADE FOR THIS SOLE PURPOSE.

Have a look at issue #4772 for details (marked as duplicate by error)

Someone marked it as a duplicate of this issue, hence my comment here (although it's clearly not a duplicate issue).

@LiamDawe
Copy link
Contributor

LiamDawe commented Jan 5, 2017

The latest Steam Beta Client has fixed this for me, great job Valve.

@sharifzadesina
Copy link

@LiamDawe Does closing from DesktopEnvironment also work?

@kisak-valve
Copy link
Member

kisak-valve commented Jan 5, 2017

Closing per "Unify close-to-tray behavior with other platforms. If using a distribution that doesn't have proper compatible tray support, use STEAM_FRAME_FORCE_CLOSE=0" in the 2017-01-05 steam beta client update.

@jchevarley
Copy link

Not sure if I should reopen this, but using the Latest KDE/Plasma release (including frameworks/etc), the latest beta still needs export STEAM_FRAME_FORCE_CLOSE=1 to close to tray, and, now neither right or left clicking on the icon after it minimizes does anything. Before, left clicking did nothing, but right clicking at least brought up the menu where I could open my library.

@kisak-valve
Copy link
Member

Hello @jchevarley, for the system tray menu, there is a new issue report at #4795.

@Hi-Angel
Copy link

How funny that I came here for quite the reverse problem. So, what option should I check to minimize steam into tray upon closing the window?

@sharifzadesina
Copy link

This doesn't work when you are closing steam from Gnome, you have to just click on X button.

@Hi-Angel
Copy link

@sharifzadesina wait, isn't this whole bugreport, that said to be fixed, was about exiting upon pressing "X button"?

@sharifzadesina
Copy link

@Hi-Angel I didn't reply to you, I have just reported a bug :D

@Hi-Angel
Copy link

Anyway, I have to say steam behavior seems to be broken, beacuse there's no way to minimize it to tray at all. Upon closing window it exits. Upon pressing the tray icon it shows a menu. The menu have also no an option to minimize to tray.

@tengwar
Copy link

tengwar commented Jan 28, 2017

@Hi-Angel It should close to tray when you click the main window's "x" button. If that doesn't work then something is wrong. Is your steam fully updated? What DE are you using?

@Hi-Angel
Copy link

@tengwar I have neither DE nor a bar with "x" button upon windows — I'm using a tiling WM, i3. To close steam I simply press the closing hotkey.

@nmschulte
Copy link

nmschulte commented Jan 28, 2017

@Hi-Angel, using i3's kill command and the latest Steam beta, Steam "closes" to the tray (in i3bar) (as does clicking the "X" button). Left or right clicking on the tray icon opens the menu. Choosing "exit" from that menu or Steam's main menu exists steam.

@Hi-Angel
Copy link

@nmschulte weird, for me i3's kill command closes steam completely. Upon opening from terminal, last steam words after I pressed the hotkey:

Refresh rate: 1
Refresh rate: 1                                                                                             
Refresh rate: 1                                                                                             
Refresh rate: 1                                                                                             
Refresh rate: 1                                                                                             
Refresh rate: 1                                                                                             
Refresh rate: 1                                                                                             
Refresh rate: 1                                                                                             
[2017-01-28 20:55:12] Startup - updater built Jan 19 2017 01:22:13                                          
[2017-01-28 20:55:13] Проверка установки...                                                                 
[2017-01-28 20:55:13] Verification complete                                                                 
Unable to remove /home/constantine/.local/share/Steam/CONFIG/SteamAppData.vdf!                              
																											
[2017-01-28 20:55:28] Shutdown                                                                              

i3 version 4.13 here.

@nmschulte
Copy link

I would open a new bug report w/ your details, then. I am running on Debian (unstable) with a build of the latest next of i3.

@Hi-Angel
Copy link

@nmschulte nah, I can't. I'm on Archlinux, it's unsupported.

@Hi-Angel
Copy link

@nmschulte anyway, could you post output of i3 --version, please?

@nmschulte
Copy link

nmschulte commented Jan 28, 2017

@Hi-Angel oh, I didn't realize that mattered. 😐 You could try reproducing it on Debian or Ubuntu. ArchLinux is fairly similar, anyway.

$ i3 --version
i3 version 4.13-35-gd4066a6c (2017-01-10, branch "next") © 2009 Michael Stapelberg and contributors```

@Hi-Angel
Copy link

Hi-Angel commented Jan 28, 2017

@nmschulte well, having another distro doesn't mean I can't make a generic feature request ;)

@nmschulte
Copy link

@Hi-Angel, brilliant!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests