]> git.mdlowis.com Git - proto/labwc.git/commitdiff
Enable presentation time
authorJohan Malm <jgm323@gmail.com>
Mon, 28 Feb 2022 22:30:36 +0000 (22:30 +0000)
committerJohan Malm <jgm323@gmail.com>
Mon, 28 Feb 2022 22:30:36 +0000 (22:30 +0000)
src/server.c

index f29971d48b406377716228d5b7b565f39fa0f943..808e3b35dc54de637320702a506af2df0cd51f79 100644 (file)
@@ -7,6 +7,7 @@
 #include <wlr/types/wlr_export_dmabuf_v1.h>
 #include <wlr/types/wlr_gamma_control_v1.h>
 #include <wlr/types/wlr_input_inhibitor.h>
+#include <wlr/types/wlr_presentation_time.h>
 #include <wlr/types/wlr_primary_selection_v1.h>
 #include <wlr/types/wlr_screencopy_v1.h>
 #include <wlr/types/wlr_viewporter.h>
@@ -299,6 +300,14 @@ server_init(struct server *server)
                                  WLR_SERVER_DECORATION_MANAGER_MODE_SERVER :
                                  WLR_SERVER_DECORATION_MANAGER_MODE_CLIENT);
 
+       struct wlr_presentation *presentation =
+               wlr_presentation_create(server->wl_display, server->backend);
+       if (!presentation) {
+               wlr_log(WLR_ERROR, "unable to create presentation interface");
+               exit(EXIT_FAILURE);
+       }
+       wlr_scene_set_presentation(server->scene, presentation);
+
        wlr_export_dmabuf_manager_v1_create(server->wl_display);
        wlr_screencopy_manager_v1_create(server->wl_display);
        wlr_data_control_manager_v1_create(server->wl_display);