Hi,
I want to start by thanking Valve for porting Steam and some of their games to Linux.
However, as it is - and I realize it's still in beta - the Steam client looks & feels rather alien on my desktop:
1) For one, Steam hides the frame and title bar of all it's windows. This is bad for usability as various window managers (WMs) use this space to provide additional functionality. For example KWin provides tabbing and in my setup I can push windows to the back of the stack or toggle windows to always stay on top with a single click. Further, non-client-side window management allows me to move, resize, shade or otherwise interact with the window (frame) even if the program hangs or has a modal dialog - not that Steam would ever have any bugs.
Of course I wouldn't dream of asking Valve to implement all these nifty features in the client itself - after all other users will want their own set of functionality. Instead, Steam should simply make use of the frame the existing WM provides. All it would take is to not set the _MOTIF_WM_HINTS property. Also there will surely be those who prefer the way it is now, so an option for this would be useful.
Now, this part can actually be done with KWin already by setting application-specific settings. However, proper support in Steam would be much better and there are other bugs that make this less usable:
2)
Currently Steam stets the _NET_WM_NAME property of all windows to just "Steam". This is unfortunate as (at least some) WMs will use that string for window titles in the frame and task bar. Interestingly enough Steam already sets the WM_NAME name property to the more descriptive title that is also used in it's client-side window decorations.Update: Now Steam doesn't set the _NET_WM_NAME and WM_ICON_NAME properties at all anymore. The
ICCCM specifies that all windows should set this (and just "Steam" was a sensible value there), so setting it would be good for compatibility.
While not required, setting
_NET_WM_NAME to the same value as WM_NAME because it has the same semantic but a fixed type "UTF8_STRING" whereas the type of
WM_NAME varies by application: Qt uses "COMPOUND_TEXT", gtk uses "STRING" and Steam uses "UTF-8".
3) Another thing that makes Steam feel out of place is that it insists on manually positioning it's windows. WMs under Linux generally do a very good job at placing windows intelligently - and in some cases the exact behavior can be configured by the user. Why then would Steam not respect the users preferred positioning algorithm? Again, all it would take is to not call XMoveWindow()/XMoveResizeWindow().
4) To take full advantage of the WMs window positioning, Steam needs to classify windows by setting the _NET_WM_WINDOW_TYPE property. At the minimum, dialog windows should be given the _NET_WM_WINDOW_TYPE_DIALOG value so that the WM can center them or put them under or near the mouse cursor - or whatever else the WM/user likes. Menu windows are already correctly classified as _NET_WM_WINDOW_TYPE_MENU. Also, initial window sizes need to be set *before* the window is shown (ideally before it is mapped).
5) Finally Valve should consider Grouping the the Steam windows together using the window_group WM_HINT and the WM_CLIENT_LEADER property. This will prove interaction with the WM's focus stealing prevention (if the running WM has that feature). With KWin this also has the added benefit that "Dim Inactive" desktop effect will leave all Steam windows at full brightness when any Steam window has focus (if configured to apply the effect to window groups).
I have created
a fully working proof of concept to demonstrate these changes, in the form of a library that can be LD_PRELOADed and then intercepts a few Xlib calls.
Of course as-is the contrast between Steam and the frame doesn't exactly look pretty, but for me it's not worth to give up the improved (and more importantly: consistent) window management. And of course users can use a matching WM theme or skin Steam.
On that note, if any Valve dev (or beta participant that wants to forward the bug) reads this: The Linux Steam clients doesn't list any available skins in the config dialog because it sees ~/Steam/skins/skin_name/ but then expects the skin_name folder to be in the current working directory (ie: ~/Steam/skin_name/). Adding a symlink there works.
Edit: I found more problems:
6) Some steam dialogs (Settings, game properties, ...) have a satatic layout but the windows are resizable as far as the WM knows. Even without window frames there are usually ways to maximise or resize windows (Alt+right mouse button). So set a window as non-resizeable steam needs to set both the minimum and maximum size in the WM_NORMAL_HINTS property to the desired size.
7) Error messages are set to unmanaged (override_redirect window attribute) and have _NET_WM_WINDOW_TYPE set to _NET_WM_WINDOW_TYPE_MENU. The type should be _NET_WM_WINDOW_TYPE_DIALOG. Even modal dialogs should be managed by the WM: set _NET_WM_STATE to _NET_WM_STATE_MODAL before the window is mapped.
I hope some dev will read ... why this king of powered linux users were not invited in the close beta ???
This post has been linked in the Limited Beta subforum, so hopefully it'll get the attention it deserves.
Amazingly my colour scheme fits the one from Steam. :D
This, obviously, also fixes the window positioning on dual screens.
I'm not sure if it's ok to upload the entire changed resource files, so here is a patch instead.
To use it:
mkdir -p skins/noframe/resource/styles
cp resource/styles/steam.styles skins/noframe/resource/styles/
cp resource/steamscheme.res skins/noframe/resource/
patch -d skins/noframe -p0 < noframe.patch
ln -s skins/noframe ./ # work around a bug in steam