summaryrefslogtreecommitdiffstats
path: root/dwl.c
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2021-08-14 07:53:26 -0400
committerGitHub <noreply@github.com>2021-08-14 07:53:26 -0400
commit1183a319a02cf89aa7311124fca7f15332c80547 (patch)
tree24a43dd84d3ca39804bb798f6328e531c5bd075f /dwl.c
parentMerge pull request #130 from drdonahue/printstatus-fix (diff)
parentimplement the presentation time protocol (diff)
downloaddwl-1183a319a02cf89aa7311124fca7f15332c80547.tar.gz
dwl-1183a319a02cf89aa7311124fca7f15332c80547.tar.bz2
dwl-1183a319a02cf89aa7311124fca7f15332c80547.tar.xz
dwl-1183a319a02cf89aa7311124fca7f15332c80547.tar.zst
dwl-1183a319a02cf89aa7311124fca7f15332c80547.zip
Merge pull request #136 from guidocella/presentation-time
implement the presentation time protocol
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/dwl.c b/dwl.c
index 9c31de2..b898537 100644
--- a/dwl.c
+++ b/dwl.c
@@ -29,6 +29,7 @@
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_output_management_v1.h>
#include <wlr/types/wlr_pointer.h>
+#include <wlr/types/wlr_presentation_time.h>
#include <wlr/types/wlr_primary_selection.h>
#include <wlr/types/wlr_primary_selection_v1.h>
#include <wlr/types/wlr_screencopy_v1.h>
@@ -317,6 +318,7 @@ static struct wl_list independents;
static struct wlr_idle *idle;
static struct wlr_layer_shell_v1 *layer_shell;
static struct wlr_output_manager_v1 *output_mgr;
+static struct wlr_presentation *presentation;
static struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard_mgr;
static struct wlr_cursor *cursor;
@@ -1654,6 +1656,8 @@ render(struct wlr_surface *surface, int sx, int sy, void *data)
/* This lets the client know that we've displayed that frame and it can
* prepare another one now if it likes. */
wlr_surface_send_frame_done(surface, rdata->when);
+
+ wlr_presentation_surface_sampled_on_output(presentation, surface, output);
}
void
@@ -2117,6 +2121,8 @@ setup(void)
wl_signal_add(&output_mgr->events.apply, &output_mgr_apply);
wl_signal_add(&output_mgr->events.test, &output_mgr_test);
+ presentation = wlr_presentation_create(dpy, backend);
+
#ifdef XWAYLAND
/*
* Initialise the XWayland X server.