Commit 105b9c02 authored by Sam Hocevar's avatar Sam Hocevar

* modules/video_output/x11/xcommon.c: fix XShm detection on remote X.

parent 1a7bfa14
......@@ -2323,21 +2323,22 @@ static IMAGE_TYPE * CreateImage( vout_thread_t *p_vout,
*****************************************************************************/
static int X11ErrorHandler( Display * display, XErrorEvent * event )
{
switch( event->request_code )
{
case X_SetInputFocus:
/* Ingnore errors on XSetInputFocus()
* (they happen when a window is not yet mapped) */
if( event->request_code == X_SetInputFocus )
{
fprintf(stderr, "XSetInputFocus failed\n");
return 0;
}
if( event->request_code == 150 /* MIT-SHM */ &&
event->minor_code == X_ShmAttach )
case 150: /* MIT-SHM */
case 146: /* MIT-SHM too, what gives? */
if( event->minor_code == X_ShmAttach )
{
fprintf(stderr, "XShmAttach failed\n");
b_shm = VLC_FALSE;
return 0;
}
break;
}
XSetErrorHandler(NULL);
return (XSetErrorHandler(X11ErrorHandler))( display, event );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment