summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-02-12 08:52:09 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-02-12 08:52:09 +0100
commitbb74d263e25720dc3f4103df489853739de1bd9f (patch)
tree986686916609f309d07a5b861e3c0192c7d4ed5e
parent5a25641317dd570757f33181e45393a74019dc30 (diff)
Wayland: add necessary check to support OWL
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index 88a199e50..9bdee61b0 100644
--- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
@@ -1412,6 +1412,7 @@ int Fl_Wayland_Screen_Driver::screen_num_unscaled(int x, int y)
float Fl_Wayland_Screen_Driver::scale(int n) {
Fl_Wayland_Screen_Driver::output *output;
+ if (wl_list_length(&outputs) == 0) return 1; // necessary under OWL
int i = 0;
wl_list_for_each(output, &outputs, link) {
if (i++ == n) break;