mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 14:59:30 +02:00
cocoa: adding the system timer to the most common loop modes (thus it would fire if menu is openned or a modal dialog is up)
git-svn-id: trunk@61271 -
This commit is contained in:
parent
01762d1065
commit
47e78c92f8
@ -315,7 +315,10 @@ begin
|
||||
timer:=NSTimer.timerWithTimeInterval_target_selector_userInfo_repeats(
|
||||
Interval/1000, user, objcselector(user.timerEvent), user, True);
|
||||
|
||||
// adding timer to all "common" loop mode.
|
||||
NSRunLoop.currentRunLoop.addTimer_forMode(timer, NSDefaultRunLoopMode);
|
||||
NSRunLoop.currentRunLoop.addTimer_forMode(timer, NSModalPanelRunLoopMode);
|
||||
NSRunLoop.currentRunLoop.addTimer_forMode(timer, NSEventTrackingRunLoopMode);
|
||||
|
||||
{user is retained (twice, because it's target), by the timer and }
|
||||
{released (twice) on timer invalidation}
|
||||
|
Loading…
Reference in New Issue
Block a user