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:
authorTon Roosendaal <ton@blender.org>2008-12-21 22:58:25 +0300
committerTon Roosendaal <ton@blender.org>2008-12-21 22:58:25 +0300
commitf1e0cf36f857501b43bc4cf81a845c45dc9f294e (patch)
treed144602aa1f2bd893a74f1bd54f3d77c017930e1 /source/blender/windowmanager
parent05aa83ad1e580bb793ff529760a81c5595193d97 (diff)
2.5
Animated screen! (unfinished, now only draws, no animation code yet). Fun though to see it all work. :) NOTE: Mac ghost has timer bug, the GHOST_ProcessEvents() doesnt wake up for timers. NOTE2: Added while loop in wm_window_process_events() to force Ghost giving all events to Blender. Timers otherwise don't accumulate... might be needed to fix in ghost too. I tend to think to code own timer, this ghost stuff is totally different per platform.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c2
-rw-r--r--source/blender/windowmanager/intern/wm_window.c17
2 files changed, 16 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 16b7e15612d..abd562a73cd 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -675,7 +675,7 @@ void wm_event_do_handlers(bContext *C)
CTX_wm_area_set(C, area_event_inside(C, event));
CTX_wm_region_set(C, region_event_inside(C, event));
- /* MVC demands to not draw in event handlers... for now we leave it */
+ /* MVC demands to not draw in event handlers... but we need to leave it for ogl selecting etc */
wm_window_make_drawable(C, win);
action= wm_handlers_do(C, event, &win->handlers);
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 649bc887e6c..7fba9a6115a 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -498,8 +498,21 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private)
void wm_window_process_events(int wait_for_event)
{
- GHOST_ProcessEvents(g_system, wait_for_event);
- GHOST_DispatchEvents(g_system);
+ int handled= 0;
+
+ /* ghost only processes 1 (timer?) event a time... we want to accumulate all */
+ while(1) {
+ if(GHOST_ProcessEvents(g_system, 0)) {
+ GHOST_DispatchEvents(g_system);
+ handled= 1;
+ }
+ else
+ break;
+ }
+ if(handled==0 && wait_for_event) {
+ GHOST_ProcessEvents(g_system, wait_for_event);
+ GHOST_DispatchEvents(g_system);
+ }
}
/* **************** init ********************** */