Steam for Linux > การสนทนาทั่วไป > รายละเอียดกระทู้
dscharrer 16 พ.ย. 2012 @ 8:07am
Steam windows managed by the window manager
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[tronche.com] 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[standards.freedesktop.org] 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[tronche.com] 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[gist.github.com] 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.
ได้รับการแก้ไขครั้งสุดท้ายโดย dscharrer; 17 เม.ย. 2013 @ 2:39am
กำลังแสดง 1-15 จาก 25 ความเห็น
< >
Stanley 16 พ.ย. 2012 @ 8:22am 
Good work man.

I hope some dev will read ... why this king of powered linux users were not invited in the close beta ???
blackout24 16 พ.ย. 2012 @ 8:25am 
Because Gentoo != Ubuntu.
paradigm 16 พ.ย. 2012 @ 8:43am 
This gets my support as well. I hope the relevant Valve developers take this up.
ThOR27 16 พ.ย. 2012 @ 9:12am 
Awesome stuff. Linux has many different DE, so stick to standards are always the best option. I agree that some people will prefer windows without decoration, but an option for that is really needed.
NeoTheFox 16 พ.ย. 2012 @ 9:36am 
See?[i.imgur.com] ;)
Ram-Z 16 พ.ย. 2012 @ 9:36am 
Great work, thanks.
This post has been linked in the Limited Beta subforum, so hopefully it'll get the attention it deserves.
mdkcore 16 พ.ย. 2012 @ 10:07am 
OK, very good work, but it will break its hegemony with the windows application, no?
ได้รับการแก้ไขครั้งสุดท้ายโดย mdkcore; 16 พ.ย. 2012 @ 10:11am
Ram-Z 16 พ.ย. 2012 @ 10:21am 
I'll just leave a screenshot[dl.dropbox.com] too.
Amazingly my colour scheme fits the one from Steam. :D

This, obviously, also fixes the window positioning on dual screens.
ได้รับการแก้ไขครั้งสุดท้ายโดย Ram-Z; 16 พ.ย. 2012 @ 10:23am
TomTom 16 พ.ย. 2012 @ 3:58pm 
+1 for that changes. Thanks dscharrer, you've done great work with that.
Spongeroberto Squarepantalones 16 พ.ย. 2012 @ 4:30pm 
That looks great. +1 from me.
Ru.sh 16 พ.ย. 2012 @ 6:33pm 
This is a risk when big companies like Valve start to develop software for our beloved open platform. They are used to doing things differently, their own way or perhaps the way they were used to do things while they were still developing for Windows. I sure do hope they will listen though and adhere to proper Linux window management conventions. Doing that will probably also solve (at least some of) the issues people are having running Steam in Xmonad that I read about in other threads. +1
ได้รับการแก้ไขครั้งสุดท้ายโดย Ru.sh; 16 พ.ย. 2012 @ 6:35pm
dscharrer 17 พ.ย. 2012 @ 1:16am 
Made a Steam skin that removes the client-side window decorations:

I'm not sure if it's ok to upload the entire changed resource files, so here is a patch instead[raw.github.com].

To use it:
cd ~/Steam
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
The you'll be able to select the "noframe" skin in the settings dialog.
ได้รับการแก้ไขครั้งสุดท้ายโดย dscharrer; 17 เม.ย. 2013 @ 2:39am
blackout24 17 พ.ย. 2012 @ 1:22am 
Nice that looks wonderful.
[Linux] MJ 17 พ.ย. 2012 @ 10:03am 
gratz; you've just won the internet... or at least this forum
The Hot Trout 17 พ.ย. 2012 @ 4:00pm 
That's great! Much more natural behaviour with these modifications
กำลังแสดง 1-15 จาก 25 ความเห็น
< >
ต่อหน้า: 15 30 50