diff options
author | Campbell Barton <campbell@blender.org> | 2022-06-08 06:01:31 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-06-08 06:16:14 +0300 |
commit | a1d2efd190038c7615bd3bb459dc86c8b3a8ecdc (patch) | |
tree | 2f709a3566c84d45ccd352104573626a445cdb41 /intern/ghost/GHOST_C-api.h | |
parent | b3e0101a35b2885212aa199335564dca98dc50cd (diff) |
GHOST/Wayland: draw a software-cursor when wrapping cursor motion
As Wayland doesn't support moving the cursor, draw a cross-hair cursor
at the location used by Blender.
Without this, the cursor was locked at the location where grab started,
making some actions unusable since the cursor location was invisible.
Resolves T77311.
Diffstat (limited to 'intern/ghost/GHOST_C-api.h')
-rw-r--r-- | intern/ghost/GHOST_C-api.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h index ae749eb3b8c..57714083656 100644 --- a/intern/ghost/GHOST_C-api.h +++ b/intern/ghost/GHOST_C-api.h @@ -402,6 +402,10 @@ extern GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle, int32_t x, int32_t y); +GHOST_TSuccess GHOST_GetCursorGrabState(GHOST_WindowHandle windowhandle, + GHOST_TAxisFlag *r_wrap_axis, + int r_bounds[4]); + /** * Grabs the cursor for a modal operation, to keep receiving * events when the mouse is outside the window. X11 only, others @@ -897,6 +901,11 @@ extern int setConsoleWindowState(GHOST_TConsoleWindowState action); extern int GHOST_UseNativePixels(void); /** + * Warp the cursor, if supported. + */ +extern int GHOST_SupportsCursorWarp(void); + +/** * Focus window after opening, or put them in the background. */ extern void GHOST_UseWindowFocus(int use_focus); |