diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-04-18 06:03:19 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-04-18 06:03:19 +0400 |
commit | dfe2f8dc03267e041102837e92f547fb04881510 (patch) | |
tree | d9582c4667ce5b9e39e2adce40832aa4f44b4fe7 /source/blender/windowmanager/intern/wm_event_system.c | |
parent | d7e08f2d33207fdf76b1b597ef0de9dec26e3987 (diff) | |
parent | 00e46ef739cf2bfddb8805af056aa59fd3b3c71c (diff) |
Merged changes in the trunk up to revision 28247.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_event_system.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 19a7ae38b7f..72e34eea2ba 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -1240,6 +1240,10 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa handler->op->reports->printlevel = RPT_WARNING; uiPupMenuReports(C, handler->op->reports); + /* XXX - copied from 'wm_operator_finished()' */ + /* add reports to the global list, otherwise they are not seen */ + addlisttolist(&CTX_wm_reports(C)->list, &handler->op->reports->list); + CTX_wm_window_set(C, win_prev); } @@ -1544,31 +1548,30 @@ void wm_event_do_handlers(bContext *C) if( win->screen==NULL ) wm_event_free_all(win); - else - { + else { Scene* scene = win->screen->scene; - if(scene) - { + + if(scene) { int playing = sound_scene_playing(win->screen->scene); - if(playing != -1) - { + + if(playing != -1) { CTX_wm_window_set(C, win); CTX_wm_screen_set(C, win->screen); CTX_data_scene_set(C, scene); - if(((playing == 1) && (!win->screen->animtimer)) || ((playing == 0) && (win->screen->animtimer))) - { + + if(((playing == 1) && (!win->screen->animtimer)) || ((playing == 0) && (win->screen->animtimer))){ ED_screen_animation_play(C, -1, 1); } - if(playing == 0) - { + + if(playing == 0) { int ncfra = floor(sound_sync_scene(scene) * FPS); - if(ncfra != scene->r.cfra) - { + if(ncfra != scene->r.cfra) { scene->r.cfra = ncfra; ED_update_for_newframe(C, 1); WM_event_add_notifier(C, NC_WINDOW, NULL); } } + CTX_data_scene_set(C, NULL); CTX_wm_screen_set(C, NULL); CTX_wm_window_set(C, NULL); @@ -1579,6 +1582,9 @@ void wm_event_do_handlers(bContext *C) while( (event= win->queue.first) ) { int action = WM_HANDLER_CONTINUE; + if((G.f & G_DEBUG) && event && event->type!=MOUSEMOVE) + printf("pass on evt %d val %d\n", event->type, event->val); + wm_eventemulation(event); CTX_wm_window_set(C, win); @@ -2127,11 +2133,10 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int t if(owin) { wmEvent oevent= *(owin->eventstate); - oevent.x= event.x; - oevent.y= event.y; + oevent.x=owin->eventstate->x= event.x; + oevent.y=owin->eventstate->y= event.y; oevent.type= MOUSEMOVE; - *(owin->eventstate)= oevent; update_tablet_data(owin, &oevent); wm_event_add(owin, &oevent); } |