<html>
  <head>
    <meta content="text/html; charset=ISO-8859-15"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 22.01.2013 20:56, zeljko wrote:
    <blockquote cite="mid:201301221856.41023.zeljko@holobit.net"
      type="cite">
      <pre wrap="">On Tuesday 22 of January 2013 18:52:31 Anton Kavalenka wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Dear Lazarus developers!

I'm examining the problem disturbing me for years.

GTK2 applications provide thread-safety using internal mutexes passed
through gdk_thread_init()
And it works.

Pure X-Applcation does so (orders X-messages per-thread) using
XInitThreads at early start of application.
And it also works

But GTK Widgetset uses pure Xlib calls for determining keyboard states.
Xlib thread-safety is not initialized in GTK2 widgetset.

IMO the problem half-way to resolve - either not use Xlib calls (pure
GTK2,3 - it is threadsafe) or make GTK and Xlib interoperable.
Or block GTK calls until Xlib call returned.
</pre>
      </blockquote>
      <pre wrap="">
Feel free to provide patch.

zeljko
</pre>
    </blockquote>
    <font face="Liberation Sans">I'd like to, but i'm not a great expert
      in X - so i've subscribed to the list to discuss.<br>
      <br>
      using XinitThreads at start of the program blocks GTK painting. <br>
      Forms are shown, but no text output.<br>
      <br>
      So - no way to alter XLib internals. The only way - to initialize
      GTK threading in a way compatibel with X.<br>
      <br>
      regards,<br>
      Anton<br>
      <br>
    </font>
  </body>
</html>