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!
--
v5:
https://gitlab.winehq.org/wine/wine/-/merge_requests/4593
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