summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorluc-git <102831178+luc-git@users.noreply.github.com>2023-10-09 20:54:46 +0200
committerAdmiral H. Curtiss <pikachu025@gmail.com>2024-01-30 01:06:30 +0100
commitd124fcbb0d2ab9b5c908ca847e56978e47b1afe2 (patch)
treed931834f776115afadda090c539f654709b1c828 /Source/Core
parent1e2fb41d0f7f0714cd1dbeede912bfb030c928ab (diff)
DolphinQt/RenderWidget: Add comments for SetCursorLocked() on Linux.
Co-authored-by: Admiral H. Curtiss <pikachu025@gmail.com>
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinQt/RenderWidget.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/Core/DolphinQt/RenderWidget.cpp b/Source/Core/DolphinQt/RenderWidget.cpp
index 129fad9858..ac07dfcf27 100644
--- a/Source/Core/DolphinQt/RenderWidget.cpp
+++ b/Source/Core/DolphinQt/RenderWidget.cpp
@@ -262,7 +262,16 @@ void RenderWidget::SetCursorLocked(bool locked, bool follow_aspect_ratio)
if (ClipCursor(&rect))
#else
- // TODO: implement on other platforms. Probably XGrabPointer on Linux.
+ // TODO: Implement on other platforms. XGrabPointer on Linux X11 should be equivalent to
+ // ClipCursor on Windows, though XFixesCreatePointerBarrier and XFixesDestroyPointerBarrier
+ // may also work. On Wayland zwp_pointer_constraints_v1::confine_pointer and
+ // zwp_pointer_constraints_v1::destroy provide this functionality.
+ // More info:
+ // https://stackoverflow.com/a/36269507
+ // https://tronche.com/gui/x/xlib/input/XGrabPointer.html
+ // https://www.x.org/releases/X11R7.7/doc/fixesproto/fixesproto.txt
+ // https://wayland.app/protocols/pointer-constraints-unstable-v1
+
// The setting is hidden in the UI if not implemented
if (false)
#endif