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 <ideasman42@gmail.com>2013-07-29 12:29:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-29 12:29:04 +0400
commit02608d257a9358e3bd756f1db8c8f53484c34c37 (patch)
tree46e155fde459e42761afc44c46e6f01ff087fa71 /source/blender/windowmanager/intern/wm_window.c
parentc9eb93d9fd967b47a4a6f45db6472772bb9c9af8 (diff)
add api call for initializing events from the windows eventstate.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_window.c')
-rw-r--r--source/blender/windowmanager/intern/wm_window.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index e0595e3c8ab..70541f7cec5 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -808,7 +808,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
* currently it seems to be common practice to generate new event for, but probably
* we'll need utility function for this? (sergey)
*/
- event = *(win->eventstate);
+ wm_event_init_from_window(win, &event);
event.type = MOUSEMOVE;
event.prevx = event.x;
event.prevy = event.y;
@@ -957,7 +957,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
win->eventstate->x = wx;
win->eventstate->y = wy;
- event = *(win->eventstate); /* copy last state, like mouse coords */
+ wm_event_init_from_window(win, &event); /* copy last state, like mouse coords */
/* activate region */
event.type = MOUSEMOVE;
@@ -1065,7 +1065,8 @@ static int wm_window_timer(const bContext *C)
else if (wt->event_type == TIMERAUTOSAVE)
wm_autosave_timer(C, wm, wt);
else if (win) {
- wmEvent event = *(win->eventstate);
+ wmEvent event;
+ wm_event_init_from_window(win, &event);
event.type = wt->event_type;
event.val = 0;