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
begin
XNextEvent(TheDisplay, @myevent);
KeypressedX := myevent._type = keypress ;
end;
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.
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal