<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Liberation Sans">Dear Lazarus developers!<br>
<br>
I'm examining the problem disturbing me for years.<br>
<br>
GTK2 applications provide thread-safety using internal mutexes
passed through gdk_thread_init()<br>
And it works.<br>
<br>
Pure X-Applcation does so (orders X-messages per-thread) using
XInitThreads at early start of application.<br>
And it also works<br>
<br>
But GTK Widgetset uses pure Xlib calls for determining keyboard
states. <br>
Xlib thread-safety is not initialized in GTK2 widgetset.<br>
<br>
IMO the problem half-way to resolve - either not use Xlib calls
(pure GTK2,3 - it is threadsafe) or make GTK and Xlib
interoperable. <br>
Or block GTK calls until Xlib call returned.<br>
<br>
with best regards,<br>
Anton<br>
</font>
</body>
</html>