From 52e6bf47354b624e220cbff6df33d06ba1c3581e Mon Sep 17 00:00:00 2001 From: David Donahue Date: Thu, 1 Jul 2021 15:20:30 -0500 Subject: Moved printstatus() call in focusclient() to prevent printstatus being called on every frame when things like dmenu are up --- dwl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dwl.c') diff --git a/dwl.c b/dwl.c index a2a0b69..9c31de2 100644 --- a/dwl.c +++ b/dwl.c @@ -1083,7 +1083,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 +1105,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); -- cgit v1.2.3 From d175a58d733723fdeb307943b034fe7fda6086ed Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Mon, 2 Aug 2021 16:33:38 +0200 Subject: implement the presentation time protocol This lets applications, such as mpv with --video-sync=display-resample, know accurately when frames are displayed and ensure smooth video playback. --- dwl.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dwl.c') diff --git a/dwl.c b/dwl.c index a2a0b69..20b01b0 100644 --- a/dwl.c +++ b/dwl.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -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; @@ -1653,6 +1655,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 +2120,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. -- cgit v1.2.3 From d4e08c07629b4534e45b292614899a6b9bb876bd Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Mon, 23 Aug 2021 18:59:31 -0500 Subject: update deprecated xkb function name --- dwl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dwl.c') diff --git a/dwl.c b/dwl.c index b898537..2c1634b 100644 --- a/dwl.c +++ b/dwl.c @@ -793,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); -- cgit v1.2.3