WM: ensure is_repeat isn't set for mouse-move events

Follow up to d782bad62d

Also clear this for simulated events.
This commit is contained in:
Campbell Barton 2020-10-22 11:53:24 +11:00
parent cc3fdffbbe
commit 88660d67a4
2 changed files with 2 additions and 0 deletions

View File

@ -632,6 +632,7 @@ static wmEvent *rna_Window_event_add_simulate(wmWindow *win,
wmEvent e = *win->eventstate;
e.type = type;
e.val = value;
e.is_repeat = false;
e.x = x;
e.y = y;
/* Note: KM_MOD_FIRST, KM_MOD_SECOND aren't used anywhere, set as bools */

View File

@ -3402,6 +3402,7 @@ void wm_event_do_handlers(bContext *C)
tevent.type = MOUSEMOVE;
tevent.prevx = tevent.x;
tevent.prevy = tevent.y;
tevent.is_repeat = false;
wm_event_add(win, &tevent);
win->addmousemove = 0;
}