Commit: 4acbb84efaf874717e5d29ad456880ce70ab929c
Author: Campbell Barton
Date: Wed Jun 15 15:44:16 2022 +1000
Branches: master
https://developer.blender.org/rB4acbb84efaf874717e5d29ad456880ce70ab929c
GHOST/Wayland: resolve glitch drawing the software cursor
When grab was disabled, the software cursor would remain displayed
in the image view. Ensure an additional redraw is done to clear the
cursor.
===================================================================
M source/blender/windowmanager/intern/wm_draw.c
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_draw.c
b/source/blender/windowmanager/intern/wm_draw.c
index c2a63c9db7a..63a7fb5ddaa 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -1153,9 +1153,17 @@ static bool wm_draw_update_test_window(Main *bmain,
bContext *C, wmWindow *win)
if (wm_software_cursor_needed()) {
struct GrabState grab_state;
- if (wm_software_cursor_needed_for_window(win, &grab_state) &&
- wm_software_cursor_motion_test(win)) {
- return true;
+ if (wm_software_cursor_needed_for_window(win, &grab_state)) {
+ if (wm_software_cursor_motion_test(win)) {
+ return true;
+ }
+ }
+ else {
+ /* Detect the edge case when the previous draw used the software cursor
but this one doesn't,
+ * it's important to redraw otherwise the software cursor will remain
displayed. */
+ if (g_software_cursor.winid != -1) {
+ return true;
+ }
}
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs