mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-26 11:16:30 +00:00
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.
This commit is contained in:
parent
1907ee3879
commit
ffc19434ee
1 changed files with 1 additions and 4 deletions
5
dwl.c
5
dwl.c
|
@ -699,11 +699,8 @@ rendermon(struct wl_listener *listener, void *data)
|
||||||
if (!wlr_output_attach_render(m->wlr_output, NULL)) {
|
if (!wlr_output_attach_render(m->wlr_output, NULL)) {
|
||||||
return;
|
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) */
|
/* 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};
|
float color[4] = {0.3, 0.3, 0.3, 1.0};
|
||||||
wlr_renderer_clear(renderer, color);
|
wlr_renderer_clear(renderer, color);
|
||||||
|
|
Loading…
Reference in a new issue