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
2de2fe18
Commit
2de2fe18
authored
Oct 20, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XCB/window: create the handler thread even without keyboard events
parent
0fbba507
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
modules/video_output/xcb/window.c
modules/video_output/xcb/window.c
+13
-14
No files found.
modules/video_output/xcb/window.c
View file @
2de2fe18
...
@@ -340,11 +340,11 @@ static int Open (vout_window_t *wnd, const vout_window_cfg_t *cfg)
...
@@ -340,11 +340,11 @@ static int Open (vout_window_t *wnd, const vout_window_cfg_t *cfg)
/* Create the event thread. It will dequeue all events, so any checked
/* Create the event thread. It will dequeue all events, so any checked
* request from this thread must be completed at this point. */
* request from this thread must be completed at this point. */
if
((
p_sys
->
keys
!=
NULL
)
if
(
vlc_clone
(
&
p_sys
->
thread
,
Thread
,
wnd
,
VLC_THREAD_PRIORITY_LOW
))
&&
vlc_clone
(
&
p_sys
->
thread
,
Thread
,
wnd
,
VLC_THREAD_PRIORITY_LOW
))
{
{
XCB_keyHandler_Destroy
(
p_sys
->
keys
);
if
(
p_sys
->
keys
!=
NULL
)
p_sys
->
keys
=
NULL
;
XCB_keyHandler_Destroy
(
p_sys
->
keys
);
goto
error
;
}
}
xcb_flush
(
conn
);
/* Make sure map_window is sent (should be useless) */
xcb_flush
(
conn
);
/* Make sure map_window is sent (should be useless) */
...
@@ -366,12 +366,10 @@ static void Close (vout_window_t *wnd)
...
@@ -366,12 +366,10 @@ static void Close (vout_window_t *wnd)
vout_window_sys_t
*
p_sys
=
wnd
->
sys
;
vout_window_sys_t
*
p_sys
=
wnd
->
sys
;
xcb_connection_t
*
conn
=
p_sys
->
conn
;
xcb_connection_t
*
conn
=
p_sys
->
conn
;
if
(
p_sys
->
keys
)
vlc_cancel
(
p_sys
->
thread
);
{
vlc_join
(
p_sys
->
thread
,
NULL
);
vlc_cancel
(
p_sys
->
thread
);
if
(
p_sys
->
keys
!=
NULL
)
vlc_join
(
p_sys
->
thread
,
NULL
);
XCB_keyHandler_Destroy
(
p_sys
->
keys
);
XCB_keyHandler_Destroy
(
p_sys
->
keys
);
}
xcb_disconnect
(
conn
);
xcb_disconnect
(
conn
);
free
(
wnd
->
display
.
x11
);
free
(
wnd
->
display
.
x11
);
free
(
p_sys
);
free
(
p_sys
);
...
@@ -606,7 +604,6 @@ static int EmOpen (vout_window_t *wnd, const vout_window_cfg_t *cfg)
...
@@ -606,7 +604,6 @@ static int EmOpen (vout_window_t *wnd, const vout_window_cfg_t *cfg)
goto
error
;
goto
error
;
p_sys
->
embedded
=
true
;
p_sys
->
embedded
=
true
;
p_sys
->
keys
=
NULL
;
wnd
->
type
=
VOUT_WINDOW_TYPE_XID
;
wnd
->
type
=
VOUT_WINDOW_TYPE_XID
;
wnd
->
display
.
x11
=
NULL
;
wnd
->
display
.
x11
=
NULL
;
wnd
->
handle
.
xid
=
window
;
wnd
->
handle
.
xid
=
window
;
...
@@ -640,16 +637,18 @@ static int EmOpen (vout_window_t *wnd, const vout_window_cfg_t *cfg)
...
@@ -640,16 +637,18 @@ static int EmOpen (vout_window_t *wnd, const vout_window_cfg_t *cfg)
if
(
p_sys
->
keys
!=
NULL
)
if
(
p_sys
->
keys
!=
NULL
)
value
|=
XCB_EVENT_MASK_KEY_PRESS
;
value
|=
XCB_EVENT_MASK_KEY_PRESS
;
}
}
else
p_sys
->
keys
=
NULL
;
if
(
value
&
~
XCB_EVENT_MASK_STRUCTURE_NOTIFY
)
if
(
value
&
~
XCB_EVENT_MASK_STRUCTURE_NOTIFY
)
xcb_change_window_attributes
(
conn
,
window
,
mask
,
&
value
);
xcb_change_window_attributes
(
conn
,
window
,
mask
,
&
value
);
CacheAtoms
(
p_sys
);
CacheAtoms
(
p_sys
);
if
((
p_sys
->
keys
!=
NULL
)
if
(
vlc_clone
(
&
p_sys
->
thread
,
Thread
,
wnd
,
VLC_THREAD_PRIORITY_LOW
))
&&
vlc_clone
(
&
p_sys
->
thread
,
Thread
,
wnd
,
VLC_THREAD_PRIORITY_LOW
))
{
{
XCB_keyHandler_Destroy
(
p_sys
->
keys
);
if
(
p_sys
->
keys
!=
NULL
)
p_sys
->
keys
=
NULL
;
XCB_keyHandler_Destroy
(
p_sys
->
keys
);
goto
error
;
}
}
xcb_flush
(
conn
);
xcb_flush
(
conn
);
...
...
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