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
ac07b760
Commit
ac07b760
authored
May 24, 2018
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xdg-shell: handle seat hot-unplug
parent
b9341db7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
modules/video_output/wayland/input.c
modules/video_output/wayland/input.c
+18
-0
modules/video_output/wayland/input.h
modules/video_output/wayland/input.h
+1
-0
modules/video_output/wayland/xdg-shell.c
modules/video_output/wayland/xdg-shell.c
+4
-0
No files found.
modules/video_output/wayland/input.c
View file @
ac07b760
...
@@ -53,6 +53,7 @@ struct seat_data
...
@@ -53,6 +53,7 @@ struct seat_data
struct
xkb_state
*
keystate
;
struct
xkb_state
*
keystate
;
#endif
#endif
uint32_t
name
;
uint32_t
version
;
uint32_t
version
;
struct
wl_list
node
;
struct
wl_list
node
;
};
};
...
@@ -443,6 +444,23 @@ static void seat_destroy(struct seat_data *sd)
...
@@ -443,6 +444,23 @@ static void seat_destroy(struct seat_data *sd)
free
(
sd
);
free
(
sd
);
}
}
int
seat_destroy_one
(
struct
wl_list
*
list
,
uint32_t
name
)
{
struct
seat_data
*
sd
;
wl_list_for_each
(
sd
,
list
,
node
)
{
if
(
sd
->
name
==
name
)
{
seat_destroy
(
sd
);
/* Note: return here so no needs for safe walk variant */
return
0
;
}
}
return
-
1
;
}
void
seat_destroy_all
(
struct
wl_list
*
list
)
void
seat_destroy_all
(
struct
wl_list
*
list
)
{
{
while
(
!
wl_list_empty
(
list
))
while
(
!
wl_list_empty
(
list
))
...
...
modules/video_output/wayland/input.h
View file @
ac07b760
...
@@ -24,4 +24,5 @@ struct wl_list;
...
@@ -24,4 +24,5 @@ struct wl_list;
int
seat_create
(
struct
vout_window_t
*
wnd
,
struct
wl_registry
*
,
int
seat_create
(
struct
vout_window_t
*
wnd
,
struct
wl_registry
*
,
uint32_t
name
,
uint32_t
version
,
struct
wl_list
*
list
);
uint32_t
name
,
uint32_t
version
,
struct
wl_list
*
list
);
int
seat_destroy_one
(
struct
wl_list
*
list
,
uint32_t
name
);
void
seat_destroy_all
(
struct
wl_list
*
list
);
void
seat_destroy_all
(
struct
wl_list
*
list
);
modules/video_output/wayland/xdg-shell.c
View file @
ac07b760
...
@@ -445,10 +445,14 @@ static void registry_global_remove_cb(void *data, struct wl_registry *registry,
...
@@ -445,10 +445,14 @@ static void registry_global_remove_cb(void *data, struct wl_registry *registry,
uint32_t
name
)
uint32_t
name
)
{
{
vout_window_t
*
wnd
=
data
;
vout_window_t
*
wnd
=
data
;
vout_window_sys_t
*
sys
=
wnd
->
sys
;
char
idstr
[
11
];
char
idstr
[
11
];
msg_Dbg
(
wnd
,
"global remove %3"
PRIu32
,
name
);
msg_Dbg
(
wnd
,
"global remove %3"
PRIu32
,
name
);
if
(
seat_destroy_one
(
&
sys
->
seats
,
name
)
==
0
)
return
;
/* If the global was an output, this will remove it. Otherwise, no-op. */
/* If the global was an output, this will remove it. Otherwise, no-op. */
sprintf
(
idstr
,
"%"
PRIu32
,
name
);
sprintf
(
idstr
,
"%"
PRIu32
,
name
);
vout_window_ReportOutputDevice
(
wnd
,
idstr
,
NULL
);
vout_window_ReportOutputDevice
(
wnd
,
idstr
,
NULL
);
...
...
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