Cleanup: rename wm_get_cursor_position
Match naming of other wm_cursor_position_* functions.
This commit is contained in:
parent
3bc406274b
commit
b22b037229
|
@ -303,7 +303,7 @@ static void wm_cursor_warp_relative(wmWindow *win, int x, int y)
|
|||
{
|
||||
/* note: don't use wmEvent coords because of continuous grab T36409. */
|
||||
int cx, cy;
|
||||
wm_get_cursor_position(win, &cx, &cy);
|
||||
wm_cursor_position_get(win, &cx, &cy);
|
||||
WM_cursor_warp(win, cx + x, cy + y);
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ static void wm_paintcursor_draw(bContext *C, ScrArea *area, ARegion *region)
|
|||
|
||||
if (ELEM(win->grabcursor, GHOST_kGrabWrap, GHOST_kGrabHide)) {
|
||||
int x = 0, y = 0;
|
||||
wm_get_cursor_position(win, &x, &y);
|
||||
wm_cursor_position_get(win, &x, &y);
|
||||
pc->draw(C, x, y, pc->customdata);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -2343,7 +2343,7 @@ static int wm_handler_fileselect_do(bContext *C,
|
|||
wm_window_make_drawable(wm, ctx_win);
|
||||
/* Ensure correct cursor position, otherwise, popups may close immediately after
|
||||
* opening (UI_BLOCK_MOVEMOUSE_QUIT). */
|
||||
wm_get_cursor_position(ctx_win, &ctx_win->eventstate->x, &ctx_win->eventstate->y);
|
||||
wm_cursor_position_get(ctx_win, &ctx_win->eventstate->x, &ctx_win->eventstate->y);
|
||||
wm->winactive = ctx_win; /* Reports use this... */
|
||||
if (handler->context.win == win) {
|
||||
handler->context.win = NULL;
|
||||
|
|
|
@ -520,7 +520,7 @@ void WM_window_set_dpi(const wmWindow *win)
|
|||
static void wm_window_update_eventstate(wmWindow *win)
|
||||
{
|
||||
/* Update mouse position when a window is activated. */
|
||||
wm_get_cursor_position(win, &win->eventstate->x, &win->eventstate->y);
|
||||
wm_cursor_position_get(win, &win->eventstate->x, &win->eventstate->y);
|
||||
}
|
||||
|
||||
static void wm_window_ensure_eventstate(wmWindow *win)
|
||||
|
@ -983,15 +983,15 @@ void wm_cursor_position_to_ghost(wmWindow *win, int *x, int *y)
|
|||
GHOST_ClientToScreen(win->ghostwin, *x, *y, x, y);
|
||||
}
|
||||
|
||||
void wm_get_cursor_position(wmWindow *win, int *x, int *y)
|
||||
void wm_cursor_position_get(wmWindow *win, int *r_x, int *r_y)
|
||||
{
|
||||
if (UNLIKELY(G.f & G_FLAG_EVENT_SIMULATE)) {
|
||||
*x = win->eventstate->x;
|
||||
*y = win->eventstate->y;
|
||||
*r_x = win->eventstate->x;
|
||||
*r_y = win->eventstate->y;
|
||||
return;
|
||||
}
|
||||
GHOST_GetCursorPosition(g_system, x, y);
|
||||
wm_cursor_position_from_ghost(win, x, y);
|
||||
GHOST_GetCursorPosition(g_system, r_x, r_y);
|
||||
wm_cursor_position_from_ghost(win, r_x, r_y);
|
||||
}
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -69,8 +69,8 @@ void wm_window_swap_buffers(wmWindow *win);
|
|||
void wm_window_set_swap_interval(wmWindow *win, int interval);
|
||||
bool wm_window_get_swap_interval(wmWindow *win, int *intervalOut);
|
||||
|
||||
void wm_get_cursor_position(wmWindow *win, int *x, int *y);
|
||||
void wm_cursor_position_from_ghost(wmWindow *win, int *x, int *y);
|
||||
void wm_cursor_position_get(wmWindow *win, int *r_x, int *r_y);
|
||||
void wm_cursor_position_from_ghost(wmWindow *win, int *r_x, int *r_y);
|
||||
void wm_cursor_position_to_ghost(wmWindow *win, int *x, int *y);
|
||||
|
||||
#ifdef WITH_INPUT_IME
|
||||
|
|
Loading…
Reference in New Issue