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