protonscr

Steam "close window" button just minimizes. Perhaps implement a system tray?

steamclosed reviewedNot a bug
ValveSoftware/steam-for-linux#11 · opened 2012-12-20 by sreich · updated 2014-06-17 · 18 comments · github
Ssreich 2012-12-20 github

Clicking the close button on Steam's main window minimizes the window.

I'm assuming this is because you guys haven't gotten around to implementing a system tray, or deciding on how to handle this exactly.

If you do choose the system tray route, which honestly I prefer for an app like Steam, I recommend using the freedesktop.org Status Notifier API, which is adopted by both Canonical (Unity) and KDE.

For how to implement it, take the source code from this commit by quassel, which is a cross platform application (quassel runs on everything).

https://github.com/sandsmark/quassel-proxy/commit/b858144c9d38623bdd9afaa02c404d9515243ab7

EDIT: this has the advantage that (a) you have a modern system tray implementation for free, and (b) on systems that don't support it (like a system that isn't KDE or Unity), it falls back to xembed which is the old classic way of doing system tray icons (which has a lot of limitations, hence why this "newer" specification exists and is used).

?ghost 2012-12-20 github

Quassel is licensed under GPL v3, so Valve cannot use it.

But Taskbar Notification Area support is a good feature request. Executing Steam/win32 via wine already supports it.

Ssreich 2012-12-20 github

Sorry about that, I gave the wrong link. The maintainer of Quassel made a mistake and had it under GPL2 (or optionally, 3) in his initial commit. His future commits, linked below (HEAD), remedies that.

Here's LGPL2+, you should be able to use the code just fine.

https://github.com/quassel/quassel/blob/master/src/qtui/statusnotifieritem.cpp

KKrywk 2012-12-20 github

Steam HAS a system tray icon, it just doesn't close the window when you click the 'Close' button.

I would also like the Steam window to be actually closable, minimized to system tray.

Sswiftgeek 2012-12-20 github

And it's possible to compile it on x86_64 but it's ultra-ugly - it needs this patch https://gist.github.com/4293782 (Otherwise it would need lib32-python which is plain stupidity)

But it still have few issues - it isn't themed properly and it lags terribly :< (I'm using xfce4's systray)
A serious rework is needed for libappindicator or steam should change tray implementation…

KKrywk 2012-12-20 github

I don't think x86_64 is supported yet.

Sswiftgeek 2012-12-20 github

Read gist and recompile with that patch ;)
It only cuts off unnecessary python dependencies for unnecessary python bindings

There should be "--disable-python-bindings" and the same for mono in libappindicator ./configure :(
But this isn't steam's bug

Ssreich 2012-12-20 github

@swiftgeek

The lack of theming for libappindicator is likely an xfce issue.

And steam should not look at a different system tray implementation, because it's either xembed or status notifier, and xembed is completely dead. Xembed already has a huge list of issues that are just unfixable, doesn't integrate properly, and will be 100% unusable when we move to wayland. It's also a huge hack, as it embeds actual X windows inside a systemtray, which is another window..terrible design.

Take it up with XFCE and have them fix your DE because it's clearly quite broken.

Sswiftgeek 2012-12-20 github

But that legacy support in appindicator still could be improved.
"Patches welcome" would be actually good enough :<

And on another side — xfce4 is for now as far from wayland as possible :D

LLukasThyWalls 2012-12-21 github

When i wasn't enrolled to the closed beta, the first days of it, i test the deb file and the tray icon was there in KDE. At some point of developing this was modified.

Ddanbruegge 2013-01-09 github

Same here, a click on the close button minimize steam. On Archlinux 64bit and Xfce 4.10 with current kernel and nouveau driver.

LLukasThyWalls 2013-01-09 github

I install libappindicator for test system tray icon in my KDE but i have this

steamLinux_libappindicator

It works, but with that icon.

PD.: For everyone, libappindicator don't make Steam minimize on systray, only show the systray icon

Ggdrewb-valve maintainer 2013-01-16 github

Response from Canonical

Sorry to see that you have experienced a problem with Steam for Linux.

Steam includes application indicator support so that you can quickly access Steam's functionality within your panel. This appears in your panel as a small icon with a menu that appears when you click on it. This application indicator works in all versions of Ubuntu that Steam supports (12.04 and later) as well as many other desktops (such as KDE) and the distributions that ship those desktops.

If you run Steam under Ubuntu and you don't see the indicator, please report the bug to the Ubuntu developers. Doing this is simple; simply click the Ubuntu button, enter 'terminal' to load a Terminal, and enter the following command:

ubuntu-bug indicator-application

and follow the instructions. When asked for a summary, please enter 'libappindicator support for Steam is broken'. You may see that the bug has already been filed.

If you are using another distribution you should report a bug with your distribution with the same description. You should be able to find instructions for how to file your bug in your distribution's documentation.

Pleae don't report the bug to Valve. Apologies again for the problem.

Sswiftgeek 2013-01-16 github

I have quick idea how to test if valve can actually fix it / make a workaround
Just test various formats of icon for appindicator and check if it helps. If this is the case, then valve should file a bug with better description than "libappindicator support for Steam is broken'"

Again it's ultra hard to say anything without seeing the sources...
If i had access then i would just applied boolean logic to the problem, then i would both filed more detailed bug report and placed workaround in steam

(this is about that blank icon on KDE4 https://github.com/ValveSoftware/steam-for-linux/issues/11#issuecomment-12047628 )

Jjohndrinkwater 2013-01-16 github

@swiftgeek maybe you could introspect dbus and share that.

MMajkl578 2013-02-06 github

This is interesting. Since today (but before applying today's/yesterday's update), I'm seeing Steam tray icon. I'm not aware of installing or updating any packages that might be related. (Debian x86_64 experimental, Gnome Shell 3.6)

Kkatanacrimson 2013-02-06 github

@Majkl578 there was an update yesterday apparently - might be related.

LLukasThyWalls 2013-02-08 github

Now in KDE i have the Steam icon with the image, menu and all since the last from repository file update.

But, what about the minimize/close in the and only show that icon? When i click the "X" icon it just minimize. I will test https://github.com/ValveSoftware/steam-for-linux/issues/1025 solutions first and i will going here to comment or create a new issue if it's needed.

Ggl1tch2gh0st 2014-06-17 github

UBUNTU

From Ask Ubuntu, answered: minerz029

To do this only for your user, you need to run this command in a terminal:

echo 'STEAM_FRAME_FORCE_CLOSE DEFAULT=1' >> ~/.pam_environment

Then logout and log back in.

Alternatively, you could add it for all users with this command:

echo 'STEAM_FRAME_FORCE_CLOSE=1' | sudo tee -a /etc/environment

Then logout and log back in.