This MR implements mouselook, which requires support for ClipCursor and relative motion events. The latter we can implement directly without using `SetCursorPos` for which no Wayland protocol exists at the moment.
1. Implement setting the foreground window, as this is required for clipping to work properly (i.e., for the ClipCursor driver callback to be called in the proper process/thread, see commit (2)). We can't unconditionally set the foreground window on keyboard focus, since compositors are eager to give the focus and some windows strongly dislike that (see https://gitlab.winehq.org/wine/wine/-/merge_requests/4102#note_51733). This MR borrows the "managed" window concept from WineX11 to detect windows that we shouldn't allow the compositor to manage, and avoids setting such windows as the foreground on keyboard focus.
2. Implement cursor clipping using the pointer-constraints protocol.
3. Switch to emitting relative motion events using the relative-pointer protocol when the cursor is not visible.
---
4. Finally, a potential fix for an issue I have been seeing where apps may transiently lose the active status (see commit message for more) as a result of the foreground state changes in this MR, which has undesirable side-effects. I have included this here for MR completeness/correctness, but it can be moved to a subsequent MR if preferred.
Note: the velocity of relative motion events when scaling is involved is somewhat inconsistent among Wayland compositors.
Thanks!
--
v4: win32u: Don't deactivate the target thread when setting the foreground window.
winewayland.drv: Lock the pointer if confined without cursor.
winewayland.drv: Implement relative mouse motion.
winewayland.drv: Implement ClipCursor.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4593
Currently, if a probe fails, it will print the line number of the [test]
block the probe is in, not the line number of the probe itself. This
makes it somewhat difficult to debug.
This commit makes it print the line number of the probe as well.
CC @zfigura
--
v4: tests: Print the line number of the probe when a test fails.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/499
Currently, if a probe fails, it will print the line number of the [test]
block the probe is in, not the line number of the probe itself. This
makes it somewhat difficult to debug.
This commit makes it print the line number that a test fails at.
This code was actually written by @hverbeet for my first attempt at fixing this, !499.
CC @zfigura
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/516
When we have a Vulkan client subsurface, and depending on timings and
window state (e.g., fullscreen), we may not get the chance to apply new
surface configurations when presenting content to the main window
surface. To ensure new configurations are applied, also check for and
apply/ack configurations during Vulkan presentation.
This fixes some games which resize when they become fullscreen, but are
not properly placed by the compositor, because they never ack the
fullscreen state.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4641
I sent this now because it is mostly boilerplate, with some small non-invasive patches at the end. First patch is basically all stubs except forwards from IHTMLEventObj2 getters (so it doesn't break current behavior).
--
v3: mshtml/tests: Fix VariantClear on uninitialized variable.
mshtml: Implement `url` prop for StorageEvent objs.
mshtml: Send proper legacy storage event with actual url.
mshtml: Don't expose "restricted" members.
mshtml: Expose the other IHTMLEventObj* interfaces.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4619
Signed-off-by: chenjiangyi <chenjiangyi(a)uniontech.com>
--
v3: qcap: Add implementation of IAMVideoControl_GetFrameRateList.
ntdll: Avoid abort process when internal string printing function used for debugging.
ntdll: Support Ctrl-C stop debuggee and attach 32-bit process in wow64 mode.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4301
--
v2: user.exe: Rename SetDesktopWallPaper to SetDesktopWallpaper.
user32: Correct capitalization of SetDeskWallpaper.
user.exe: Move SetDeskWallPaper from winuser.h to user_private.h.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4629
Not known to occur anywhere, but it is a regression from release 1.7. We need a test for SV_ClipDistance in a pixel shader, but it's a bit late to add that before the release.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/512
This MR implements mouselook, which requires support for ClipCursor and relative motion events. The latter we can implement directly without using `SetCursorPos` for which no Wayland protocol exists at the moment.
1. Implement setting the foreground window, as this is required for clipping to work properly (i.e., for the ClipCursor driver callback to be called in the proper process/thread, see commit (2)). We can't unconditionally set the foreground window on keyboard focus, since compositors are eager to give the focus and some windows strongly dislike that (see https://gitlab.winehq.org/wine/wine/-/merge_requests/4102#note_51733). This MR borrows the "managed" window concept from WineX11 to detect windows that we shouldn't allow the compositor to manage, and avoids setting such windows as the foreground on keyboard focus.
2. Implement cursor clipping using the pointer-constraints protocol.
3. Switch to emitting relative motion events using the relative-pointer protocol when the cursor is not visible.
---
4. Finally, a potential fix for an issue I have been seeing where apps may transiently lose the active status (see commit message for more) as a result of the foreground state changes in this MR, which has undesirable side-effects. I have included this here for MR completeness/correctness, but it can be moved to a subsequent MR if preferred.
Note: the velocity of relative motion events when scaling is involved is somewhat inconsistent among Wayland compositors.
Thanks!
--
v3: win32u: Don't deactivate the target thread when setting the foreground window.
winewayland.drv: Prefer to lock the pointer if the confine area is small.
winewayland.drv: Implement relative mouse motion.
winewayland.drv: Implement ClipCursor.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4593
This should fix recent CI failures. While investigating it, I noticed that larger buffers should not use stack. This part is not yet implemented.
--
v2: user32: Remove unused argument for unpack_message.
win32u: Provide extra space in buffers used to dispatch string getter messages.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4621
Largely based on Nikolay Sivov's original patch and !3096. The files modified from running make_requests and make_specfile have been omitted.
--
v5: ntdll: Implement NtGetNextProcess.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4611
Part 1 of a series to flesh out the VMR7 and implement renderless mode.
This is a very large (and kind of risky) series to try to push upstream just
before code freeze. That said, we're not in code freeze yet, and it is a fix for
a regression...
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4623
I sent this now because it is mostly boilerplate, with some small non-invasive patches at the end. First patch is basically all stubs except forwards from IHTMLEventObj2 getters (so it doesn't break current behavior).
--
v2: mshtml/tests: Fix VariantClear on uninitialized variable.
mshtml: Implement `url` prop for StorageEvent objs.
mshtml: Send proper legacy storage event with actual url.
mshtml: Don't expose "restricted" members.
mshtml: Expose the other IHTMLEventObj* props.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4619
Largely based on Nikolay Sivov's original patch and !3096. The files modified from running make_requests and make_specfile have been omitted.
--
v4: ntdll: Implement NtGetNextProcess.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4611
Adds the tray icons implementation based on org.kde.StatusNotifierItem interface usage. Does allow restarting StatusNotifierWatcher object, but will fallback to XEMBED or internal tray, if wine gets initialized when there is no StatusNotifierWatcher object registered.
--
v40: win32u: Handle dbus notification balloons from system_tray_call
win32u: Handle notification balloons through org.freedesktop.Notifications dbus interface
win32u: Handle StatusNotifierItem management from system_tray_call
win32u: Handle StatusNotifierWatcher owner changing and registering objects to a new watcher
win32u: Add SNI driver for systray handling
win32u: Add DBus event loop for SNI handling
https://gitlab.winehq.org/wine/wine/-/merge_requests/2808
I sent this now because it is mostly boilerplate, with some small non-invasive patches at the end. First patch is basically all stubs except forwards from IHTMLEventObj2 getters (so it doesn't break current behavior).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4619
I have found some scripts where comparisons that use floats and OLECOLOR directly fail. For example:
```
If Light005.State Then
' State is a float V_R4
End If
If Light005.Colorfull Then
' Colorfull is an OLECOLOR VT_UI4
End If
```
This is because `stack_pop_bool` does not handle `VT_R4` and `VT_UI4` and returns `E_NOTIMPL`.
This adds additional types to `stack_pop_bool` similar to `VARIANT_Coerce`.
Fixes https://bugs.winehq.org/show_bug.cgi?id=54731
--
v4: vbscript: Coerce to VT_BOOL when evaluating jump conditions.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2507
This MR implements mouselook, which requires support for ClipCursor and relative motion events. The latter we can implement directly without using `SetCursorPos` for which no Wayland protocol exists at the moment.
1. Implement setting the foreground window, as this is required for clipping to work properly (i.e., for the ClipCursor driver callback to be called in the proper process/thread, see commit (2)). We can't unconditionally set the foreground window on keyboard focus, since compositors are eager to give the focus and some windows strongly dislike that (see https://gitlab.winehq.org/wine/wine/-/merge_requests/4102#note_51733). This MR borrows the "managed" window concept from WineX11 to detect windows that we shouldn't allow the compositor to manage, and avoids setting such windows as the foreground on keyboard focus.
2. Implement cursor clipping using the pointer-constraints protocol.
3. Switch to emitting relative motion events using the relative-pointer protocol when the cursor is not visible.
---
4. Finally, a potential fix for an issue I have been seeing where apps may transiently lose the active status (see commit message for more) as a result of the foreground state changes in this MR, which has undesirable side-effects. I have included this here for MR completeness/correctness, but it can be moved to a subsequent MR if preferred.
Note: the velocity of relative motion events when scaling is involved is somewhat inconsistent among Wayland compositors.
Thanks!
--
v2: win32u: Don't deactivate the target thread when setting the foreground window.
winewayland.drv: Prefer to lock the pointer if the confine area is small.
winewayland.drv: Implement relative mouse motion.
winewayland.drv: Implement ClipCursor.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4593
Just some tiny fixes I found while creating !4449. No functional changes intended.
Wine's code review process, and commit history, is a lot more comprehensive than anything else I've seen. This means I can't just write code, submit patch, and call it a day; but it also means the codebase is clean and easy to work with, so fixing bugs and missing pieces is relatively straightforward. While this does increase the total time needed on my side (especially splitting commits), it's easy (though somewhat boring) work, so in total, it's a win. And splitting makes it easier for the maintainers - you have more to do than me, so if it saves your time at the expense of mine, I have no right to complain.
Thank you for your patience with my prior MRs. 8.2/10 would contribute again (I've seen a few other games with broken videos that I suspect have still-unfixed causes)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4609
I know this breaks Windows behavior but having apps print out
special debug messages to the terminal provides a good look
into the applications' development (for example I know that NFS
Underground has some "done" messages likely used for debugging).
I also don't want to keep another revert in my Wine tree just
for this one feature either so that's why I'm MR'ing this.
I considered adding a registry/winecfg entry for this behavior
but it would make this change much larger (and there's no good
place in winecfg to put this behavior in).
To enable this behavior, you can set WINEDEBUG=+unixcon variable
before launching an application.
Xkcd-Entry: https://xkcd.com/1172/
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55435
--
v2: ntdll/unix: Add an option to inherit the Unix console handle.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4566
Adds the tray icons implementation based on org.kde.StatusNotifierItem interface usage. Does allow restarting StatusNotifierWatcher object, but will fallback to XEMBED or internal tray, if wine gets initialized when there is no StatusNotifierWatcher object registered.
--
v38: win32u: Handle dbus notification balloons from system_tray_call
win32u: Handle notification balloons through org.freedesktop.Notifications dbus interface
win32u: Handle StatusNotifierItem management from system_tray_call
win32u: Handle StatusNotifierWatcher owner changing and registering objects to a new watcher
win32u: Add SNI driver for systray handling
win32u: Add DBus event loop for SNI handling
https://gitlab.winehq.org/wine/wine/-/merge_requests/2808
Adds the tray icons implementation based on org.kde.StatusNotifierItem interface usage. Does allow restarting StatusNotifierWatcher object, but will fallback to XEMBED or internal tray, if wine gets initialized when there is no StatusNotifierWatcher object registered.
--
v37: win32u: Handle dbus notification balloons from system_tray_call
win32u: Handle notification balloons through org.freedesktop.Notifications dbus interface
win32u: Handle StatusNotifierItem management from system_tray_call
win32u: Handle StatusNotifierWatcher owner changing and registering objects to a new watcher
win32u: Add SNI driver for systray handling
win32u: Add DBus event loop for SNI handling
https://gitlab.winehq.org/wine/wine/-/merge_requests/2808
Adds the tray icons implementation based on org.kde.StatusNotifierItem interface usage. Does allow restarting StatusNotifierWatcher object, but will fallback to XEMBED or internal tray, if wine gets initialized when there is no StatusNotifierWatcher object registered.
--
v36: win32u: Handle dbus notification balloons from system_tray_call
win32u: Handle notification balloons through org.freedesktop.Notifications dbus interface
win32u: Handle StatusNotifierItem management from system_tray_call
win32u: Add SNI driver for systray handling
https://gitlab.winehq.org/wine/wine/-/merge_requests/2808
Largely based on Nikolay Sivov's original patch and !3096. The files modified from running make_requests and make_specfile have been omitted.
--
v2: ntdll: Implement NtGetNextProcess.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4611
--
v2: mshtml: Get rid of outer_window member in HTMLDocumentNode.
mshtml: Use inner window's outer_window when checking if it's interactive
mshtml: Skip navigation handling on anchor/area elements for detached
mshtml: Return failure when setting IHTMLDocument2::location for detached
mshtml: Return failure in IHTMLDocument2::documentElement for detached
mshtml: Return failure in IHTMLDocument2::open() for detached documents.
mshtml: Return failure in IHTMLDocument2::cookie for detached documents.
mshtml: Return failure in IHTMLDocument2::domain for detached documents.
mshtml: Return failure in IHTMLDocument2::frames for detached documents.
mshtml: Use inner window's outer_window in IHTMLDocument2::readyState.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4604
While debugging League of Legends I noticed that `LoadLibraryEx()` is invoked with binary filename (non-text) and non-NULL `hFile`.
In Windows such call would return `NULL` with LastError set as `ERROR_INVALID_PARAMETER` but current Wine implementation would try to proceed ahead.
I don't know if this is intentional trick to mess up debugging/reversing tools or if we have some memory corruption before that overwrites filename buffer. But then I can't imagine how `hFile` could have gotten corrupted since shouldn't that be simple static value in register...
Having this MR causes very noticeable difference in LoL:
* without it - process deadlocks
* with it - no deadlock
Also while looking at this, I tried a lot of different flag combinations on Windows 10 and here I implemented so it works exactly like that.
I also implemented test case for non-NULL `hFile` but I didn't bother for other flags since I don't know if we even care about those.
--
v2: kernelbase: LoadLibraryEx validate flags like Win10
kernelbase: LoadLibraryEx support LOAD_PACKAGED_LIBRARY
kernelbase: LoadLibraryEx enforce valid flag combinations
kernelbase: Add test case for LoadLibraryEx() when hFile is non-NULL
https://gitlab.winehq.org/wine/wine/-/merge_requests/4587
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v2: ntdll: Use public type for SystemSupportedProcessorArchitectures returned data.
include: Add missing enum to wdm.h.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4605
- Make it present some frames
- Make it check that the frames are from the new device, instead of checking TerminateDevice count; fixes https://bugs.winehq.org/show_bug.cgi?id=55649
- ~~Make it check for and avoid some absurd crash on Windows~~
~~I tried everything I could think of, but Windows absolutely refuses to present a frame after changing the D3D device, instead choosing to return various absurd errors (segfaults, deadlocks, out of memory, etc). I suspect the VMR9 is haunted.~~
edit: Works on Windows now
--
v10: quartz/tests: Improve VMR9 ChangeD3DDevice test.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3970
Add stubs for CrtImplementationDetails::Thow*ModuleLoadException functions
This will help some applications not crashing.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=34537
Next part will be moving this code to msvcp and to make sure Cin, other related classes are implemented for msvcmxx.dlls
--
v6: msvcm80: Add stub for ThrowNestedLoadModuleException function.
msvcm80: Add stub for ThrowModuleLoadException(String, Exception) function.
msvcm80: Add stub for ThrowModuleLoadException(String) function.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4596
On Tue Dec 5 19:35:28 2023 +0000, Piotr Caban wrote:
> This generally looks good for me. How about changing
> `CrtImplementationDetails_ThrowModuleLoadException_Inner` function name?
> I'm not familiar with the function so it's hard to suggest a better name
> (maybe `CrtImplementationDetails_ThrowModuleLoadException_inner` or
> `CrtImplementationDetails_ThrowModuleLoadException_exc`). In other
> functions we're using lowercase suffix if needed.
> This MR is marked as draft. Please mark it as ready when appropriate.
I will rename to CrtImplementationDetails_ThrowModuleLoadException_inner and What I found that from extensive searching on google and the error messages is that the it trys to rethrow the inner exception as ModuleLoadException.
eg:
https://forum.unity.com/threads/c-wrapper-for-unity.265398/
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4596#note_55104
This generally looks good for me. How about changing `CrtImplementationDetails_ThrowModuleLoadException_Inner` function name? I'm not familiar with the function so it's hard to suggest a better name (maybe `CrtImplementationDetails_ThrowModuleLoadException_inner` or `CrtImplementationDetails_ThrowModuleLoadException_exc`). In other functions we're using lowercase suffix if needed.
This MR is marked as draft. Please mark it as ready when appropriate.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4596#note_55103
This MR implements mouselook, which requires support for ClipCursor and relative motion events. The latter we can implement directly without using `SetCursorPos` for which no Wayland protocol exists at the moment.
1. Implement setting the foreground window, as this is required for clipping to work properly (i.e., for the ClipCursor driver callback to be called in the proper process/thread, see commit (2)). We can't unconditionally set the foreground window on keyboard focus, since compositors are eager to give the focus and some windows strongly dislike that (see https://gitlab.winehq.org/wine/wine/-/merge_requests/4102#note_51733). This MR borrows the "managed" window concept from WineX11 to detect windows that we shouldn't allow the compositor to manage, and avoids setting such windows as the foreground on keyboard focus.
2. Implement cursor clipping using the pointer-constraints protocol.
3. Switch to emitting relative motion events using the relative-pointer protocol when the cursor is not visible.
---
4. Finally, a potential fix for an issue I have been seeing where apps may transiently lose the active status (see commit message for more) as a result of the foreground state changes in this MR, which has undesirable side-effects. I have included this here for MR completeness/correctness, but it can be moved to a subsequent MR if preferred.
Note: the velocity of relative motion events when scaling is involved is somewhat inconsistent among Wayland compositors.
Thanks!
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4593