Author: manolo
Date: 2011-03-01 04:37:34 -0800 (Tue, 01 Mar 2011)
New Revision: 8489
Log:
STR 2580: the first Fl::add_timeout() call now calls fl_open_display() because
that is necessary for
timeout events to be recovered by the event loop.
Modified:
branches/branch-1.3/src/Fl_cocoa.mm
Modified: branches/branch-1.3/src/Fl_cocoa.mm
===================================================================
--- branches/branch-1.3/src/Fl_cocoa.mm 2011-03-01 11:58:36 UTC (rev 8488)
+++ branches/branch-1.3/src/Fl_cocoa.mm 2011-03-01 12:37:34 UTC (rev 8489)
@@ -293,11 +293,11 @@
void DataReady::AddFD(int n, int events, void (*cb)(int, void*), void *v)
{
- fl_open_display(); // necessary for NSApp to be defined
RemoveFD(n, events);
int i = nfds++;
if (i >= fd_array_size)
{
+ fl_open_display(); // necessary for NSApp to be defined and the event loop
to work
FD *temp;
fd_array_size = 2*fd_array_size+1;
if (!fds) { temp = (FD*)malloc(fd_array_size*sizeof(FD)); }
@@ -544,6 +544,7 @@
{
if (mac_timer_alloc == 0) {
mac_timer_alloc = 8;
+ fl_open_display(); // needed because the timer creates an event
}
mac_timer_alloc *= 2;
MacTimeout* new_timers = new MacTimeout[mac_timer_alloc];
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit