# HG changeset patch
# User Darren Salt <[EMAIL PROTECTED]>
# Date 1170878573 0
# Node ID fda818f21cef72582722af10f24baa3080fd64d0
# Parent  3a99ad1de4d78750bacd610696cbe739889f30b6
Patch for a possible init failure (GDK saying "window != NULL" then a segfault).

diff -r fda818f21cef72582722af10f24baa3080fd64d0 -r 
3a99ad1de4d78750bacd610696cbe739889f30b6 ChangeLog
--- a/ChangeLog Wed Feb 07 20:02:53 2007 +0000
+++ b/ChangeLog Wed Feb 07 14:50:50 2007 +0000
@@ -31,6 +31,8 @@ 0.5.900:2007/??/??
        * Reworked the JS property code somewhat. No user-visible changes.
        * Only display the "broken xine-lib" message (for when there is no
          demuxer for the logo image) at most once.
+       * Hopefully fixed a possible initialisation failure which would cause
+         various GDK "window != NULL" assertion failures and a segfault.
 
 0.5.11:        2007/02/01
        [dsalt]
diff -r fda818f21cef72582722af10f24baa3080fd64d0 -r 
3a99ad1de4d78750bacd610696cbe739889f30b6 src/gtkvideo.c
--- a/src/gtkvideo.c    Wed Feb 07 20:02:53 2007 +0000
+++ b/src/gtkvideo.c    Wed Feb 07 14:50:50 2007 +0000
@@ -1038,8 +1038,17 @@ static void gtk_video_realize (GtkWidget
                                            widget->allocation.height, 0,
                                            black_pixel.pixel, 
black_pixel.pixel);
 
+  /* not sure why this is needed in some situations... */
+  XEvent event;
+  XCheckWindowEvent (xdisplay, priv->video_window, -1, &event);
+      
   widget->window = gdk_window_foreign_new_for_display
                     (display, priv->video_window);
+  if (!widget->window)
+  {
+    g_printerr (_("gtkvideo: couldn't get a GDK handle for the video 
window!\n"));
+    return;
+  }
   gdk_window_set_user_data (widget->window, widget); /* allow GTK events */
   {
     /* enforce background colour */

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Xine-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xine-cvslog

Reply via email to