This reverts commit b3eb55227aef198a637f80a2fa0bce74aa0a7190.
Since 278b98f5b21b56abdf9229b12b2a747be6917018 it should be unnecessary to
process the events as the current display mode is written to the registry.
This fixes a random deadlock that happens when a window is updating its state
while another thread changes the current display settings.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6701
This MR should be no-op and doesn't change much, but makes some small refactoring in preparation for an improved window state tracker as designed in https://gitlab.winehq.org/wine/wine/-/merge_requests/6569.
Overall with that full MR not much would be changed either, and instead some existing fields are replaced with a cleaner design, until the end of the MR where state requests are made asynchronous and where the new information is used to decide whether to apply or delay client state updates.
I believe that the whole MR would fix the currently often failing d3d/ddraw tests, and more generally fix race conditions that happen with window state updates. I believe that it should also ultimately make it easier/safer to change the current design, to delay the client state updates a bit more and apply them outside of the driver ProcessEvent calls: tracking the pending and host states accurately and independently of the win32 state will let us decide what change needs to be requested to make them match, at any moment.
The latter would fix some existing bug where applications stop responding as they start a new message loop in response to SC_RESTORE commands, and as we do not process X11 events recursively.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6716
This completely refactors the winex11 window state tracking, keeping track of the desired/pending/current window state and config in a fully asynchronous way, and avoiding duplicate requests. I believe this mitigates various race conditions that we're suffering from, solving most spurious event feedback loops when the X11 state is being applied while some win32 state change is being requested, and fixing the spurious d3d/ddraw/user32 test failures.
--
v6: d3d9/tests: Remove now unnecesary d3d9ex todo_wine / flaky.
winex11: Try updating client window config on (_NET_)_WM_STATE updates.
winex11: Try updating client window state on ConfigureNotify.
winex11: Request only one _NET_WM_STATE bit change at a time.
winex11: Remove now unnecessary (net_)wm_state window members.
winex11: Get rid of the now unnecessary unmap_window helper.
winex11: Request window state updates asynchronously.
winex11: Try updating the client window state in net_wm_state_notify.
winex11: Request window config updates asynchronously.
winex11: Introduce a new window_update_client_config helper.
winex11: Simplify the control flow in ConfigureNotify handlers.
winex11: Introduce a new window_update_client_state helper.
winex11: Simplify the control flow in WM_STATE handlers.
winex11: Avoid updating _NET_WM_STATE on iconic windows.
winex11: Tweak the WM_TAKE_FOCUS event time to workaround a FVWM bug.
winex11: Ignore focus changes during WM_STATE updates.
winex11: Get rid of the now unnecessary mapped window data flag.
winex11: Use desired_state wm_state to decide of the mapped flag.
winex11: Call window_set_wm_state when unmapping embedded windows.
winex11: Get rid of the unnecessary net_wm_state window data member.
winex11: Get rid of the now unnecessary iconic window data flag.
winex11: Use pending_state wm_state to decide whether a window is currently iconic.
winex11: Use pending_state to decide whether to set fullscreen monitor property.
winex11: Use pending_state wm_state to decide if requests can be made directly.
winex11: Compute WM_STATE notify updates in term of style changes.
winex11: Compute ConfigureNotify updates in term of style changes.
winex11: Compute WindowPosChanged updates in term of style changes.
winex11: Avoid requesting unnecessary window config changes.
winex11: Avoid requesting unnecessary _NET_WM_STATE changes.
winex11: Track window config requests and updates.
winex11: Introduce a new window_set_config helper.
winex11: Track _NET_WM_STATE window property requests and updates.
winex11: Introduce a new window_set_net_wm_state helper.
winex11: Introduce a new window_set_wm_state helper.
winex11: Track _XEMBED_INFO window property changes.
winex11: Introduce a new window state tracker.
winex11: Move embedded check in update_net_wm_states / sync_window_style.
winex11: Move ConfigureNotify checks after computing visible rect.
winex11: Rename read_net_wm_state to get_window_net_wm_state.
winex11: Set configure_serial when resizing on display mode change.
winex11: Avoid processing RRNotify events in xrandr14_get_id.
d3d9/tests: Use static class for the dummy window.
d3d9/tests: Avoid creating visible windows concurrently.
wined3d: Check that format_id is >= 0 before assuming it's an index.
DEBUG: gitlab: Only build the last commit.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6569
Instead of a single configure serial, which is simply not enough to
mitigate event feedback loops.
This should (hopefully) address the recent d3d8:device / d3d9:device
test failures on the Gitlab CI, without having to add more `flush_events`
calls to the tests.
I believe it should also provide a more general fix to this race condition
than the configure_serial mechanism.
--
v5: d3d9/tests: Remove now unnecesary d3d9ex todo_wine / flaky.
winex11: Try updating client window config on (_NET_)_WM_STATE updates.
winex11: Try updating client window state on ConfigureNotify.
winex11: Request only one _NET_WM_STATE bit change at a time.
winex11: Remove now unnecessary (net_)wm_state window members.
winex11: Get rid of the now unnecessary unmap_window helper.
winex11: Request window state updates asynchronously.
winex11: Try updating the client window state in net_wm_state_notify.
winex11: Request window config updates asynchronously.
winex11: Introduce a new window_update_client_config helper.
winex11: Simplify the control flow in ConfigureNotify handlers.
winex11: Introduce a new window_update_client_state helper.
winex11: Simplify the control flow in WM_STATE handlers.
winex11: Avoid updating _NET_WM_STATE on iconic windows.
winex11: Tweak the WM_TAKE_FOCUS event time to workaround a FVWM bug.
winex11: Ignore focus changes during WM_STATE updates.
winex11: Get rid of the now unnecessary mapped window data flag.
winex11: Use desired_state wm_state to decide of the mapped flag.
winex11: Call window_set_wm_state when unmapping embedded windows.
winex11: Get rid of the unnecessary net_wm_state window data member.
winex11: Get rid of the now unnecessary iconic window data flag.
winex11: Use pending_state wm_state to decide whether a window is currently iconic.
winex11: Use pending_state to decide whether to set fullscreen monitor property.
winex11: Use pending_state wm_state to decide if requests can be made directly.
winex11: Compute WM_STATE notify updates in term of style changes.
winex11: Compute ConfigureNotify updates in term of style changes.
winex11: Compute WindowPosChanged updates in term of style changes.
winex11: Avoid requesting unnecessary window config changes.
winex11: Avoid requesting unnecessary _NET_WM_STATE changes.
winex11: Track window config requests and updates.
winex11: Introduce a new window_set_config helper.
winex11: Track _NET_WM_STATE window property requests and updates.
winex11: Introduce a new window_set_net_wm_state helper.
winex11: Introduce a new window_set_wm_state helper.
winex11: Track _XEMBED_INFO window property changes.
winex11: Introduce a new window state tracker.
winex11: Move embedded check in update_net_wm_states / sync_window_style.
winex11: Move ConfigureNotify checks after computing visible rect.
winex11: Rename read_net_wm_state to get_window_net_wm_state.
winex11: Set configure_serial when resizing on display mode change.
winex11: Avoid processing RRNotify events in xrandr14_get_id.
d3d9/tests: Use static class for the dummy window.
d3d9/tests: Avoid creating visible windows concurrently.
wined3d: Check that format_id is >= 0 before assuming it's an index.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6569
Micro-optimization works only in Debug build, therefore, it is more correct to name this code refactoring, in my GCC with -O2 flag it does not affect count and decrease cost per CPU clock cycle instructions generated in any way.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6709
This adds support for converting to different WIC formats, in one case to more closely match native d3dx9, and in the other to convert to a format that can actually be represented by d3d9.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6704
This is based on top of !6526, will mark ready after !6526 is merged.
--
v4: DEBUG the gitlab CI test failure.
propsys: Support converting to BSTR for PropVariantToVariant.
propsys: Use debugstr_variant for the trace in VariantToPropVariant.
propsys: Implement PropVariantToBSTR.
propsys/tests: Test truncating for PropVariantToString.
propsys/tests: Test PropVariantToBSTR.
propsys: Add PropVariantToBSTR stub.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6640
Example my assembly with gcc -02 flag
Before:

After:

--
v5: d3dcompiler_43: micro-optimization using strstr -> strchr implementation if possible
wusa: micro-optimization using strstr -> strchr implementation if possible
oledb32: micro-optimization using strstr -> strchr implementation if possible
wbemprox: micro-optimization using strstr -> strchr implementation if possible
oledb32: micro-optimization using strstr -> strchr implementation if possible
wusa: micro-optimization using strstr -> strchr implementation if possible
msidb: micro-optimization using strstr -> strchr implementation if possible
https://gitlab.winehq.org/wine/wine/-/merge_requests/6158
Example my assembly with gcc -02 flag
Before:

After:

--
v4: d3dcompiler: replaced to char, wchar_t parameter if possible
wcmdmain: replaced to char, wchar_t parameter if possible
https://gitlab.winehq.org/wine/wine/-/merge_requests/6158
--
v5: msvcrt/tests: Add tests of _strnicmp_l().
include: Add _strnicmp_l() declaration.
msvcrt/tests: Test _stricmp() with multiple bytes characters.
msvcrt: Correct the result of non-ASCII characters for _strnicmp_l().
msvcrt/tests: Test _tolower_l() with DBCS.
msvcrt: Improve DBCS support for _tolower_l().
msvcrt/tests: Test tolower() with DBCS.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6703
--
v4: msvcrt/tests: Add tests of _strnicmp_l().
include: Add _strnicmp_l() declaration.
msvcrt/tests: Test _stricmp() with multiple bytes characters.
msvcrt: Correct the result of non-ASCII characters for _strnicmp_l().
msvcrt/tests: Test _tolower_l() with DBCS.
msvcrt: Improve DBCS support for _tolower_l().
msvcrt/tests: Test tolower() with DBCS.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6703
--
v3: msvcrt/tests: Add tests of _strnicmp_l().
include: Add _strnicmp_l() declaration.
msvcrt/tests: Test _stricmp() with multiple bytes characters.
msvcrt: Correct the result of non-ASCII characters for _strnicmp_l().
msvcrt/tests: Test _tolower_l() with DBCS.
msvcrt: Improve DBCS support for _tolower_l().
msvcrt/tests: Test tolower() with DBCS.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6703
This MR is the first of multiples MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys. (Not in this MR, likely in part 2)
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v25: dlls/winebth.sys: Register and enable BTHPORT_DEVICE and BLUETOOTH_RADIO interfaces for radio PDOs.
dlls/winebth.sys: Derive a unique hardware ID for radio PDOs from their corresponding BlueZ object path.
dlls/winebth.sys: Create radio PDOs from the list of org.bluez.Adapter1 objects on BlueZ.
dlls/winebth.sys: Add a basic unixlib stub using DBus.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
This MR is the first of multiples MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys. (Not in this MR, likely in part 2)
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v24: dlls/winebth.sys: Register and enable BTHPORT_DEVICE and BLUETOOTH_RADIO interfaces for radio PDOs.
dlls/winebth.sys: Derive a unique hardware ID for radio PDOs from their corresponding BlueZ object path.
dlls/winebth.sys: Create radio PDOs from the list of org.bluez.Adapter1 objects on BlueZ.
dlls/winebth.sys: Add a basic unixlib stub using DBus.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
Making all the windows handled by the driver to be either GL/VK client surfaces, or top-level windows. This avoids leaking host windows into the Win32 space, and makes it possible to get rid of some remaining NtUserMapWindowPoints in `map_event_coords` for mouse input.
--
v9: winex11: Get rid of the now unnecessary foreign windows.
winex11: Generate relative ConfigureNotify on parent ConfigureNotify events.
winex11: Use the new host windows to register foreign window events.
winex11: Keep track of the host windows children window rects.
winex11: Keep track of the host windows relative rects.
winex11: Keep track of the host window children of interest.
winex11: Create host windows recursively up to root_window.
winex11: Introduce a new struct host_window for host-only windows.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6649
This MR is the first of multiples MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys. (Not in this MR, likely in part 2)
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v23: dlls/winebth.sys: Register and enable BTHPORT_DEVICE and BLUETOOTH_RADIO interfaces for radio PDOs.
dlls/winebth.sys: Derive a unique hardware ID for radio PDOs from their corresponding BlueZ object path.
dlls/winebth.sys: Create radio PDOs from the list of org.bluez.Adapter1 objects on BlueZ.
dlls/winebth.sys: Add a basic unixlib stub using DBus.
dlls/winebth.sys: Add base winebth.sys driver.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
Commit 9e1008f13735 added mmioSeek call that skips the whole data
portion of the RMID chunk, breaking the handling of RMID (RIFF-based
MIDI) files as it effectively skips the whole content of the RIFF file.
Since mmioDescend expects the file position to be somewhere within
the specified parent chunk, it's guaranteed to fail.
$ WINEDEBUG=+mcimidi wine wintest.exe mcishell
mci.c:178: Type your commands to the MCI, end with Ctrl-Z/^D
open BOSSNOVA.RMI
mci.c:188: command: open BOSSNOVA.RMI
0764:trace:mcimidi:MIDI_mciOpen (1, 00000200, 0051FB98)
0764:trace:mcimidi:MIDI_mciOpen wDevID=1 (lpParams->wDeviceID=1)
0764:trace:mcimidi:MIDI_mciOpen MCI_OPEN_ELEMENT L"bossnova.rmi"!
0764:trace:mcimidi:MIDI_mciOpen hFile=00000001
0764:trace:mcimidi:MIDI_mciOpen ParentChunk ckid=RIFF fccType=RMID cksize=000052DA
mci.c:191: Test failed: mci open BOSSNOVA.RMI error: 296(40 MCIERR_INVALID_FILE)
Its introduction seems unrelated to the rest of that commit and there's
no reason given for placing it there, so let's remove the mmioSeek call
to fix RMID file handling in MCI. Previous mmioDescend call will set
the position to just after the chunk's form type, which is exactly
where it should be when calling mmioDescend the second time to find
the data chunk. Other parts of Wine code that deal with RIFF files
don't seek in analogous situations either.
Fixes: 9e1008f13735 ("Removed fixed size array to store specific data")
--
v2: mciseq: Don't seek to the end of the root chunk in RMID files.
midiseq: Reduce race window when closing sequencer.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6696
--
v2: msvcrt/tests: Add tests of _strnicmp_l().
include: Add _strnicmp_l() declaration.
msvcrt/tests: Test _stricmp() with multiple bytes characters.
msvcrt: Improve DBCS support for _strnicmp_l().
msvcrt/tests: Test _tolower_l() with DBCS.
msvcrt: Improve DBCS support for _tolower_l().
msvcrt/tests: Test tolower() with DBCS.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6703
Commit 9e1008f13735 added mmioSeek call that skips the whole data
portion of the RMID chunk, breaking the handling of RMID (RIFF-based
MIDI) files as it effectively skips the whole content of the RIFF file.
Since mmioDescend expects the file position to be somewhere within
the specified parent chunk, it's guaranteed to fail.
$ WINEDEBUG=+mcimidi wine wintest.exe mcishell
mci.c:178: Type your commands to the MCI, end with Ctrl-Z/^D
open BOSSNOVA.RMI
mci.c:188: command: open BOSSNOVA.RMI
0764:trace:mcimidi:MIDI_mciOpen (1, 00000200, 0051FB98)
0764:trace:mcimidi:MIDI_mciOpen wDevID=1 (lpParams->wDeviceID=1)
0764:trace:mcimidi:MIDI_mciOpen MCI_OPEN_ELEMENT L"bossnova.rmi"!
0764:trace:mcimidi:MIDI_mciOpen hFile=00000001
0764:trace:mcimidi:MIDI_mciOpen ParentChunk ckid=RIFF fccType=RMID cksize=000052DA
mci.c:191: Test failed: mci open BOSSNOVA.RMI error: 296(40 MCIERR_INVALID_FILE)
Its introduction seems unrelated to the rest of that commit and there's
no reason given for placing it there, so let's remove the mmioSeek call
to fix RMID file handling in MCI. Previous mmioDescend call will set
the position to just after the chunk's form type, which is exactly
where it should be when calling mmioDescend the second time to find
the data chunk. Other parts of Wine code that deal with RIFF files
don't seek in analogous situations either.
Fixes: 9e1008f13735 ("Removed fixed size array to store specific data")
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6696
These patches finish moving targa file handling into d3dx9.
--
v3: d3dx9: Add support for decoding targa files with a color map in d3dx9.
d3dx9: Add support for decoding targa files with run length encoding in d3dx9.
d3dx9: Add support for decoding targa files with different pixel orders in d3dx9.
d3dx9: Add support for loading basic targa images without WIC.
d3dx9/tests: Add more tests for loading targa files.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6688
On Fri Oct 18 14:05:23 2024 +0000, Rémi Bernon wrote:
> I see, I think this should not be necessary anymore since !6573, the new
> display mode will be written to the registry and other processes/threads
> should get their cache invalidate immediately.
> Later on, when the XRandR events are processed the cache might get
> invalidated again but should end up with the same display settings.
The issue was specifically with seeing mode changes from other processes. The test calls `EnumDisplaySettings()` in a loop waiting for the expected mode change. If we don't process `RRNotify` events in `xrandr14_get_id()` we won't see the new mode until some thread processes the messages. Since there are no such threads in the test process, the test will fail.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5060#note_85467
Making all the windows handled by the driver to be either GL/VK client surfaces, or top-level windows. This avoids leaking host windows into the Win32 space, and makes it possible to get rid of some remaining NtUserMapWindowPoints in `map_event_coords` for mouse input.
--
v8: winex11: Get rid of the now unnecessary foreign windows.
winex11: Generate relative ConfigureNotify on parent ConfigureNotify events.
winex11: Use the new host windows to register foreign window events.
winex11: Keep track of the host windows children window rects.
winex11: Keep track of the host windows relative rects.
winex11: Keep track of the host window children of interest.
winex11: Create host windows recursively up to root_window.
winex11: Introduce a new struct host_window for host-only windows.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6649
Let me know if you'd like me to split this up. As per feedback, I'm now doing the admin token-setting via an extension to NtSetInformationProcess.
Testing on Windows shows that the owner of GetDesktopWindow() always has a default admin token with `TokenElevationTypeDefault`, no matter the token of the process/thread that is responsible for creating it. We've had issues in this area in the past - 99e2fad1 was a case where it was important that explorer not inherit the token of the *process* spawning it, but instead the token of the *thread*. This patch keeps that app working, since now explorer will set a default token regardless. In addition to the privilege issues from 99e2fad1, it is a relatively common pattern to duplicate the token of the owner of GetDesktopWindow to acquire a default token.
Services are also currently launched with limited tokens, so this series also has services.exe elevate itself.
--
v3: services: Apply a default admin token to the process.
ntdll: Count default-elevation admin tokens as elevated from NtQueryInformationToken(TokenElevation).
https://gitlab.winehq.org/wine/wine/-/merge_requests/6602
On Fri Oct 18 13:56:14 2024 +0000, Zhiyi Zhang wrote:
> If I remember correctly, it's for other threads other than the
> explorer's main thread to see the new display mode immediately. Without
> it, a rather large delay is causing tests to fail.
I see, I think this should not be necessary anymore since !6573, the new display mode will be written to the registry and other processes/threads should get their cache invalidate immediately.
Later on, when the XRandR events are processed the cache might get invalidated again but should end up with the same display settings.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5060#note_85457
On Fri Oct 18 13:56:14 2024 +0000, Rémi Bernon wrote:
> Do you recall why b3eb55227aef198a637f80a2fa0bce74aa0a7190 is actually
> required? Can't we just wait until the RRNotify events are received and
> processed from whichever thread listens to them?
> Fwiw it is causing some rare deadlocks with this kind of pattern:
> 1) thread A holds `display_lock` and wants `user_lock`:
> ```
> #4 0x00007f3f11236940 in user_lock () at ./dlls/win32u/sysparams.c:295
> #5 0x00007f3f11246551 in get_user_handle_ptr (type=1, handle=0x10020)
> at ./dlls/win32u/window.c:90
> #6 get_win_ptr (hwnd=0x10020) at ./dlls/win32u/window.c:249
> #7 0x00007f3f11246e2b in get_window_thread (hwnd=0x10020, process=0x0)
> at ./dlls/win32u/window.c:320
> #8 0x00007f3f1124ce8d in NtUserCallHwndParam (hwnd=hwnd@entry=0x10020,
> param=param@entry=0, code=code@entry=16) at ./dlls/win32u/window.c:5892
> #9 0x00007f3f10c6803f in NtUserGetWindowThread (process=0x0,
> hwnd=0x10020) at ./include/ntuser.h:1431
> #10 xrandr14_device_change_handler (hwnd=0x10020, event=<optimized out>)
> at ./dlls/winex11.drv/xrandr.c:1221
> #11 0x00007f3f10c3535f in call_event_handler
> (display=display@entry=0x55558c2bdcd0, event=event@entry=0x7ffffe0f9a80)
> at ./dlls/winex11.drv/event.c:460
> #12 0x00007f3f10c37e27 in process_events (display=<optimized out>,
> filter=filter@entry=0x7f3f10c65c30 <filter_rrnotify_event>,
> arg=<optimized out>) at ./dlls/winex11.drv/event.c:518
> #13 0x00007f3f10c68f4f in process_rrnotify_events () at ./dlls/winex11.drv/xrandr.c:1270
> #14 xrandr14_get_id (device_name=<optimized out>, is_primary=<optimized
> out>, id=0x7ffffe0f9c98) at ./dlls/winex11.drv/xrandr.c:1288
> #15 0x00007f3f10c33fe7 in X11DRV_UpdateDisplayDevices
> (device_manager=0x7f3f1129f700 <device_manager>, param=0x7ffffe0fa680)
> at ./dlls/winex11.drv/display.c:453
> #16 0x00007f3f11236ba8 in update_display_devices (ctx=0x7ffffe0fa680) at ./dlls/win32u/sysparams.c:2027
> #17 update_display_cache (force=force@entry=1) at ./dlls/win32u/sysparams.c:2072
> #18 0x00007f3f11238e5f in display_mode_changed (broadcast=1) at ./dlls/win32u/sysparams.c:3473
> #19 0x00007f3f11239cd2 in apply_display_settings
> (target=target@entry=0x0, devmode=devmode@entry=0x0,
> hwnd=hwnd@entry=0x0, flags=flags@entry=0, lparam=lparam@entry=0x0) at ./dlls/win32u/sysparams.c:3566
> #20 0x00007f3f1123d57d in NtUserChangeDisplaySettings
> (devname=0x7ffffe2fe600, devmode=0x0, hwnd=0x0, flags=0, lparam=0x0) at ./dlls/win32u/sysparams.c:3583
> #21 <signal handler called>
> #22 0x00006ffffe08bd74 in NtUserChangeDisplaySettings () from /home/rbernon/Code/build-wine-remote/build64/dlls/win32u/x86_64-windows/win32u.dll
> #23 0x00006ffffe0dfdc3 in ChangeDisplaySettingsExW
> (devname=devname@entry=0x0, devmode=devmode@entry=0x0,
> hwnd=hwnd@entry=0x0, flags=flags@entry=0, lparam=lparam@entry=0x0) at ./dlls/user32/sysparams.c:549
> #24 0x00006ffffa591779 in wined3d_restore_display_modes
> (wined3d=0x7ffffe2fec48) at ./dlls/wined3d/directx.c:1636
> #25 0x00006ffffa59d54e in wined3d_swapchain_activate
> (swapchain=0x7fffff26eaa0, activate=0, activate@entry=32767) at ./dlls/wined3d/swapchain.c:1899
> ```
> 2) thread B holds `user_lock` and wants `display_lock`:
> ```
> #4 0x00007f3f1123adcc in lock_display_devices () at ./dlls/win32u/sysparams.c:2100
> #5 get_virtual_screen_rect (dpi=dpi@entry=0, type=<optimized out>) at ./dlls/win32u/sysparams.c:2520
> #6 0x00007f3f112439a7 in NtUserCallTwoParam
> (arg1=arg1@entry=140737480547808, arg2=arg2@entry=0, code=code@entry=10)
> at ./dlls/win32u/sysparams.c:6758
> #7 0x00007f3f10c5a208 in NtUserGetVirtualScreenRect
> (type=MDT_EFFECTIVE_DPI) at ./include/ntuser.h:1155
> #8 X11DRV_ReleaseDC (hwnd=<optimized out>, hdc=0x22010048) at ./dlls/winex11.drv/window.c:2700
> #9 0x00007f3f111842bd in release_dce (dce=dce@entry=0x55558c2a97b0) at ./dlls/win32u/dce.c:887
> #10 0x00007f3f11184810 in release_dce (dce=0x55558c2a97b0) at ./dlls/win32u/dce.c:1138
> #11 0x00007f3f11187118 in invalidate_dce (win=win@entry=0x7f3ec00aa020,
> old_rect=old_rect@entry=0x7fffff88dfd0) at ./dlls/win32u/dce.c:1201
> #12 0x00007f3f1124e25c in apply_window_pos (hwnd=hwnd@entry=0x6004e,
> insert_after=insert_after@entry=0x0, swp_flags=6207,
> swp_flags@entry=6175, new_surface=new_surface@entry=0x7f3ec009f210,
> new_rects=new_rects@entry=0x7fffff88e170,
> valid_rects=valid_rects@entry=0x7fffff88e150) at ./dlls/win32u/window.c:2084
> #13 0x00007f3f112519fa in update_window_state (hwnd=0x6004e) at ./dlls/win32u/window.c:4523
> #14 0x00007f3f1120dedd in handle_internal_message (hwnd=<optimized out>,
> msg=<optimized out>, wparam=0, lparam=<optimized out>) at ./dlls/win32u/message.c:2125
> #15 0x00007f3f112122a1 in peek_message (msg=msg@entry=0x7fffff88e9f0,
> filter=filter@entry=0x7fffff88e9d0) at ./dlls/win32u/message.c:2923
> #16 0x00007f3f112138c8 in NtUserPeekMessage (msg_out=0x7fffffa8ff00,
> hwnd=<optimized out>, first=<optimized out>, last=<optimized out>,
> flags=<optimized out>) at ./dlls/win32u/message.c:3242
> #17 <signal handler called>
> #18 0x00006ffffe08cd54 in NtUserPeekMessage () from /home/rbernon/Code/build-wine-remote/build64/dlls/win32u/x86_64-windows/win32u.dll
> #19 0x00006ffffe113965 in PeekMessageW (flags=1024, last=<optimized
> out>, first=<optimized out>, hwnd=<optimized out>,
> msg_out=0x7fffffa8ff00) at ./dlls/user32/message.c:762
> #20 PeekMessageA (msg=0x7fffffa8ff00, hwnd=<optimized out>,
> first=<optimized out>, last=<optimized out>, flags=1) at ./dlls/user32/message.c:772
> ```
> This happens randomly, perhaps more frequently since
> 2b32c2859166e5542012b517cdef4699d8bb322c, but `update_window_state`
> could already be called before in other circumstances, and it should not
> cause a deadlock.
> More specifically, I don't think we should try to acquire `user_lock`
> with `display_lock` held, only the other way around.
If I remember correctly, it's for other threads other than the explorer's main thread to see the new display mode immediately. Without it, a rather large delay is causing tests to fail.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5060#note_85456
Do you recall why b3eb55227aef198a637f80a2fa0bce74aa0a7190 is actually required? Can't we just wait until the RRNotify events are received and processed from whichever thread listens to them?
Fwiw it is causing some rare deadlocks with this kind of pattern:
1) thread A holds `display_lock` and wants `user_lock`:
```
#4 0x00007f3f11236940 in user_lock () at ./dlls/win32u/sysparams.c:295
#5 0x00007f3f11246551 in get_user_handle_ptr (type=1, handle=0x10020) at ./dlls/win32u/window.c:90
#6 get_win_ptr (hwnd=0x10020) at ./dlls/win32u/window.c:249
#7 0x00007f3f11246e2b in get_window_thread (hwnd=0x10020, process=0x0) at ./dlls/win32u/window.c:320
#8 0x00007f3f1124ce8d in NtUserCallHwndParam (hwnd=hwnd@entry=0x10020, param=param@entry=0, code=code@entry=16) at ./dlls/win32u/window.c:5892
#9 0x00007f3f10c6803f in NtUserGetWindowThread (process=0x0, hwnd=0x10020) at ./include/ntuser.h:1431
#10 xrandr14_device_change_handler (hwnd=0x10020, event=<optimized out>) at ./dlls/winex11.drv/xrandr.c:1221
#11 0x00007f3f10c3535f in call_event_handler (display=display@entry=0x55558c2bdcd0, event=event@entry=0x7ffffe0f9a80) at ./dlls/winex11.drv/event.c:460
#12 0x00007f3f10c37e27 in process_events (display=<optimized out>, filter=filter@entry=0x7f3f10c65c30 <filter_rrnotify_event>, arg=<optimized out>) at ./dlls/winex11.drv/event.c:518
#13 0x00007f3f10c68f4f in process_rrnotify_events () at ./dlls/winex11.drv/xrandr.c:1270
#14 xrandr14_get_id (device_name=<optimized out>, is_primary=<optimized out>, id=0x7ffffe0f9c98) at ./dlls/winex11.drv/xrandr.c:1288
#15 0x00007f3f10c33fe7 in X11DRV_UpdateDisplayDevices (device_manager=0x7f3f1129f700 <device_manager>, param=0x7ffffe0fa680) at ./dlls/winex11.drv/display.c:453
#16 0x00007f3f11236ba8 in update_display_devices (ctx=0x7ffffe0fa680) at ./dlls/win32u/sysparams.c:2027
#17 update_display_cache (force=force@entry=1) at ./dlls/win32u/sysparams.c:2072
#18 0x00007f3f11238e5f in display_mode_changed (broadcast=1) at ./dlls/win32u/sysparams.c:3473
#19 0x00007f3f11239cd2 in apply_display_settings (target=target@entry=0x0, devmode=devmode@entry=0x0, hwnd=hwnd@entry=0x0, flags=flags@entry=0, lparam=lparam@entry=0x0) at ./dlls/win32u/sysparams.c:3566
#20 0x00007f3f1123d57d in NtUserChangeDisplaySettings (devname=0x7ffffe2fe600, devmode=0x0, hwnd=0x0, flags=0, lparam=0x0) at ./dlls/win32u/sysparams.c:3583
#21 <signal handler called>
#22 0x00006ffffe08bd74 in NtUserChangeDisplaySettings () from /home/rbernon/Code/build-wine-remote/build64/dlls/win32u/x86_64-windows/win32u.dll
#23 0x00006ffffe0dfdc3 in ChangeDisplaySettingsExW (devname=devname@entry=0x0, devmode=devmode@entry=0x0, hwnd=hwnd@entry=0x0, flags=flags@entry=0, lparam=lparam@entry=0x0) at ./dlls/user32/sysparams.c:549
#24 0x00006ffffa591779 in wined3d_restore_display_modes (wined3d=0x7ffffe2fec48) at ./dlls/wined3d/directx.c:1636
#25 0x00006ffffa59d54e in wined3d_swapchain_activate (swapchain=0x7fffff26eaa0, activate=0, activate@entry=32767) at ./dlls/wined3d/swapchain.c:1899
```
2) thread B holds `user_lock` and wants `display_lock`:
```
#4 0x00007f3f1123adcc in lock_display_devices () at ./dlls/win32u/sysparams.c:2100
#5 get_virtual_screen_rect (dpi=dpi@entry=0, type=<optimized out>) at ./dlls/win32u/sysparams.c:2520
#6 0x00007f3f112439a7 in NtUserCallTwoParam (arg1=arg1@entry=140737480547808, arg2=arg2@entry=0, code=code@entry=10) at ./dlls/win32u/sysparams.c:6758
#7 0x00007f3f10c5a208 in NtUserGetVirtualScreenRect (type=MDT_EFFECTIVE_DPI) at ./include/ntuser.h:1155
#8 X11DRV_ReleaseDC (hwnd=<optimized out>, hdc=0x22010048) at ./dlls/winex11.drv/window.c:2700
#9 0x00007f3f111842bd in release_dce (dce=dce@entry=0x55558c2a97b0) at ./dlls/win32u/dce.c:887
#10 0x00007f3f11184810 in release_dce (dce=0x55558c2a97b0) at ./dlls/win32u/dce.c:1138
#11 0x00007f3f11187118 in invalidate_dce (win=win@entry=0x7f3ec00aa020, old_rect=old_rect@entry=0x7fffff88dfd0) at ./dlls/win32u/dce.c:1201
#12 0x00007f3f1124e25c in apply_window_pos (hwnd=hwnd@entry=0x6004e, insert_after=insert_after@entry=0x0, swp_flags=6207, swp_flags@entry=6175, new_surface=new_surface@entry=0x7f3ec009f210, new_rects=new_rects@entry=0x7fffff88e170, valid_rects=valid_rects@entry=0x7fffff88e150) at ./dlls/win32u/window.c:2084
#13 0x00007f3f112519fa in update_window_state (hwnd=0x6004e) at ./dlls/win32u/window.c:4523
#14 0x00007f3f1120dedd in handle_internal_message (hwnd=<optimized out>, msg=<optimized out>, wparam=0, lparam=<optimized out>) at ./dlls/win32u/message.c:2125
#15 0x00007f3f112122a1 in peek_message (msg=msg@entry=0x7fffff88e9f0, filter=filter@entry=0x7fffff88e9d0) at ./dlls/win32u/message.c:2923
#16 0x00007f3f112138c8 in NtUserPeekMessage (msg_out=0x7fffffa8ff00, hwnd=<optimized out>, first=<optimized out>, last=<optimized out>, flags=<optimized out>) at ./dlls/win32u/message.c:3242
#17 <signal handler called>
#18 0x00006ffffe08cd54 in NtUserPeekMessage () from /home/rbernon/Code/build-wine-remote/build64/dlls/win32u/x86_64-windows/win32u.dll
#19 0x00006ffffe113965 in PeekMessageW (flags=1024, last=<optimized out>, first=<optimized out>, hwnd=<optimized out>, msg_out=0x7fffffa8ff00) at ./dlls/user32/message.c:762
#20 PeekMessageA (msg=0x7fffffa8ff00, hwnd=<optimized out>, first=<optimized out>, last=<optimized out>, flags=1) at ./dlls/user32/message.c:772
```
This happens randomly, perhaps more frequently since 2b32c2859166e5542012b517cdef4699d8bb322c, but `update_window_state` could already be called before in other circumstances, and it should not cause a deadlock.
More specifically, I don't think we should try to acquire `user_lock` with `display_lock` held, only the other way around.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5060#note_85453
These patches finish moving targa file handling into d3dx9.
--
v2: d3dx9: Add support for decoding targa files with a color map in d3dx9.
d3dx9: Add support for decoding targa files with run length encoding in d3dx9.
d3dx9: Add support for decoding targa files with different pixel orders in d3dx9.
d3dx9: Add support for loading basic targa images without WIC.
d3dx9/tests: Add more tests for loading targa files.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6688
This MR is the first of multiples MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys. (Not in this MR, likely in part 2)
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v22: dlls/winebth.sys: Register and enable BTHPORT_DEVICE and BLUETOOTH_RADIO interfaces for radio PDOs.
dlls/winebth.sys: Derive a unique hardware ID for radio PDOs from their corresponding BlueZ object path.
dlls/winebth.sys: Create radio PDOs from the list of org.bluez.Adapter1 objects on BlueZ.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
This MR is the first of multiples MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys. (Not in this MR, likely in part 2)
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v21: dlls/winebth.sys: Register and enable BTHPORT_DEVICE and BLUETOOTH_RADIO interfaces for radio PDOs.
dlls/winebth.sys: Derive a unique hardware ID for radio PDOs from their corresponding BlueZ object path.
dlls/winebth.sys: Create radio PDOs from the list of org.bluez.Adapter1 objects on BlueZ.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
This MR is the first of multiples MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys. (Not in this MR, likely in part 2)
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v20: dlls/winebth.sys: Register and enable BTHPORT_DEVICE and BLUETOOTH_RADIO interfaces for radio PDOs.
dlls/winebth.sys: Derive a unique hardware ID for radio PDOs from their corresponding BlueZ object path.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
This MR is the first of multiples MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys. (Not in this MR, likely in part 2)
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v19: dlls/winebth.sys: Register and enable BTHPORT_DEVICE and BLUETOOTH_RADIO interfaces for radio PDOs.
dlls/winebth.sys: Derive a unique hardware ID for radio PDOs from their corresponding BlueZ object path.
dlls/winebth.sys: Create radio PDOs from the list of org.bluez.Adapter1 objects on BlueZ.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
This MR is the first of multiples MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys. (Not in this MR, likely in part 2)
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v18: dlls/winebth.sys: Register and enable BTHPORT_DEVICE and BLUETOOTH_RADIO interfaces for radio PDOs.
dlls/winebth.sys: Derive a unique hardware ID for radio PDOs from their corresponding BlueZ object path.
dlls/winebth.sys: Create radio PDOs from the list of org.bluez.Adapter1 objects on BlueZ.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
This MR is the first of multiples MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys. (Not in this MR, likely in part 2)
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v17: dlls/winebth.sys: Register and enable BTHPORT_DEVICE and BLUETOOTH_RADIO interfaces for radio PDOs.
dlls/winebth.sys: Derive a unique hardware ID for radio PDOs from their corresponding BlueZ object path.
dlls/winebth.sys: Create radio PDOs from the list of org.bluez.Adapter1 objects on BlueZ.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
This MR is the first of multiples MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys. (Not in this MR, likely in part 2)
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v16: dlls/winebth.sys: Register and enable BTHPORT_DEVICE and BLUETOOTH_RADIO interfaces for radio PDOs.
dlls/winebth.sys: Derive a unique hardware ID for radio PDOs from their corresponding BlueZ object path.
dlls/winebth.sys: Create radio PDOs from the list of org.bluez.Adapter1 objects on BlueZ.
dlls/winebth.sys: Add a basic unixlib stub using DBus.
dlls/winebth.sys: Add base winebth.sys driver.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
Replicate native behavior.
This fixes Giana Sister: Twisted Dreams crashing during the intro
video. The game expects to be able to fit a few audio samples in a
fixed size memory area.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6629
The Legend of Pirates Online expects the formats without WGL_DOUBLE_BUFFER_ARB
to be listed first in wglChoosePixelFormatARB() (otherwise it goes into a special
wglBindTexImageARB() path which causes blank rendering on both winex11 and winewayland)
which was the old winex11 behavior that this change now matches.
Fixes: 272c55ac257 ("opengl32: Add default implementation for wglChoosePixelFormatARB.")
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6513
This MR is the first of multiples MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys. (Not in this MR, likely in part 2)
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v15: dlls/winebth.sys: Update radio PDO properties on receiving PropertiesChanged for an org.bluez.Adapter1 object.
dlls/winebth.sys: Remove the corresponding radio PDO on receiving InterfacesRemoved for a org.bluez.Adapter1 object.
dlls/winebth.sys: Create new radio PDOs on receiving InterfacesAdded for objects that implement org.bluez.Adapter1.
dlls/winebth.sys: Set radio PDO properties from the device's corresponding org.bluez.Adapter1 object properties.
dlls/winebth.sys: Register and enable BTHPORT_DEVICE and BLUETOOTH_RADIO interfaces for radio PDOs.
dlls/winebth.sys: Derive a unique hardware ID for radio PDOs from their corresponding BlueZ object path.
dlls/winebth.sys: Create radio PDOs from the list of org.bluez.Adapter1 objects on BlueZ.
dlls/winebth.sys: Add a basic unixlib stub using DBus.
dlls/winebth.sys: Add base winebth.sys driver.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
This MR is the first of multiples MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys. (Not in this MR, likely in part 2)
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v14: dlls/winebth.sys: Update radio PDO properties on receiving PropertiesChanged for an org.bluez.Adapter1 object.
dlls/winebth.sys: Remove the corresponding radio PDO on receiving InterfacesRemoved for a org.bluez.Adapter1 object.
dlls/winebth.sys: Create new radio PDOs on receiving InterfacesAdded for objects that implement org.bluez.Adapter1.
dlls/winebth.sys: Set radio PDO properties from the device's corresponding org.bluez.Adapter1 object properties.
dlls/winebth.sys: Register and enable BTHPORT_DEVICE and BLUETOOTH_RADIO interfaces for radio PDOs.
dlls/winebth.sys: Derive a unique hardware ID for radio PDOs from their corresponding BlueZ object path.
dlls/winebth.sys: Create radio PDOs from the list of org.bluez.Adapter1 objects on BlueZ.
dlls/winebth.sys: Add a basic unixlib stub using DBus.
dlls/winebth.sys: Add base winebth.sys driver.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
First of all it fixes a regression introduced by 5a7ff3b45c78784dca0a465d9e21483f72bce6e5 when surface handles were moved to global table but SwapTextureHandles was left behind (https://bugs.winehq.org/show_bug.cgi?id=57300).
Then, I am fixing a couple of more issues with this function spotted on the way.
I did some initial testing of SwapTextures across devices and that looks messy, device on which the swap is performed influences the outcome in some not immediately obvious way. I omitted the investigation of that because multiple 3d devices in ddraw is already a very exotic use case and I think we are unlikely to meet the usage of SwapTextures across multiple devices.
--
v3: ddraw: Update state if d3d_device2_SwapTextureHandles() results in texture change.
ddraw: Validate handles in d3d_device2_SwapTextureHandles().
ddraw: Use global handle table in d3d_device2_SwapTextureHandles().
https://gitlab.winehq.org/wine/wine/-/merge_requests/6658
First of all it fixes a regression introduced by 5a7ff3b45c78784dca0a465d9e21483f72bce6e5 when surface handles were moved to global table but SwapTextureHandles was left behind (https://bugs.winehq.org/show_bug.cgi?id=57300).
Then, I am fixing a couple of more issues with this function spotted on the way.
I did some initial testing of SwapTextures across devices and that looks messy, device on which the swap is performed influences the outcome in some not immediately obvious way. I omitted the investigation of that because multiple 3d devices in ddraw is already a very exotic use case and I think we are unlikely to meet the usage of SwapTextures across multiple devices.
--
v2: ddraw: Update state if d3d_device2_SwapTextureHandles() results in texture change.
ddraw: Validate handles in d3d_device2_SwapTextureHandles().
ddraw: Use global handle table in d3d_device2_SwapTextureHandles().
ddraw/tests: Fix texture interface IID in test_multiple_devices() for ddraw1.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6658
First of all it fixes a regression introduced by 5a7ff3b45c78784dca0a465d9e21483f72bce6e5 when surface handles were moved to global table but SwapTextureHandles was left behind (https://bugs.winehq.org/show_bug.cgi?id=57300).
Then, I am fixing a couple of more issues with this function spotted on the way.
I did some initial testing of SwapTextures across devices and that looks messy, device on which the swap is performed influences the outcome in some not immediately obvious way. I omitted the investigation of that because multiple 3d devices in ddraw is already a very exotic use case and I think we are unlikely to meet the usage of SwapTextures across multiple devices.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6658