mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
output.c: remove unnecessary _remove() and _destroy()
This commit is contained in:
parent
0e69c9ee9f
commit
f3a95d65ad
1 changed files with 4 additions and 22 deletions
26
src/output.c
26
src/output.c
|
|
@ -755,38 +755,20 @@ output_damage_frame_notify(struct wl_listener *listener, void *data)
|
|||
send_frame_done(output, &frame_data);
|
||||
}
|
||||
|
||||
static void
|
||||
output_destroy(struct output *output)
|
||||
{
|
||||
if (!output || output->server->output_layout || !output->wlr_output) {
|
||||
return;
|
||||
}
|
||||
wl_list_remove(&output->link);
|
||||
wl_list_remove(&output->destroy.link);
|
||||
wl_list_remove(&output->damage_frame.link);
|
||||
wl_list_remove(&output->damage_destroy.link);
|
||||
|
||||
struct server *server = output->server;
|
||||
wlr_output_layout_remove(server->output_layout, output->wlr_output);
|
||||
free(output);
|
||||
}
|
||||
|
||||
static void
|
||||
output_damage_destroy_notify(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct output *output = wl_container_of(listener, output, damage_destroy);
|
||||
output_destroy(output);
|
||||
wl_list_remove(&output->damage_frame.link);
|
||||
wl_list_remove(&output->damage_destroy.link);
|
||||
}
|
||||
|
||||
static void
|
||||
output_destroy_notify(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct output *output = wl_container_of(listener, output, destroy);
|
||||
if (!output || !output->wlr_output || !output->damage) {
|
||||
return;
|
||||
}
|
||||
wlr_output_damage_destroy(output->damage);
|
||||
output_destroy(output);
|
||||
wl_list_remove(&output->link);
|
||||
wl_list_remove(&output->destroy.link);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue