Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
GSoC
GSoC2018
macOS
vlc
Commits
330fc86d
Commit
330fc86d
authored
May 24, 2018
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xdg-shell: bind wl_shm
This will be needed to allocate a cursor.
parent
0f1aabbb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
modules/video_output/wayland/xdg-shell.c
modules/video_output/wayland/xdg-shell.c
+9
-0
No files found.
modules/video_output/wayland/xdg-shell.c
View file @
330fc86d
...
...
@@ -71,6 +71,7 @@ struct vout_window_sys_t
{
struct
wl_registry
*
registry
;
struct
wl_compositor
*
compositor
;
struct
wl_shm
*
shm
;
struct
xdg_wm_base
*
wm_base
;
struct
xdg_surface
*
surface
;
struct
xdg_toplevel
*
toplevel
;
...
...
@@ -355,6 +356,9 @@ static void registry_global_cb(void *data, struct wl_registry *registry,
1
);
#endif
else
if
(
!
strcmp
(
iface
,
"wl_shm"
))
sys
->
shm
=
wl_registry_bind
(
registry
,
name
,
&
wl_shm_interface
,
1
);
else
if
(
!
strcmp
(
iface
,
"wl_seat"
))
seat_create
(
wnd
,
registry
,
name
,
vers
,
&
sys
->
seats
);
else
...
...
@@ -398,6 +402,7 @@ static int Open(vout_window_t *wnd, const vout_window_cfg_t *cfg)
return
VLC_ENOMEM
;
sys
->
compositor
=
NULL
;
sys
->
shm
=
NULL
;
sys
->
wm_base
=
NULL
;
sys
->
surface
=
NULL
;
sys
->
toplevel
=
NULL
;
...
...
@@ -536,6 +541,8 @@ error:
xdg_wm_base_destroy
(
sys
->
wm_base
);
if
(
wnd
->
handle
.
wl
!=
NULL
)
wl_surface_destroy
(
wnd
->
handle
.
wl
);
if
(
sys
->
shm
!=
NULL
)
wl_shm_destroy
(
sys
->
shm
);
if
(
sys
->
compositor
!=
NULL
)
wl_compositor_destroy
(
sys
->
compositor
);
if
(
sys
->
registry
!=
NULL
)
...
...
@@ -565,6 +572,8 @@ static void Close(vout_window_t *wnd)
xdg_surface_destroy
(
sys
->
surface
);
xdg_wm_base_destroy
(
sys
->
wm_base
);
wl_surface_destroy
(
wnd
->
handle
.
wl
);
if
(
sys
->
shm
!=
NULL
)
wl_shm_destroy
(
sys
->
shm
);
wl_compositor_destroy
(
sys
->
compositor
);
wl_registry_destroy
(
sys
->
registry
);
wl_display_disconnect
(
wnd
->
display
.
wl
);
...
...
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