https://bugs.winehq.org/show_bug.cgi?id=57954
Bug ID: 57954 Summary: Watch_Dogs black splash screen 10.3 rawinput:add_device Failed to open device Product: Wine Version: 10.3 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: zlice@crtdrift.us Distribution: ---
Created attachment 78201 --> https://bugs.winehq.org/attachment.cgi?id=78201 wd-winedbg
10.2 seems to work fine, 10.3 gives an error about rawinput and the splash screen that should have the main character and game title is a black box and hangs
using wow64 build, other 32bit games seem to work fine.
running with WINEDBEUG ends in multiple varying lines of
`0158:warn:rawinput:add_device Failed to open device file L"\??\HID#some-device-name#{hex-hash-id}", status 0xc0000034.`
https://bugs.winehq.org/show_bug.cgi?id=57954
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Watch_Dogs black splash |Watch_Dogs black splash |screen 10.3 |screen |rawinput:add_device Failed | |to open device | Keywords| |regression
--- Comment #1 from Zeb Figura z.figura12@gmail.com --- Adjusting title; the warning is probably unrelated.
https://bugs.winehq.org/show_bug.cgi?id=57954
--- Comment #2 from zlice zlice@crtdrift.us --- short test, looks like it's still a problem in 10.4
https://bugs.winehq.org/show_bug.cgi?id=57954
--- Comment #3 from zlice zlice@crtdrift.us --- same with 10.5
http://bugs.winehq.org/show_bug.cgi?id=57954
--- Comment #4 from zlice zlice@crtdrift.us --- did a bisect, first bad commit is supposedly dec96acdc75dc5b64c75b9edbed147aae140ffed
``` --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -309,7 +309,7 @@ static Bool filter_event( Display *display, XEvent *event, char *arg ) case ConfigureNotify: case PropertyNotify: case ClientMessage: - return (mask & QS_POSTMESSAGE) != 0; + return (mask & (QS_POSTMESSAGE | QS_SENDMESSAGE)) != 0;
```
taking out the QS_SENDMESSAGE works again
http://bugs.winehq.org/show_bug.cgi?id=57954
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |dec96acdc75dc5b64c75b9edbed | |147aae140ffed CC| |cpabst@codeweavers.com
http://bugs.winehq.org/show_bug.cgi?id=57954
--- Comment #5 from zlice zlice@crtdrift.us --- still present in 10.7
http://bugs.winehq.org/show_bug.cgi?id=57954
zlice zlice@crtdrift.us changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |winex11.drv
--- Comment #6 from zlice zlice@crtdrift.us --- the issue seems to be in the FocusIn event in the switch() above ClientMessage. returning there without the QS_SENDMESSAGE works. confused to why though
http://bugs.winehq.org/show_bug.cgi?id=57954
--- Comment #7 from zlice zlice@crtdrift.us --- so, we have a race condition.
adding a WARN() debug (in multiple places, but specifically...) to `dlls/winex11.drv/event.c : call_event_handler` will allow for the splash screen to focus (or w/e is going on with that) and then the main game window starts. although it is too chugged down with WINEDEBUG to be responsive...
what i was trying to see was why thread_data->current_event was being set then unset back to what it was. not sure if that's important or related. or even what the deal is with the focus event(s) for post vs send message to be a show-stopper.
http://bugs.winehq.org/show_bug.cgi?id=57954
--- Comment #8 from zlice zlice@crtdrift.us --- Created attachment 78604 --> http://bugs.winehq.org/attachment.cgi?id=78604 suggested_focus_patch
i think i found out how/where to check for the race condition.
it seems like the 'active' vs 'focus' window is not in sync on some window managers and runs different/faster for whatever reason. but this can easily be checked for in `dlls/win32u/input.c : set_active_window()` at the front since 'active' should be 'focus' ??? i don't really know the distinction in windows api.
that said, i don't know why the original change was made for QS_SENDMESSAGE in the first place. so maybe limiting focus back to only QS_POSTMESSAGE is fine
http://bugs.winehq.org/show_bug.cgi?id=57954
Rafał Mużyło galtgendo@o2.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |galtgendo@o2.pl