Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
3bde1ed6
Commit
3bde1ed6
authored
Mar 08, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/video_output/x11/xcommon.c: don't abort on X_SetInputFocus error which isn't fatal.
parent
38a90d28
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
modules/video_output/x11/xcommon.c
modules/video_output/x11/xcommon.c
+23
-0
No files found.
modules/video_output/x11/xcommon.c
View file @
3bde1ed6
...
...
@@ -52,6 +52,7 @@
#endif
#include <X11/Xlib.h>
#include <X11/Xproto.h>
#include <X11/Xmd.h>
#include <X11/Xutil.h>
#include <X11/keysym.h>
...
...
@@ -128,6 +129,8 @@ static int ConvertKey( int );
static
int
WindowOnTop
(
vout_thread_t
*
,
vlc_bool_t
);
static
int
X11ErrorHandler
(
Display
*
,
XErrorEvent
*
);
/*****************************************************************************
* Activate: allocate X11 video thread output method
*****************************************************************************
...
...
@@ -180,6 +183,9 @@ int E_(Activate) ( vlc_object_t *p_this )
}
if
(
psz_display
)
free
(
psz_display
);
/* Replace error handler so we can intercept some non-fatal errors */
XSetErrorHandler
(
X11ErrorHandler
);
/* Get a screen ID matching the XOpenDisplay return value */
p_vout
->
p_sys
->
i_screen
=
DefaultScreen
(
p_vout
->
p_sys
->
p_display
);
...
...
@@ -2109,6 +2115,23 @@ static IMAGE_TYPE * CreateImage( vout_thread_t *p_vout,
return
p_image
;
}
/*****************************************************************************
* X11ErrorHandler: replace error handler so we can intercept some of them
*****************************************************************************/
static
int
X11ErrorHandler
(
Display
*
display
,
XErrorEvent
*
event
)
{
/* 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
;
}
XSetErrorHandler
(
NULL
);
return
(
XSetErrorHandler
(
X11ErrorHandler
))(
display
,
event
);
}
#ifdef MODULE_NAME_IS_x11
/*****************************************************************************
* SetPalette: sets an 8 bpp palette
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment