Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-06-27 13:31:28 +0300
committerCampbell Barton <campbell@blender.org>2022-06-27 13:36:40 +0300
commita61792968363bbd443f03186e77fef77ddbf88a7 (patch)
tree7ae168d0e89f03d5dbed24cb12be0c3033ad651f /source/blender/windowmanager/intern/wm_cursors.c
parent3cf6516e7b917bd81d7147b57baafe2495c759f4 (diff)
Cleanup: rename misleading/inconsistent GHOST types
Remove mask suffix from: - GHOST_TButtonMask - GHOST_TModifierKeyMask .. neither are used as bit-masks. Remove 'Grab' from: - GHOST_kGrabAxisNone - GHOST_kGrabAxisY .. matching the existing GHOST_TAxisFlag & GHOST_kAxisX.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_cursors.c')
-rw-r--r--source/blender/windowmanager/intern/wm_cursors.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c
index fc992ef069d..54636cb57ec 100644
--- a/source/blender/windowmanager/intern/wm_cursors.c
+++ b/source/blender/windowmanager/intern/wm_cursors.c
@@ -228,7 +228,7 @@ void WM_cursor_grab_enable(wmWindow *win, int wrap, bool hide, int bounds[4])
/* Only grab cursor when not running debug.
* It helps not to get a stuck WM when hitting a break-point. */
GHOST_TGrabCursorMode mode = GHOST_kGrabNormal;
- GHOST_TAxisFlag mode_axis = GHOST_kAxisX | GHOST_kGrabAxisY;
+ GHOST_TAxisFlag mode_axis = GHOST_kAxisX | GHOST_kAxisY;
if (bounds) {
wm_cursor_position_to_ghost(win, &bounds[0], &bounds[1]);
@@ -245,7 +245,7 @@ void WM_cursor_grab_enable(wmWindow *win, int wrap, bool hide, int bounds[4])
mode_axis = GHOST_kAxisX;
}
else if (wrap == WM_CURSOR_WRAP_Y) {
- mode_axis = GHOST_kGrabAxisY;
+ mode_axis = GHOST_kAxisY;
}
}
@@ -267,11 +267,10 @@ void WM_cursor_grab_disable(wmWindow *win, const int mouse_ungrab_xy[2])
if (mouse_ungrab_xy) {
int mouse_xy[2] = {mouse_ungrab_xy[0], mouse_ungrab_xy[1]};
wm_cursor_position_to_ghost(win, &mouse_xy[0], &mouse_xy[1]);
- GHOST_SetCursorGrab(
- win->ghostwin, GHOST_kGrabDisable, GHOST_kGrabAxisNone, NULL, mouse_xy);
+ GHOST_SetCursorGrab(win->ghostwin, GHOST_kGrabDisable, GHOST_kAxisNone, NULL, mouse_xy);
}
else {
- GHOST_SetCursorGrab(win->ghostwin, GHOST_kGrabDisable, GHOST_kGrabAxisNone, NULL, NULL);
+ GHOST_SetCursorGrab(win->ghostwin, GHOST_kGrabDisable, GHOST_kAxisNone, NULL, NULL);
}
win->grabcursor = GHOST_kGrabDisable;