mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-30 07:35:59 +00:00
Fixed: #1033 WebIG now works on linux too
This commit is contained in:
parent
45eb6f48c7
commit
3f66586110
1 changed files with 32 additions and 0 deletions
|
@ -2592,6 +2592,34 @@ struct CButtonFreezer : public CInterfaceElementVisitor
|
|||
}
|
||||
};
|
||||
|
||||
static int timer_called = 0;
|
||||
|
||||
static int
|
||||
timer_callback(HTTimer * const timer ,
|
||||
void * const user_data ,
|
||||
HTEventType const event ) {
|
||||
/*----------------------------------------------------------------------------
|
||||
A handy timer callback which cancels the running event loop.
|
||||
-----------------------------------------------------------------------------*/
|
||||
nlassert(event == HTEvent_TIMEOUT);
|
||||
timer_called = 1;
|
||||
HTEventList_stopLoop();
|
||||
|
||||
/* XXX - The meaning of this return value is undocumented, but close
|
||||
** inspection of libwww's source suggests that we want to return HT_OK. */
|
||||
return HT_OK;
|
||||
}
|
||||
|
||||
static void handleLibwwwEvents() {
|
||||
HTTimer *timer;
|
||||
timer_called = 0;
|
||||
timer = HTTimer_new(NULL, &timer_callback, NULL,
|
||||
1, YES, NO);
|
||||
if (!timer_called)
|
||||
HTEventList_newLoop();
|
||||
HTTimer_delete(timer);
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
||||
void CGroupHTML::handle ()
|
||||
|
@ -2871,6 +2899,10 @@ void CGroupHTML::handle ()
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifndef NL_OS_WINDOWS
|
||||
if(isBrowsing())
|
||||
handleLibwwwEvents();
|
||||
#endif
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
Loading…
Reference in a new issue