summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-03-10 13:17:53 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-03-10 13:17:53 +0100
commit73a2ca5261ee7b0d0e33fc1e49611520d7b0e0cb (patch)
tree614b8e7fc1b8ac3b01c632f9a871b0a6399a90a3
parent2ee688dae94ee22e84075886b08134d5e057f2e4 (diff)
Fix c'tor of Fl_Wayland_Image_Surface_Driver for HighDPI displays
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx
index 3fd51d707..68e0c5ae9 100644
--- a/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx
@@ -25,13 +25,13 @@ Fl_Wayland_Image_Surface_Driver::Fl_Wayland_Image_Surface_Driver(int w, int h, i
float d = 1;
if (!off) {
fl_open_display();
- if (Fl_Wayland_Window_Driver::wld_window && Fl_Wayland_Window_Driver::wld_window->output) {
- d = Fl_Wayland_Window_Driver::wld_window->output->wld_scale;
+ if (Fl_Wayland_Window_Driver::wld_window) {
+ d = Fl_Wayland_Window_Driver::driver(Fl_Wayland_Window_Driver::wld_window->fl_win)->wld_scale();
}
d *= fl_graphics_driver->scale();
if (d != 1 && high_res) {
- w = int(w*d);
- h = int(h*d);
+ w = int(w * d);
+ h = int(h * d);
}
struct fl_wld_buffer *off_ = (struct fl_wld_buffer*)calloc(1, sizeof(struct fl_wld_buffer));
off_->stride = cairo_format_stride_for_width(CAIRO_FORMAT_RGB24, w);