aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2020-04-21 21:55:36 -0500
committerDevin J. Pohly <djpohly@gmail.com>2020-04-21 21:56:01 -0500
commitffc19434ee2009a0e8bdf7d830b3744cd79e4eb8 (patch)
treeb8556460a8cbfc7b7208ce071c4f5e73313d2fd9
parent1907ee3879d9dbeccad311aa3e2fc36e3a7be1d5 (diff)
fix rendering on scaled monitors
I have no idea why this takes the raw unscaled resolution, and then we have to multiply by the scale *again* in render(), but that's life.
-rw-r--r--dwl.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/dwl.c b/dwl.c
index 5f0ed93..7686323 100644
--- a/dwl.c
+++ b/dwl.c
@@ -699,11 +699,8 @@ rendermon(struct wl_listener *listener, void *data)
if (!wlr_output_attach_render(m->wlr_output, NULL)) {
return;
}
- /* The "effective" resolution can change if you rotate your outputs. */
- int width, height;
- wlr_output_effective_resolution(m->wlr_output, &width, &height);
/* Begin the renderer (calls glViewport and some other GL sanity checks) */
- wlr_renderer_begin(renderer, width, height);
+ wlr_renderer_begin(renderer, m->wlr_output->width, m->wlr_output->height);
float color[4] = {0.3, 0.3, 0.3, 1.0};
wlr_renderer_clear(renderer, color);