Init the X11 threads as first thing on X11 in the GTK sample

This commit is contained in:
Sebastian Dröge 2010-03-21 11:37:57 +01:00
parent 865476e5fc
commit a9ebf7e38e
2 changed files with 9 additions and 0 deletions

View file

@ -19,6 +19,9 @@ public class MainWindow : Gtk.Window {
bool _pipelineOK = false;
public static void Main (string[] args) {
if (System.Environment.OSVersion.Platform == PlatformID.Unix)
XInitThreads ();
Gtk.Application.Init ();
Gst.Application.Init ();
MainWindow window = new MainWindow ();
@ -262,4 +265,7 @@ public class MainWindow : Gtk.Window {
[DllImport ("libgdk-win32-2.0-0.dll") ]
static extern bool gdk_window_ensure_native (IntPtr handle);
#endif
[DllImport ("libX11.so.6")]
static extern int XInitThreads ();
}

View file

@ -0,0 +1,3 @@
<configuration>
<dllmap dll="libgdk-win32-2.0-0.dll" target="libgdk-x11-2.0.so.0"/>
</configuration>