diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-03-21 11:37:57 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-03-21 11:37:57 +0100 |
commit | a9ebf7e38ec2994be67167aec91df851bd9ea88a (patch) | |
tree | 8b17be795bb2fdd807c1e45fc930cfe641c0f0c5 /samples | |
parent | 865476e5fc4db8a8f69d53bf8c64418261bfcb7f (diff) |
Init the X11 threads as first thing on X11 in the GTK sample
Diffstat (limited to 'samples')
-rw-r--r-- | samples/GtkVideoPlayer.cs | 6 | ||||
-rw-r--r-- | samples/gtk-video-player.exe.config | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/samples/GtkVideoPlayer.cs b/samples/GtkVideoPlayer.cs index 14560f0..ad31b2d 100644 --- a/samples/GtkVideoPlayer.cs +++ b/samples/GtkVideoPlayer.cs @@ -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 (); } diff --git a/samples/gtk-video-player.exe.config b/samples/gtk-video-player.exe.config new file mode 100644 index 0000000..4a1507c --- /dev/null +++ b/samples/gtk-video-player.exe.config @@ -0,0 +1,3 @@ +<configuration> + <dllmap dll="libgdk-win32-2.0-0.dll" target="libgdk-x11-2.0.so.0"/> +</configuration> |