only resize output when using wayland backend

surprisingly enough, real hardware complains
phoen
Daniel Barlow 2022-07-01 22:09:00 +00:00
parent 7db61a7af0
commit 0e20e4d261
1 changed files with 6 additions and 1 deletions

7
rc.fnl
View File

@ -24,10 +24,15 @@
pixels.height
(pixels:get_pixels))))
(fn resize-wayland-backend [output]
(when (string.find (output:name) "^WL-")
(output:set_mode 360 720 0)))
(kiwmi:on
"output"
(fn [output]
(output:set_mode 360 720 0)
(resize-wayland-backend output)
(let [[width height] (output:size)
r (output:renderer)
kill (texture-from-file r "close-window.png")