[fpc-pascal] Xlib Threads

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Sat Apr 26 21:53:21 CEST 2014


Brian wrote:
> SOLVED
> 
> XInitThreads() must be called prior to initailizing X , then it works using
> XLockDisplay() and XUnlockDisplay()
> 
> XLockDisplay(TheDisplay);
> 
> NewEvent := Xpending(TheDisplay) > 0 ;
> 
>    if NewEvent then
>      begin
>       XNextEvent(TheDisplay, @myevent);
>        KeypressedX :=  myevent._type = keypress ;
>      end; 
> XUnLockDisplay(TheDisplay);

Interesting. I suppose that could lead us back to which widgetsets 
support full multithreading.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list