Cleanup: remove unused arg to wm_event_add_ghostevent
This commit is contained in:
@@ -4298,8 +4298,7 @@ static wmEvent *wm_event_add_mousemove(wmWindow *win, const wmEvent *event)
|
||||
|
||||
/* windows store own event queues, no bContext here */
|
||||
/* time is in 1000s of seconds, from ghost */
|
||||
void wm_event_add_ghostevent(
|
||||
wmWindowManager *wm, wmWindow *win, int type, int UNUSED(time), void *customdata)
|
||||
void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, void *customdata)
|
||||
{
|
||||
wmWindow *owin;
|
||||
|
||||
|
||||
@@ -1109,14 +1109,20 @@ void wm_window_reset_drawable(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* called by ghost, here we handle events for windows themselves or send to event system */
|
||||
/* mouse coordinate converversion happens here */
|
||||
/**
|
||||
* Called by ghost, here we handle events for windows themselves or send to event system.
|
||||
*
|
||||
* Mouse coordinate conversion happens here.
|
||||
*/
|
||||
static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr)
|
||||
{
|
||||
bContext *C = C_void_ptr;
|
||||
wmWindowManager *wm = CTX_wm_manager(C);
|
||||
GHOST_TEventType type = GHOST_GetEventType(evt);
|
||||
int time = GHOST_GetEventTime(evt);
|
||||
#if 0
|
||||
/* We may want to use time from ghost, currently `PIL_check_seconds_timer` is used instead. */
|
||||
uint64_t time = GHOST_GetEventTime(evt);
|
||||
#endif
|
||||
|
||||
if (type == GHOST_kEventQuitRequest) {
|
||||
/* Find an active window to display quit dialog in. */
|
||||
@@ -1167,7 +1173,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
|
||||
|
||||
switch (type) {
|
||||
case GHOST_kEventWindowDeactivate:
|
||||
wm_event_add_ghostevent(wm, win, type, time, data);
|
||||
wm_event_add_ghostevent(wm, win, type, data);
|
||||
win->active = 0; /* XXX */
|
||||
|
||||
/* clear modifiers for inactive windows */
|
||||
@@ -1210,7 +1216,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
|
||||
if (win->eventstate->shift) {
|
||||
if ((keymodifier & KM_SHIFT) == 0) {
|
||||
kdata.key = GHOST_kKeyLeftShift;
|
||||
wm_event_add_ghostevent(wm, win, GHOST_kEventKeyUp, time, &kdata);
|
||||
wm_event_add_ghostevent(wm, win, GHOST_kEventKeyUp, &kdata);
|
||||
}
|
||||
}
|
||||
#ifdef USE_WIN_ACTIVATE
|
||||
@@ -1223,7 +1229,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
|
||||
if (win->eventstate->ctrl) {
|
||||
if ((keymodifier & KM_CTRL) == 0) {
|
||||
kdata.key = GHOST_kKeyLeftControl;
|
||||
wm_event_add_ghostevent(wm, win, GHOST_kEventKeyUp, time, &kdata);
|
||||
wm_event_add_ghostevent(wm, win, GHOST_kEventKeyUp, &kdata);
|
||||
}
|
||||
}
|
||||
#ifdef USE_WIN_ACTIVATE
|
||||
@@ -1236,7 +1242,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
|
||||
if (win->eventstate->alt) {
|
||||
if ((keymodifier & KM_ALT) == 0) {
|
||||
kdata.key = GHOST_kKeyLeftAlt;
|
||||
wm_event_add_ghostevent(wm, win, GHOST_kEventKeyUp, time, &kdata);
|
||||
wm_event_add_ghostevent(wm, win, GHOST_kEventKeyUp, &kdata);
|
||||
}
|
||||
}
|
||||
#ifdef USE_WIN_ACTIVATE
|
||||
@@ -1249,7 +1255,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
|
||||
if (win->eventstate->oskey) {
|
||||
if ((keymodifier & KM_OSKEY) == 0) {
|
||||
kdata.key = GHOST_kKeyOS;
|
||||
wm_event_add_ghostevent(wm, win, GHOST_kEventKeyUp, time, &kdata);
|
||||
wm_event_add_ghostevent(wm, win, GHOST_kEventKeyUp, &kdata);
|
||||
}
|
||||
}
|
||||
#ifdef USE_WIN_ACTIVATE
|
||||
@@ -1506,18 +1512,18 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
|
||||
GHOST_TEventTrackpadData *pd = data;
|
||||
|
||||
wm_cursor_position_from_ghost(win, &pd->x, &pd->y);
|
||||
wm_event_add_ghostevent(wm, win, type, time, data);
|
||||
wm_event_add_ghostevent(wm, win, type, data);
|
||||
break;
|
||||
}
|
||||
case GHOST_kEventCursorMove: {
|
||||
GHOST_TEventCursorData *cd = data;
|
||||
|
||||
wm_cursor_position_from_ghost(win, &cd->x, &cd->y);
|
||||
wm_event_add_ghostevent(wm, win, type, time, data);
|
||||
wm_event_add_ghostevent(wm, win, type, data);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
wm_event_add_ghostevent(wm, win, type, time, data);
|
||||
wm_event_add_ghostevent(wm, win, type, data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,8 +138,7 @@ void wm_event_free_handler(wmEventHandler *handler);
|
||||
/* goes over entire hierarchy: events -> window -> screen -> area -> region */
|
||||
void wm_event_do_handlers(bContext *C);
|
||||
|
||||
void wm_event_add_ghostevent(
|
||||
wmWindowManager *wm, wmWindow *win, int type, int time, void *customdata);
|
||||
void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, void *customdata);
|
||||
|
||||
void wm_event_do_depsgraph(bContext *C);
|
||||
void wm_event_do_refresh_wm_and_depsgraph(bContext *C);
|
||||
|
||||
Reference in New Issue
Block a user