diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-01 03:59:21 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-01 04:21:27 +0300 |
commit | 8a8424021c6bd7666375b5d93804c2693fab4a0d (patch) | |
tree | 7df04308ecfabcaf2524526e8fc3f632c01dcf86 /source/blender/windowmanager/intern/wm_window.c | |
parent | eb0f8317e231c4a02940d0269125a96a47e94c7e (diff) |
Cleanup: move Event.is_repeat & is_direction_inverted to flags
Use a flag for events to avoid adding struct members every time a new
kind of tag is needed - so events remain small.
This also simplifies copying settings as flags can be copied at once
with a mask.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_window.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index cdfb6a81596..242b8dc2968 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -1213,7 +1213,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr wm_event_init_from_window(win, &event); event.type = MOUSEMOVE; copy_v2_v2_int(event.prev_xy, event.xy); - event.is_repeat = false; + event.flag = 0; wm_event_add(win, &event); @@ -1344,7 +1344,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr /* activate region */ event.type = MOUSEMOVE; copy_v2_v2_int(event.prev_xy, event.xy); - event.is_repeat = false; + event.flag = 0; /* No context change! C->wm->windrawable is drawable, or for area queues. */ wm->winactive = win; @@ -1485,7 +1485,7 @@ static bool wm_window_timer(const bContext *C) event.type = wt->event_type; event.val = KM_NOTHING; event.keymodifier = 0; - event.is_repeat = false; + event.flag = 0; event.custom = EVT_DATA_TIMER; event.customdata = wt; wm_event_add(win, &event); |