summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx
index 2caf174d2..1a36149e2 100644
--- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx
+++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx
@@ -465,18 +465,7 @@ static void do_timer(CFRunLoopTimerRef timer, void* data)
void Fl_Cocoa_Screen_Driver::add_timeout(double time, Fl_Timeout_Handler cb, void* data)
{
- // check, if this timer slot exists already
- for (int i = 0; i < mac_timer_used; ++i) {
- MacTimeout& t = mac_timers[i];
- // if so, simply change the fire interval
- if (t.callback == cb && t.data == data) {
- t.next_timeout = CFAbsoluteTimeGetCurrent() + time;
- CFRunLoopTimerSetNextFireDate(t.timer, t.next_timeout );
- t.pending = 1;
- return;
- }
- }
- // no existing timer to use. Create a new one:
+ // always create a new timer entry
fl_intptr_t timer_id = -1;
// find an empty slot in the timer array
for (int i = 0; i < mac_timer_used; ++i) {