protonscr

Steam Chat window persists across all desktops and is not ordinarily selectable in latest update

steamclosed duplicatereviewed
ValveSoftware/steam-for-linux#852 · opened 2013-01-25 by TShadwell · updated 2013-01-27 · 8 comments · github
TTShadwell 2013-01-25 github

When I click on a name in my friends list, the steam chat window comes up for that person and focuses the window so I can type. The window cannot be focused (in my window manager, windows are focused on hover). In addition, the window persists across all desktops. Buttons on the window function as normal, so does the textarea.

Assuming it was hinting, I ran xwininfo -all on the main steam window, the friends window and the offending chat window to see the difference using diff3:

====
1:6c
  xwininfo: Window id: 0x120001b "Steam"
2:6c
  xwininfo: Window id: 0x1200099 "Namehere - Chat"
3:6c
  xwininfo: Window id: 0x1200013 "Friends"
====
1:9c
    Parent window id: 0x400468 "[i3 con] container around 0x188cb70"
2:9c
    Parent window id: 0x290 (the root window) "i3"
3:9c
    Parent window id: 0x400462 "[i3 con] container around 0x18903e0"
====
1:12,17c
    Absolute upper-left X:  418
    Absolute upper-left Y:  320
    Relative upper-left X:  2
    Relative upper-left Y:  0
    Width: 992
    Height: 730
2:12,17c
    Absolute upper-left X:  1432
    Absolute upper-left Y:  153
    Relative upper-left X:  1432
    Relative upper-left Y:  153
    Width: 436
    Height: 819
3:12,17c
    Absolute upper-left X:  1
    Absolute upper-left Y:  47
    Relative upper-left X:  2
    Relative upper-left Y:  0
    Width: 286
    Height: 880
====
1:23c
    Colormap: 0x120001a (not installed)
2:23c
    Colormap: 0x1200098 (not installed)
3:23c
    Colormap: 0x1200012 (not installed)
====
1:30,31c
    Corners:  +418+320  -2430+320  -2430-30  +418-30
    -geometry 992x730+416-28
2:30,31c
    Corners:  +1432+153  -1972+153  -1972-108  +1432-108
    -geometry 436x819+1432+153
3:30,31c
    Corners:  +1+47  -3553+47  -3553-153  +1-153
    -geometry 286x880+-1+47
====2
1:57a
3:57a
2:58c
        Initial state is Iconic State
====
1:61c
        Program supplied minimum size: 900 by 600
2:62c
        Program supplied minimum size: 396 by 351
3:61c
        Program supplied minimum size: 220 by 250

Other than the given difference between window position sizes, titles, geometry, colourmap and parent that is expected, there is also this difference, which is only in the chat window.

1:57a
3:57a
2:58c
        Initial state is Iconic State

This particular problem seems to have happened to Mathematica before. I looked around for programs that can start in iconic mode– xterm has the -iconic flag, it does have the flags just as the chat window does when it starts, but it still tillable, focusable etc. I did a diff between the xwininfo -all output of the steam Friends window, the Chat window and xterm -iconic to see why.

diff3 chatWindow xterm friends | sed -e 's/^1/Chat Window/g' -e 's/^2/Xterm/g' -e 's/^3/Friends/g'

====
Chat Window:6c
  xwininfo: Window id: 0x1200099 "Sneeza™ - Chat"
Xterm:6c
  xwininfo: Window id: 0x3a00022 "thomas@qrt0:~"
Friends:6c
  xwininfo: Window id: 0x1200013 "Friends"
====
Chat Window:9,17c
    Parent window id: 0x290 (the root window) "i3"
       0 children.

    Absolute upper-left X:  1432
    Absolute upper-left Y:  153
    Relative upper-left X:  1432
    Relative upper-left Y:  153
    Width: 436
    Height: 819
Xterm:9,18c
    Parent window id: 0x4004aa "[i3 con] container around 0x1893b00"
       1 child:
       0x3a0002d (has no name): ()  956x174+0+0  +1922+904

    Absolute upper-left X:  1921
    Absolute upper-left Y:  903
    Relative upper-left X:  1
    Relative upper-left Y:  1
    Width: 956
    Height: 174
Friends:9,17c
    Parent window id: 0x400462 "[i3 con] container around 0x18903e0"
       0 children.

    Absolute upper-left X:  1
    Absolute upper-left Y:  47
    Relative upper-left X:  2
    Relative upper-left Y:  0
    Width: 286
    Height: 880
====2
Chat Window:19c
Friends:19c
    Visual: 0x27
Xterm:20c
    Visual: 0x21
====2
Chat Window:21c
Friends:21c
    Border width: 0
Xterm:22c
    Border width: 1
====
Chat Window:23c
    Colormap: 0x1200098 (not installed)
Xterm:24c
    Colormap: 0x20 (installed)
Friends:23c
    Colormap: 0x1200012 (not installed)
====
Chat Window:30,31c
    Corners:  +1432+153  -1972+153  -1972-108  +1432-108
    -geometry 436x819+1432+153
Xterm:31,32c
    Corners:  +1921+903  -961+903  -961-1  +1921-1
    -geometry 158x13+1920-0
Friends:30,31c
    Corners:  +1+47  -3553+47  -3553-153  +1-153
    -geometry 286x880+-1+47
====2
Chat Window:43,44c
Friends:43,44c
        ButtonPress
        ButtonRelease
Xterm:43a
====2
Chat Window:47,49c
Friends:47,49c
        PointerMotion
        ButtonMotion
        Exposure
Xterm:45a
====
Chat Window:58,59c
        Initial state is Iconic State
        Process id: (unknown)
Xterm:54,55c
        Initial state is Iconic State
        Process id: 28050 on host qrt0
Friends:58c
        Process id: (unknown)
====
Chat Window:62,63c
        Program supplied minimum size: 396 by 351
        Program supplied maximum size: 32767 by 32767
Xterm:58,66c
        Program supplied size: 484 by 316
        Program supplied minimum size: 10 by 17
        Program supplied base size: 4 by 4
        Program supplied x resize increment: 6
        Program supplied y resize increment: 13
        Program supplied size in resize increments:  80 by 24
        Program supplied minimum size in resize increments: 1 by 1
        Program supplied base size in resize increments:  0 by 0
        Program supplied window gravity: NorthWestGravity
Friends:61,62c
        Program supplied minimum size: 220 by 250
        Program supplied maximum size: 32767 by 32767

I can't see any particular reason in the second diff that stands out from the other two for xterm other than the known process id, maybe someone else can tell.

I followed up with an xprop- only the offending chat window has the withdrawn state, meaning the window manager has refused to make the transition to the normal state for some reason, perhaps the diffs can help, there is also a stackoverflow answer talking about this.

5c5
<       window state: Normal

---
>       window state: Withdrawn
7c7

Window state is set to "withdrawn" only for the offending chat window; the iconic prop window and the main steam window are set to normal.

DDarkDefender 2013-01-25 github

I think this is the same problem as in #836

TTShadwell 2013-01-25 github

Yes, that appears to be the same issue.

Ddavidw-valve maintainer 2013-01-25 github

Closing as a duplicate of #836

Ggdrewb-valve maintainer 2013-01-26 github

The reason the chat window is appearing on all desktops is that the window manager doesn't appear to be managing it. That's why the parent is the desktop and not i3. We are not setting override-redirect so that's unusual, as the window manager should have decided to manage it. As we don't see this behavior on Unity it seems like i3 is having some kind of problem.

Are you saying the chat window is visible while in the Withdrawn state? That shouldn't happen according to ICCCM.

TTShadwell 2013-01-26 github

The problem also seems to appear in, in addition to i3, in xmonad and awesomewm. Yes, the chat window is in the withdrawn state:

WM_NORMAL_HINTS(WM_SIZE_HINTS):
        program specified minimum size: 396 by 351
        program specified maximum size: 32767 by 32767
WM_STATE(WM_STATE):
        window state: Withdrawn
        icon window: 0x0
WM_NAME(UTF8_STRING) = "Someone - Chat"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW
WM_HINTS(WM_HINTS):
        Client accepts input or input focus: True
        Initial state is Iconic State.
_NET_WM_ICON(CARDINAL) =    Icon (48 x 48): [icon removed for space]



_WIN_HINTS(_WIN_HINTS) = 0x0
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x0, 0x0, 0x0
WM_CLASS(STRING) = "Steam", "Steam"
Ggdrewb-valve maintainer 2013-01-26 github

The Withdrawn state must be a side effect of the window manager deciding not to manage the window. That's the heart of the problem, and I'm not sure why it's happening.

TTShadwell 2013-01-26 github

I'm looking a little further into this problem, i3 is aware that something odd is going on

26/01/13 19:59:31 - ERROR: Clicked into unknown window?!
26/01/13 19:59:31 - ERROR: Clicked into unknown window?!
26/01/13 19:59:32 - ERROR: Clicked into unknown window?!
26/01/13 19:59:32 - ERROR: Clicked into unknown window?!

I'll edit this post with some more information when I look through i3's source later.


The chat window behaves very strangely. When i3 is restarted in place, it ends up in a strange state in which the window is only drawn when the main steam window is over the top of it.

In addition, I've found a reproducible set of actions that do strange and unintuitive things eventually actually fixing the problems with the chat window:

  1. Run steam
  2. Open a chat window
  3. Wait for all notifications to close (notifications at any time seem to disrupt this sequence)
  4. Restart i3 in-place
  5. Restart in-place
  6. Window is now correctly handled by the window manager

From the C source concerning in-place restarts:

    /* What follows is a fugly consequence of X11 protocol race conditions like
     * the following: In an i3 in-place restart, i3 will reparent all windows
     * to the root window, then exec() itself. In the new process, it calls
     * manage_existing_windows. However, in case any application sent a
     * generated UnmapNotify message to the WM (as GIMP does), this message
     * will be handled by i3 *after* managing the window, thus i3 thinks the
     * window just closed itself. In reality, the message was sent in the time
     * period where i3 wasn’t running yet.
     *
     * To prevent this, we grab the server (disables processing of any other
     * connections), then discard all pending events (since we didn’t do
     * anything, there cannot be any meaningful responses), then ungrab the
     * server. */

I can't really draw much from this, other than the fact that there is a bug that was introduced in the last update that changed how a chat window was opened to one that seems to disagree with most window managers.

TTShadwell 2013-01-27 github

Updated the last post with a workaround that fixes the problems until Steam is restarted.

Nothing extracted yet.