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
18c5c647
Commit
18c5c647
authored
Aug 15, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factor some code
parent
de6c97fb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
12 deletions
+19
-12
modules/video_output/xcb/window.c
modules/video_output/xcb/window.c
+19
-12
No files found.
modules/video_output/xcb/window.c
View file @
18c5c647
...
...
@@ -140,6 +140,20 @@ xcb_atom_t get_atom (xcb_connection_t *conn, xcb_intern_atom_cookie_t ck)
#define NET_WM_STATE_ADD 1
#define NET_WM_STATE_TOGGLE 2
static
void
CacheAtoms
(
vout_window_sys_t
*
p_sys
)
{
xcb_connection_t
*
conn
=
p_sys
->
conn
;
xcb_intern_atom_cookie_t
wm_state_ck
,
wm_state_above_ck
,
wm_state_fs_ck
;
wm_state_ck
=
intern_string
(
conn
,
"_NET_WM_STATE"
);
wm_state_above_ck
=
intern_string
(
conn
,
"_NET_WM_STATE_ABOVE"
);
wm_state_fs_ck
=
intern_string
(
conn
,
"_NET_WM_STATE_FULLSCREEN"
);
p_sys
->
wm_state
=
get_atom
(
conn
,
wm_state_ck
);
p_sys
->
wm_state_above
=
get_atom
(
conn
,
wm_state_above_ck
);
p_sys
->
wm_state_fullscreen
=
get_atom
(
conn
,
wm_state_fs_ck
);
}
/**
* Create an X11 window.
*/
...
...
@@ -244,16 +258,11 @@ static int Open (vlc_object_t *obj)
xcb_atom_t
net_wm_icon_name
=
get_atom
(
conn
,
net_wm_icon_name_ck
);
set_string
(
conn
,
window
,
utf8
,
net_wm_icon_name
,
_
(
"VLC"
));
/* Cache any EWMH atom we may need later */
xcb_intern_atom_cookie_t
wm_state_ck
,
wm_state_above_ck
,
wm_state_fs_ck
;
wm_state_ck
=
intern_string
(
conn
,
"_NET_WM_STATE"
);
wm_state_above_ck
=
intern_string
(
conn
,
"_NET_WM_STATE_ABOVE"
);
wm_state_fs_ck
=
intern_string
(
conn
,
"_NET_WM_STATE_FULLSCREEN"
);
/* Make the window visible */
xcb_map_window
(
conn
,
window
);
p_sys
->
wm_state
=
get_atom
(
conn
,
wm_state_ck
);
p_sys
->
wm_state_above
=
get_atom
(
conn
,
wm_state_above_ck
);
p_sys
->
wm_state_fullscreen
=
get_atom
(
conn
,
wm_state_fs_ck
);
/* Cache any EWMH atom we may need later */
CacheAtoms
(
p_sys
);
/* Create the event thread. It will dequeue all events, so any checked
* request from this thread must be completed at this point. */
...
...
@@ -261,9 +270,7 @@ static int Open (vlc_object_t *obj)
&&
vlc_clone
(
&
p_sys
->
thread
,
Thread
,
wnd
,
VLC_THREAD_PRIORITY_LOW
))
DestroyKeyHandler
(
p_sys
->
keys
);
/* Make sure the window is ready */
xcb_map_window
(
conn
,
window
);
xcb_flush
(
conn
);
xcb_flush
(
conn
);
/* Make sure map_window is sent (should be useless) */
return
VLC_SUCCESS
;
...
...
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