diff options
Diffstat (limited to 'source/blender/windowmanager/intern/wm_window.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index d70516ef02e..d6bde9a468c 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -26,7 +26,6 @@ * ***** END GPL LICENSE BLOCK ***** */ -#include <math.h> #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -91,7 +90,7 @@ static void wm_window_check_position(rcti *rect) wm_get_screensize(&width, &height); #ifdef __APPLE__ - height -= 70; + height -= 42; #endif if(rect->xmin < 0) { @@ -691,13 +690,12 @@ static int wm_window_timer(const bContext *C) wmTimer *wt; for(wt= win->timers.first; wt; wt= wt->next) { if(wt->sleep==0) { - if(time > wt->ntime) { + if(wt->timestep < time - wt->ltime) { wmEvent event= *(win->eventstate); wt->delta= time - wt->ltime; wt->duration += wt->delta; wt->ltime= time; - wt->ntime= wt->stime + wt->timestep*ceil(wt->duration/wt->timestep); event.type= wt->event_type; event.custom= EVT_DATA_TIMER; @@ -792,8 +790,6 @@ wmTimer *WM_event_add_window_timer(wmWindow *win, int event_type, double timeste wt->event_type= event_type; wt->ltime= PIL_check_seconds_timer(); - wt->ntime= wt->ltime + timestep; - wt->stime= wt->ltime; wt->timestep= timestep; BLI_addtail(&win->timers, wt); |