The read loop could exit while a async read request is still in flight, which
could complete after test_read_device has returned. This results in a stack
use-after-return of `overlapped`.
* * *
Finally had something caught by the unix side AddressSanitizer, PE ASan wouldn't
have caught this.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8224
On Windows, applications can disable titlebar by extending the client rect to a bigger rect which will cover the area of the titlebar from WM_NCCALCSIZE: https://learn.microsoft.com/en-us/windows/win32/dwm/customframe#removing-th…
Our current x11 and Mac driver doesn't handle this case.
Attached is a test case for reproducing the issue.
[hide_caption.c](/uploads/46a725e32569a6a0a929a0f183cf9ed8/hide_caption.c)
--
v2: winemac.drv: Disable native titlebar while lacking enough space for SM_CYCAPTION.
winex11.drv: Disable native titlebar while lacking enough space for SM_CYCAPTION.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7024
When button_count is 0, we would allocate 0 bytes for line_widths, but later line_count would be 1
so we would still try to access line_widths[0] which is out-of-bound.
--
v2: comctl32: Make sure line_widths is big enough.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8205
I have no idea what the previous test was trying to do, but it was clearly wrong and misleading. First, it placed the fragment for no reason in file_name_buf because it then replaced it with a NUL, making you believe it's part of it but when it really was not. Then, it opened the original index.html to write XXX to it, so the fragment filename never actually existed in the first place, and was never tested.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8221
Compositors send a "done" event after every text-input commit, even if
the reported state (preedit etc) hasn't changed. Acting on such events
is at best wasteful, but can additionally lead to incorrect IME related
effects (e.g., deleting the currently selected text), so ignore them,
similarly to what Qt and GTK do.
The first commit performs some state related cleanups.
--
This solves an IME problem I have been experiencing with compositors that support text-input-v3 (e.g., kwin).
1. Run notepad
2. Write some text
3. Try to select text
Expected result: text is selected
Actual result: text is deleted
What happens is that while the user is selecting text the driver gets a series of `SetIMECompositionRect` callback which cause a series of text-input-v3 `set_cursor_rectangle`-`commit` requests. These `commit`s elicit `done` events from the compositor with no state changes, which we interpret as "clear the composition string" (and by extension the active selection), because that's what such states normally means, and forward them to windows IME.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8196
If the "Properties" button is clicked in the printdlg it opens the print properties dlg. The problem is the values set in the properties dlg don't get passed through correctly to the final printing stage. This prevents properties like duplex and page size from working.
--
v2: comdlg32: Don't use a shadow devmode structure in PrintDlgA.
comdlg32/tests: Add tests for changing devmode properties in the hook procedure for PrintDlgA.
comdlg32: Don't use a shadow devmode structure in PrintDlgW.
comdlg32/tests: Add tests for changing devmode properties in the hook procedure for PrintDlgW.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8220