summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-08-15 18:24:14 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-08-15 18:24:14 +0000
commitdc0fe79d2fe5697b99e138ff3aacd5d7a63df04c (patch)
tree2550b940245fa404d66b73e31bd58133c2a8a347 /src
parent6d62682436c03cb31e395bcb2fdde1296cdf47f1 (diff)
downloadxine-lib-dc0fe79d2fe5697b99e138ff3aacd5d7a63df04c.tar.gz
xine-lib-dc0fe79d2fe5697b99e138ff3aacd5d7a63df04c.tar.bz2
patch - save old XErrorHandler by Mark Thomas
CVS patchset: 2461 CVS date: 2002/08/15 18:24:14
Diffstat (limited to 'src')
-rw-r--r--src/video_out/video_out_xshm.c11
-rw-r--r--src/video_out/video_out_xv.c10
2 files changed, 15 insertions, 6 deletions
diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c
index 84ca28525..284578f92 100644
--- a/src/video_out/video_out_xshm.c
+++ b/src/video_out/video_out_xshm.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_xshm.c,v 1.84 2002/08/15 03:12:25 miguelfreitas Exp $
+ * $Id: video_out_xshm.c,v 1.85 2002/08/15 18:24:14 miguelfreitas Exp $
*
* video_out_xshm.c, X11 shared memory extension interface for xine
*
@@ -117,6 +117,8 @@ typedef struct xshm_driver_s {
xshm_frame_t *cur_frame; /* for completion event handling */
vo_overlay_t *overlay;
+ int (*x11_old_error_handler) (Display *, XErrorEvent *);
+
} xshm_driver_t;
@@ -140,14 +142,15 @@ static int HandleXError (Display *display, XErrorEvent *xevent) {
static void x11_InstallXErrorHandler (xshm_driver_t *this)
{
- XSetErrorHandler (HandleXError);
+ this->x11_old_error_handler = XSetErrorHandler (HandleXError);
XFlush (this->display);
}
static void x11_DeInstallXErrorHandler (xshm_driver_t *this)
{
- XSetErrorHandler (NULL);
+ XSetErrorHandler (this->x11_old_error_handler);
XFlush (this->display);
+ this->x11_old_error_handler = NULL;
}
/*
@@ -1040,6 +1043,8 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) {
this->gc = XCreateGC (this->display, this->drawable,
0, NULL);
+ this->x11_old_error_handler = NULL;
+
this->vo_driver.get_capabilities = xshm_get_capabilities;
this->vo_driver.alloc_frame = xshm_alloc_frame;
this->vo_driver.update_frame_format = xshm_update_frame_format;
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index e2ef7f4b6..0264cd18e 100644
--- a/src/video_out/video_out_xv.c
+++ b/src/video_out/video_out_xv.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_xv.c,v 1.126 2002/08/15 03:12:25 miguelfreitas Exp $
+ * $Id: video_out_xv.c,v 1.127 2002/08/15 18:24:14 miguelfreitas Exp $
*
* video_out_xv.c, X11 video extension interface for xine
*
@@ -132,6 +132,8 @@ struct xv_driver_s {
int use_colorkey;
uint32_t colorkey;
+
+ int (*x11_old_error_handler) (Display *, XErrorEvent *);
};
int gX11Fail;
@@ -214,14 +216,15 @@ int HandleXError (Display *display, XErrorEvent *xevent) {
static void x11_InstallXErrorHandler (xv_driver_t *this)
{
- XSetErrorHandler (HandleXError);
+ this->x11_old_error_handler = XSetErrorHandler (HandleXError);
XFlush (this->display);
}
static void x11_DeInstallXErrorHandler (xv_driver_t *this)
{
- XSetErrorHandler (NULL);
+ XSetErrorHandler (this->x11_old_error_handler);
XFlush (this->display);
+ this->x11_old_error_handler = NULL;
}
static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo,
@@ -1143,6 +1146,7 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) {
this->deinterlace_frame.image = NULL;
this->use_colorkey = 0;
this->colorkey = 0;
+ this->x11_old_error_handler = NULL;
XAllocNamedColor(this->display,
DefaultColormap(this->display, this->screen),