]> git.mdlowis.com Git - proto/labwc.git/commitdiff
output.c: remove unnecessary _remove() and _destroy()
authorJohan Malm <jgm323@gmail.com>
Mon, 15 Feb 2021 18:36:30 +0000 (18:36 +0000)
committerJohan Malm <jgm323@gmail.com>
Mon, 15 Feb 2021 18:36:30 +0000 (18:36 +0000)
src/output.c

index a499927eba5e10a04ae462ac532d5271554685bd..d1f8e36ca751c60fcd9e16ed50f4c5f905c32d06 100644 (file)
@@ -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