summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-04-01 14:52:47 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-04-01 14:52:47 +0200
commit9aba7c9db05bde2acb67f838c075d75d62fad39c (patch)
tree39075cd2284ad4afc806e3d50480b5df92de1007 /src
parentd992a1240394acbf410a875c0196b750f449e3f0 (diff)
Fl_Wayland_Window_Driver::scroll() when GUI scaling >= 2.
Diffstat (limited to 'src')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index 93e3dd991..712c3f015 100644
--- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -658,9 +658,14 @@ int Fl_Wayland_Window_Driver::scroll(int src_x, int src_y, int src_w, int src_h,
{
Window xid = fl_xid(pWindow);
struct fl_wld_buffer *buffer = xid->buffer;
- int s = xid->scale;
+ float s = xid->scale * fl_graphics_driver->scale();
if (s != 1) {
- src_x *= s; src_y *= s; src_w *= s; src_h *= s; dest_x *= s; dest_y *= s;
+ src_x = src_x * s;
+ src_y = src_y * s;
+ src_w = src_w * s;
+ src_h = src_h * s;
+ dest_x = dest_x * s;
+ dest_y = dest_y * s;
}
if (src_x == dest_x) { // vertical scroll
int i, to, step;