[MPlayer-cvslog] r35730 - in trunk/gui: dialog/dialog.c wm/ws.c wm/ws.h

ib subversion at mplayerhq.hu
Thu Jan 10 16:40:43 CET 2013


Author: ib
Date: Thu Jan 10 16:40:43 2013
New Revision: 35730

Log:
Restore GUI's X error handler after gtk_init().

GDK sets its own handler.

Modified:
   trunk/gui/dialog/dialog.c
   trunk/gui/wm/ws.c
   trunk/gui/wm/ws.h

Modified: trunk/gui/dialog/dialog.c
==============================================================================
--- trunk/gui/dialog/dialog.c	Thu Jan 10 16:24:39 2013	(r35729)
+++ trunk/gui/dialog/dialog.c	Thu Jan 10 16:40:43 2013	(r35730)
@@ -137,6 +137,7 @@ void gtkInit(char *display_name)
 #endif
 
     gtk_init(&argc, &argv);
+    wsSetErrorHandler();           // GDK has just set its own handler
 
     theme = gtk_icon_theme_get_default();
 

Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c	Thu Jan 10 16:24:39 2013	(r35729)
+++ trunk/gui/wm/ws.c	Thu Jan 10 16:40:43 2013	(r35730)
@@ -249,6 +249,14 @@ static void wsUpdateXineramaInfo(wsTWind
     }
 }
 
+/**
+ * @brief Set the X error handler.
+ */
+void wsSetErrorHandler(void)
+{
+    XSetErrorHandler(wsErrorHandler);
+}
+
 void wsXInit(Display *display)
 {
     int eventbase;
@@ -258,7 +266,7 @@ void wsXInit(Display *display)
 
     wsDisplay = display;
 
-    XSetErrorHandler(wsErrorHandler);
+    wsSetErrorHandler();
 
 /* enable DND atoms */
     wsXDNDInitialize();

Modified: trunk/gui/wm/ws.h
==============================================================================
--- trunk/gui/wm/ws.h	Thu Jan 10 16:24:39 2013	(r35729)
+++ trunk/gui/wm/ws.h	Thu Jan 10 16:40:43 2013	(r35730)
@@ -214,6 +214,7 @@ extern unsigned long wsKeyTable[512];
 
 void wsXDone(void);
 void wsXInit(Display *display);
+void wsSetErrorHandler(void);
 
 int wsGetDepthOnScreen(void);
 


More information about the MPlayer-cvslog mailing list