Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
6ec3a23e
Commit
6ec3a23e
authored
Jun 15, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XCB/XVideo: create window directly with correct position and dimensions
parent
2028d9bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
23 deletions
+10
-23
modules/video_output/xcb/xvideo.c
modules/video_output/xcb/xvideo.c
+10
-23
No files found.
modules/video_output/xcb/xvideo.c
View file @
6ec3a23e
...
...
@@ -420,7 +420,12 @@ static int Open (vlc_object_t *obj)
/* */
video_format_t
fmt
;
vout_display_place_t
place
;
p_sys
->
port
=
0
;
vout_display_PlacePicture
(
&
place
,
&
vd
->
source
,
vd
->
cfg
,
false
);
p_sys
->
width
=
place
.
width
;
p_sys
->
height
=
place
.
height
;
xcb_xv_adaptor_info_iterator_t
it
;
for
(
it
=
xcb_xv_query_adaptors_info_iterator
(
adaptors
);
...
...
@@ -498,13 +503,14 @@ static int Open (vlc_object_t *obj)
/* XCB_CW_COLORMAP */
screen
->
default_colormap
,
};
xcb_void_cookie_t
c
;
xcb_create_pixmap
(
conn
,
f
->
depth
,
pixmap
,
screen
->
root
,
1
,
1
);
c
=
xcb_create_window_checked
(
conn
,
f
->
depth
,
p_sys
->
window
,
p_sys
->
embed
->
handle
.
xid
,
0
,
0
,
1
,
1
,
0
,
XCB_WINDOW_CLASS_INPUT_OUTPUT
,
f
->
visual
,
mask
,
list
);
p_sys
->
embed
->
handle
.
xid
,
place
.
x
,
place
.
y
,
place
.
width
,
place
.
height
,
0
,
XCB_WINDOW_CLASS_INPUT_OUTPUT
,
f
->
visual
,
mask
,
list
);
xcb_map_window
(
conn
,
p_sys
->
window
);
if
(
!
XCB_error_Check
(
vd
,
conn
,
"cannot create X11 window"
,
c
))
{
...
...
@@ -528,26 +534,6 @@ static int Open (vlc_object_t *obj)
msg_Err
(
vd
,
"no available XVideo adaptor"
);
goto
error
;
}
/* Compute video (window) placement within the parent window */
{
xcb_map_window
(
conn
,
p_sys
->
window
);
vout_display_place_t
place
;
vout_display_PlacePicture
(
&
place
,
&
vd
->
source
,
vd
->
cfg
,
false
);
p_sys
->
width
=
place
.
width
;
p_sys
->
height
=
place
.
height
;
/* */
const
uint32_t
values
[]
=
{
place
.
x
,
place
.
y
,
place
.
width
,
place
.
height
};
xcb_configure_window
(
conn
,
p_sys
->
window
,
XCB_CONFIG_WINDOW_X
|
XCB_CONFIG_WINDOW_Y
|
XCB_CONFIG_WINDOW_WIDTH
|
XCB_CONFIG_WINDOW_HEIGHT
,
values
);
}
p_sys
->
visible
=
false
;
/* Create graphic context */
p_sys
->
gc
=
xcb_generate_id
(
conn
);
...
...
@@ -568,6 +554,7 @@ static int Open (vlc_object_t *obj)
p_sys
->
cursor
=
XCB_cursor_Create
(
conn
,
screen
);
p_sys
->
shm
=
XCB_shm_Check
(
obj
,
conn
);
p_sys
->
visible
=
false
;
/* */
vout_display_info_t
info
=
vd
->
info
;
...
...
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