summaryrefslogtreecommitdiff
path: root/src/Fl_Screen_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-03-01 14:00:43 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-03-01 14:00:43 +0100
commitcc15700bdb918699b6977140f27f6183efc3ac76 (patch)
treeaea308f5ef184095c98a35cc719ed238226a7235 /src/Fl_Screen_Driver.cxx
parent266647d2a7cb0a9f28be5a035996ec43b6419b04 (diff)
Windows: improve changing scale values of display while app runs.
Diffstat (limited to 'src/Fl_Screen_Driver.cxx')
-rw-r--r--src/Fl_Screen_Driver.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Fl_Screen_Driver.cxx b/src/Fl_Screen_Driver.cxx
index fbb4aa4c2..e0a9f0f71 100644
--- a/src/Fl_Screen_Driver.cxx
+++ b/src/Fl_Screen_Driver.cxx
@@ -505,7 +505,7 @@ int Fl_Screen_Driver::scale_handler(int event)
}
top = Fl::next_window(top);
}
- static float initial_scale = screen_dr->scale(screen);
+ float initial_scale = screen_dr->base_scale(screen);
#if defined(TEST_SCALING)
// test scaling factors: lots of values from 0.3 to 8.0
static float scaling_values[] = {
@@ -791,6 +791,13 @@ size_t Fl_Screen_Driver::convert_crlf(char *s, size_t len) {
return len;
}
+
+float Fl_Screen_Driver::base_scale(int numscreen) {
+ static float base = scale(numscreen);
+ return base;
+}
+
+
/**
\}
\endcond