diff options
author | Devin J. Pohly <djpohly@gmail.com> | 2020-07-30 22:46:45 -0500 |
---|---|---|
committer | Devin J. Pohly <djpohly@gmail.com> | 2020-07-30 22:52:53 -0500 |
commit | 4e57dbd9223c647ece506f5f1fc1465802c13c85 (patch) | |
tree | 84a23281a3d38731015b413c5b7da9edbcefff19 /dwl.c | |
parent | 21437b62afc0bc8c7cca59f350dc3ec6aeeaa96d (diff) |
attach_render and commit are all that's needed
attach_render tells the output that a "new" buffer has been prepared
(even if we haven't changed it). We need to call that and then commit
it to keep the render loop going.
Software cursors will freeze momentarily during layout updates, but I
suspect that this is not as easily fixed as it sounds. You can force
software cursors by running:
WLR_NO_HARDWARE_CURSORS=1 ./dwl
Diffstat (limited to 'dwl.c')
-rw-r--r-- | dwl.c | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -1256,27 +1256,27 @@ rendermon(struct wl_listener *listener, void *data) if (!wlr_output_attach_render(m->wlr_output, NULL)) return; - /* Begin the renderer (calls glViewport and some other GL sanity checks) */ - wlr_renderer_begin(drw, m->wlr_output->width, m->wlr_output->height); - if (render) { + /* Begin the renderer (calls glViewport and some other GL sanity checks) */ + wlr_renderer_begin(drw, m->wlr_output->width, m->wlr_output->height); wlr_renderer_clear(drw, rootcolor); renderclients(m, &now); renderindependents(output, &now); + + /* Hardware cursors are rendered by the GPU on a separate plane, and can be + * moved around without re-rendering what's beneath them - which is more + * efficient. However, not all hardware supports hardware cursors. For this + * reason, wlroots provides a software fallback, which we ask it to render + * here. wlr_cursor handles configuring hardware vs software cursors for you, + * and this function is a no-op when hardware cursors are in use. */ + wlr_output_render_software_cursors(m->wlr_output, NULL); + + /* Conclude rendering and swap the buffers, showing the final frame + * on-screen. */ + wlr_renderer_end(drw); } - /* Hardware cursors are rendered by the GPU on a separate plane, and can be - * moved around without re-rendering what's beneath them - which is more - * efficient. However, not all hardware supports hardware cursors. For this - * reason, wlroots provides a software fallback, which we ask it to render - * here. wlr_cursor handles configuring hardware vs software cursors for you, - * and this function is a no-op when hardware cursors are in use. */ - wlr_output_render_software_cursors(m->wlr_output, NULL); - - /* Conclude rendering and swap the buffers, showing the final frame - * on-screen. */ - wlr_renderer_end(drw); wlr_output_commit(m->wlr_output); } |