Re: [fpc-pascal] Xlib Threads

2014-04-28 Thread Michael Schnell
On 04/26/2014 10:07 PM, Graeme Geldenhuys wrote: And it just surprises me what features Xlib / X11 has X11 originally has been designed to work in a client-server way via TCP-IP. Using a hardware "X-Terminal" and a Unix box without any graphical hardware. :-) If in Lazarus, it would be poss

Re: [fpc-pascal] Xlib Threads

2014-04-27 Thread Graeme Geldenhuys
On 2014-04-27 11:13, Marco van de Voort wrote: > > (If you attend Fosdem occasionally, I often find myself at X.org lectures Umm, I'll have to make a plan. > when I have no other lecture to go to. Keith Packard also often has > lectures there) I have read so many of Keith's published papers. T

Re: [fpc-pascal] Xlib Threads

2014-04-27 Thread Brian
An interesting discussion at this link on the subject. http://networkedblogs.com/axUUw *Effectively, the beginning of the main() function is the only really safe place to call XInitThreads(). * -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Xlib-Threads-tp

Re: [fpc-pascal] Xlib Threads

2014-04-27 Thread Brian
Yes , Xlib has many impressive features , but it is lacking in a simple (and fast) way to independently write to specific bit planes without altering the other bit planes for 2D animation. OpenGL can be used (I think) for 2D automation using the z-buffer , but it really is and end around to a defic

Re: [fpc-pascal] Xlib Threads

2014-04-27 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > And it just surprises me what features Xlib / X11 has - yet everybody > seems so eager to replace it with something else (often with something > less feature rich, yet tick the "cool" box). Sure X11 could do with some > modernization, but I still t

Re: [fpc-pascal] Xlib Threads

2014-04-27 Thread Mark Morgan Lloyd
Graeme Geldenhuys wrote: On 2014-04-26 20:53, Mark Morgan Lloyd wrote: Interesting. I suppose that could lead us back to which widgetsets support full multithreading. And it just surprises me what features Xlib / X11 has - yet everybody seems so eager to replace it with something else (often w

Re: [fpc-pascal] Xlib Threads

2014-04-27 Thread Graeme Geldenhuys
On 2014-04-26 20:53, Mark Morgan Lloyd wrote: > Interesting. I suppose that could lead us back to which widgetsets > support full multithreading. And it just surprises me what features Xlib / X11 has - yet everybody seems so eager to replace it with something else (often with something less feat

Re: [fpc-pascal] Xlib Threads

2014-04-26 Thread Mark Morgan Lloyd
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 := my

Re: [fpc-pascal] Xlib Threads

2014-04-26 Thread Brian
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 = k

[fpc-pascal] Xlib Threads

2014-04-25 Thread Brian
All the Xlib documentation seems to imply that threads can be used , however if I attempt to put XNextEvent() or XPending() in a thread , the rsult is a GP fault . The error message suggests using XInitThreads() but it still generates a GP fault. Tried using XlockDisplay() and XUnlockDisplay() in