aboutsummaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2021-08-23 21:08:27 -0500
committerDevin J. Pohly <djpohly@gmail.com>2021-08-23 21:08:27 -0500
commit55bbbc3dcb3d6b938623776993f7ab8494e90763 (patch)
treedfa8696774b78c666f0754b6f998f13bfca6dce2 /dwl.c
parent772c0fe1bdca4299b4de055a9acf0a92156a85ae (diff)
parentd4e08c07629b4534e45b292614899a6b9bb876bd (diff)
Merge branch 'main' into wlroots-next
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/dwl.c b/dwl.c
index 3b06948..a876e8c 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;
@@ -791,7 +793,7 @@ createkeyboard(struct wlr_input_device *device)
/* Prepare an XKB keymap and assign it to the keyboard. */
context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
- keymap = xkb_map_new_from_names(context, &xkb_rules,
+ keymap = xkb_keymap_new_from_names(context, &xkb_rules,
XKB_KEYMAP_COMPILE_NO_FLAGS);
wlr_keyboard_set_keymap(device->keyboard, keymap);
@@ -1083,7 +1085,6 @@ focusclient(Client *c, int lift)
selmon = c->mon;
c->isurgent = 0;
}
- printstatus();
/* Deactivate old client if focus is changing */
if (old && (!c || client_surface(c) != old)) {
@@ -1106,6 +1107,8 @@ focusclient(Client *c, int lift)
}
}
+ printstatus();
+
if (!c) {
/* With no client, all we have left is to clear focus */
wlr_seat_keyboard_notify_clear_focus(seat);
@@ -1653,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
@@ -2116,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.