summaryrefslogtreecommitdiff
path: root/src/drivers/Wayland/Fl_Wayland_Copy_Surface_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-03-02 11:36:26 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-03-02 11:36:26 +0100
commit86c238c000ccc9200a394e4cef1338fbbfb4c8ea (patch)
treee35f7b922f5d080d5988d16551aa97868b8cfd10 /src/drivers/Wayland/Fl_Wayland_Copy_Surface_Driver.cxx
parent2626962dd3351fb33c7728a462b02d8e39d4502d (diff)
Add Fl_Wayland_Window_Driver::wld_scale() member function
Diffstat (limited to 'src/drivers/Wayland/Fl_Wayland_Copy_Surface_Driver.cxx')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Copy_Surface_Driver.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Copy_Surface_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Copy_Surface_Driver.cxx
index 60a0cad51..f64f095f2 100644
--- a/src/drivers/Wayland/Fl_Wayland_Copy_Surface_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Copy_Surface_Driver.cxx
@@ -1,7 +1,7 @@
//
// Copy-to-clipboard code for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2021 by Bill Spitzak and others.
+// Copyright 1998-2023 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -24,7 +24,9 @@
Fl_Wayland_Copy_Surface_Driver::Fl_Wayland_Copy_Surface_Driver(int w, int h) : Fl_Copy_Surface_Driver(w, h) {
- int os_scale = (Fl_Wayland_Window_Driver::wld_window ? Fl_Wayland_Window_Driver::wld_window->scale : 1);
+ int os_scale =
+ (Fl_Wayland_Window_Driver::wld_window && Fl_Wayland_Window_Driver::wld_window->output ?
+ Fl_Wayland_Window_Driver::wld_window->output->wld_scale : 1);
img_surf = new Fl_Image_Surface(w * os_scale, h * os_scale);
driver(img_surf->driver());
driver()->scale(os_scale);