This MR:
- adds tests for additional subtypes when `MF_MT_USER_DATA` is missing; and
- modifies MFCreateWaveFormatExFromMFMediaType to pass these tests
--
v4: mfplat: Allow MF_MT_USER_DATA to be missing for all subtypes.
mfplat/tests: Add additional MFCreateWaveFormatExFromMFMediaType tests.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7417
On Thu Feb 27 18:51:13 2025 +0000, eric pouech wrote:
> the attached patch (on top of what you sent earlier on) should work as expected:
> * the annoying parts: console handles don't support overlapped mode, and
> input console handles are signaled when there's a pending event... but a
> pending event could be mouse move, window resize, ctrl key down & up...
> maybe that's the reason you always check it as signaled
> * so the attached patch waits on both console input handle and control c
> event, but has to discriminate when the console input handle is signaled
> whether there's an actual character or some other things
> * it's still racy at some places, but given the API I don't see a clean
> way to do it
> * [wait-con.patch](/uploads/a537c394d4b98165b791a7979ad3f8ca/wait-con.patch)
Thanks for the patch. Will check it out here.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7400#note_96144
On Thu Feb 27 16:00:21 2025 +0000, Joe Souza wrote:
> I'll answer #2 first:
> Under Windows, Ctrl-C definitely does break out of a DIR /P pause.
> Regarding the second part, I completely agree that the proper way to
> handle this would be to wait on both input and the Ctrl-C event. I have
> tried this. You may recall in an earlier iteration of my changes for a
> prior merge request, I left some code commented out which I then removed
> after you raised issue with it. This code was a call to
> WaitForMultipleObjects, waiting on both the input handle and the Ctrl-C
> event. The problem here which I believe I had stated at the time is
> that with Wine, the input handle is always signaled, even if there is no
> input waiting. The result was that the wait was always being satisfied
> immediately and DIR /P was not pausing at all. So that approach was
> abandoned in favor of what we have now.
> #1:
> This code here is based on the previous code for WCMD_Pause. That code
> was setting console mode flags to 0. I'm guessing that PAUSE has
> operated this way for many years. My changes use the new
> WCMD_wait_for_input for both PAUSE and DIR /P, and I did not want to
> break PAUSE behavior. Further, ENABLE_ECHO_INPUT is on by default, and
> counter to Microsoft's docs for SetConsoleMode, on Wine the character is
> echoed even if ENABLE_LINE_INPUT is disabled. The end result here is
> that DIR /P was echoing the character that the user pressed, whereas
> Windows does not exhibit that behavior.
> All that said, based on shortcomings in Wine that I discuss above, I
> believe that my changes here are currently the best approach.
the attached patch (on top of what you sent earlier on) should work as expected:
* the annoying parts: console handles don't support overlapped mode, and input console handles are signaled when there's a pending event... but a pending event could be mouse move, window resize, ctrl key down & up... maybe that's the reason you always check it as signaled
* so the attached patch waits on both console input handle and control c event, but has to discriminate when the console input handle is signaled whether there's an actual character or some other things
* it's still racy at some places, but given the API I don't see a clean way to do it
* [wait-con.patch](/uploads/a537c394d4b98165b791a7979ad3f8ca/wait-con.patch)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7400#note_96140
This MR adds clipboard support to the winewayland driver by using the wlr-data-control-unstable-v1 protocol. Note that this protocol was recently merged into wayland-protocols as ext-data-control-v1, but it's not yet widely supported, so I preferred to use the wlr version for now.
This MR has many similarities to https://gitlab.winehq.org/wine/wine/-/merge_requests/7236, but due to the unconstrained nature of wlr-data-control-unstable-v1 the implementation is simpler and more robust. It can neatly fit into the existing Wine clipboard design (single proxy window in the desktop process) without requiring any event forwarding etc.
Since wlr-data-control-unstable-v1/ext-data-control-v1 is considered privileged, it may not be available in all situations, e.g., in sandboxes, and there are also a couple of compositors that may not implement it at all. It is therefore useful to have a simple fallback using the core wl_data_device interface. This fallback is not part of this MR, but I have pushed a WIP implementation based on this MR at: https://gitlab.winehq.org/afrantzis/wine/-/commits/wayland-copy-paste-data-… (note: only the win32 -> wayland direction implemented at the moment). The new fallback approach is different from https://gitlab.winehq.org/wine/wine/-/merge_requests/7236 in that when using wl_data_device it creates per-process clipboard windows instead of forwarding messages from the desktop clipboard window. This allows it to work within the design of this MR with minimal changes and maximum code reuse.
--
v3: winewayland: Normalize received MIME type strings.
winewayland: Support copying data from native clipboard to win32 apps.
winewayland: Support exporting various clipboard formats.
winewayland: Generalize support for exporting clipboard formats.
winewayland: Support copying text from win32 clipboard to native apps.
winewayland: Implement zwlr_data_control_device_v1 initialization.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7336