[fpc-pascal] Xlib Threads
vmst at golden.net
Fri Apr 25 19:44:17 CEST 2014
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 the thread but still get
a GP fault.
X Error of failed request: BadLength (poly request too large or internal
Xlib length error)
Major opcode of failed request: 100 (X_ChangeKeyboardMapping)
Serial number of failed request: 20
Current serial number in output stream: 35
X11 code which causes the problem in the thread :
NewEvent := Xpending(TheDisplay) > 0 ;
if NewEvent then
KeypressedX := myevent._type = keypress ;
Any suggestions are welcomed. Thanks in advance.
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Xlib-Threads-tp5719066.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
More information about the fpc-pascal