diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2025-01-08 14:37:57 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2025-01-08 14:37:57 +0100 |
| commit | c0c2cf7d408fc6bfefd9eecbfe5aabcbc4d55ff3 (patch) | |
| tree | 2d84ced5a6069a7841afebfb277fbcbe0d743561 /src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx | |
| parent | ca786597f773eb6f064fcb98a1e9437d2cfe8ac4 (diff) | |
Make draw to image and draw to clipboard behave equally in X11 and Wayland
Diffstat (limited to 'src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx index de72e175a..a3850f6da 100644 --- a/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx @@ -27,12 +27,10 @@ Fl_Wayland_Image_Surface_Driver::Fl_Wayland_Image_Surface_Driver(int w, int h, int d = 1; if (!off) { fl_open_display(); - if (Fl_Wayland_Window_Driver::wld_window) { - d = Fl_Wayland_Window_Driver::driver( - Fl_Wayland_Window_Driver::wld_window->fl_win - )->wld_scale(); + if (Fl::first_window()) { + d = Fl_Wayland_Window_Driver::driver(Fl::first_window())->wld_scale(); } - s = fl_graphics_driver->scale(); + s = Fl_Graphics_Driver::default_driver().scale(); if (d*s != 1 && high_res) { w = int(w * s) * d; h = int(h * s) * d; |
