Open Joshua-Ashton opened 2 years ago
Looks like it is another WS_EX_NOACTIVATE
like https://github.com/Plagman/gamescope/issues/87
We start picking the right window with #310 and then with the override redirect stuff, the dropdowns start to work somewhat -- they still have some issues with bounding the cursor in the right place there though that I am going to look into.
Window details for the dialog we want to focus (compare with the one in #87 which we don't want to focus):
xwininfo: Window id: 0x1000003 "Fallout: New Vegas Options"
Absolute upper-left X: 412
Absolute upper-left Y: 200
Relative upper-left X: 412
Relative upper-left Y: 200
Width: 456
Height: 319
Depth: 24
Visual: 0x24
Visual Class: TrueColor
Border width: 0
Class: InputOutput
Colormap: 0xe00001 (not installed)
Bit Gravity State: NorthWestGravity
Window Gravity State: NorthWestGravity
Backing Store State: NotUseful
Save Under State: yes
Map State: IsViewable
Override Redirect State: no
Corners: +412+200 -412+200 -412-201 +412-201
-geometry 456x319+412+200
_NET_WM_ICON(CARDINAL) = Icon (32 x 32):
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
_NET_WM_BYPASS_COMPOSITOR(CARDINAL) = 0
_NET_WM_STATE(ATOM) = _NET_WM_STATE_SKIP_PAGER, _NET_WM_STATE_SKIP_TASKBAR
_NET_WM_NAME(UTF8_STRING) = "Fallout: New Vegas Options"
WM_ICON_NAME(STRING) = "Fallout: New Vegas Options"
WM_NAME(STRING) = "Fallout: New Vegas Options"
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
Initial state is Normal State.
bitmap id # to use for icon: 0xe00275
bitmap id # of mask for icon: 0xe00277
window id # of group leader: 0x1000001
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DIALOG
WM_TRANSIENT_FOR(WINDOW): window id # 0x1000001
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x24, 0x0, 0x0, 0x0
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified location: 412, 200
program specified minimum size: 456 by 319
program specified maximum size: 456 by 319
window gravity: Static
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0xe00011
XdndAware(ATOM) = BITMAP
_NET_WM_PID(CARDINAL) = 49324
WM_LOCALE_NAME(STRING) = "C"
WM_CLIENT_MACHINE(STRING) = "craptop"
WM_CLASS(STRING) = "steam_app_22380", "steam_app_22380"
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, _NET_WM_PING
xwininfo: Window id: 0x29f (the root window) (has no name)
Root window id: 0x29f (the root window) (has no name)
Parent window id: 0x0 (none)
21 children:
0x1000003 "Fallout: New Vegas Options": ("steam_app_22380" "steam_app_22380") 456x319+412+200 +412+200
0x1000001 "Fallout: New Vegas": ("steam_app_22380" "steam_app_22380") 794x390+0+0 +0+0
0x1000008 (has no name): ("steam_app_22380" "steam_app_22380") 263x117+564+283 +564+283
0x1000007 (has no name): ("steam_app_22380" "steam_app_22380") 263x78+564+361 +564+361
0x1000006 (has no name): ("steam_app_22380" "steam_app_22380") 263x104+564+335 +564+335
0x1000005 (has no name): ("steam_app_22380" "steam_app_22380") 263x117+564+310 +564+310
0x1000004 (has no name): ("steam_app_22380" "steam_app_22380") 263x130+564+257 +564+257
0x1000002 "Default IME": ("steam_app_22380" "steam_app_22380") 1x1+0+0 +0+0
0xe00011 (has no name): () 1x1+-1+-1 +-1+-1
0xc00001 "Steam": ("steam_app_22380" "steam_app_22380") 400x300+40+40 +40+40
0xc00002 "Default IME": ("steam_app_22380" "steam_app_22380") 1x1+0+0 +0+0
0xa00008 (has no name): () 1x1+-1+-1 +-1+-1
0x800007 (has no name): ("steam_app_22380" "steam_app_22380") 1x1+0+0 +0+0
0x800006 (has no name): ("steam_app_22380" "steam_app_22380") 1x1+0+0 +0+0
0x800005 (has no name): ("steam_app_22380" "steam_app_22380") 1x1+0+0 +0+0
0x800004 (has no name): ("steam_app_22380" "steam_app_22380") 1x1+0+0 +0+0
0x800002 (has no name): ("steam_app_22380" "steam_app_22380") 1x1+1280+720 +1280+720
0x800003 "Default IME": ("steam_app_22380" "steam_app_22380") 1x1+0+0 +0+0
0x600014 (has no name): () 1x1+-1+-1 +-1+-1
0x800001 (has no name): () 1x1+0+0 +0+0
0x400001 "steamcompmgr": () 1x1+0+0 +0+0
The differences we can use to detect this case are:
_NET_WM_STATE_ABOVE
set for achievement popup but not option dialog_NET_WM_WINDOW_TYPE
set to _NET_WM_WINDOW_TYPE_NORMAL
for the achievement window, and _NET_WM_WINDOW_TYPE_DIALOG
for the option dialogShould investigate why wine sets "Client accepts input or input focus: True" in Hm this one just means that the window accepts focus when clicked.WM_HINTS
for the Origin achievement. I don't believe it should...
Yeah I tried detecting dialog and that worked, but it turns out the problem was actually just not following transient windows for input focus correctly.
We should come back to that DIALOG thing and keep it in mind if there are other games that don't have the transient link that have focus issues on dialogs.
When opening the options menu in the Fallout New Vegas launcher, the input focus does not move, the cursor remains clipped to the initial launcher window, but the visual focus does move to the options window.
This doesn't happen for the Data Files menu, that one works fine.
When launching the game on Desktop, I noticed that the options + data files menu had different title bar styles, could be related?