summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Screen_Driver.cxx10
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H7
2 files changed, 6 insertions, 11 deletions
diff --git a/src/Fl_Screen_Driver.cxx b/src/Fl_Screen_Driver.cxx
index 1ccc7ff5f..8de5f606c 100644
--- a/src/Fl_Screen_Driver.cxx
+++ b/src/Fl_Screen_Driver.cxx
@@ -355,8 +355,6 @@ int Fl_Screen_Driver::input_widget_handle_key(int key, unsigned mods, unsigned s
}
-#if defined(FLTK_HIDPI_SUPPORT) || !(defined(WIN32) || defined(__APPLE__))
-
void Fl_Screen_Driver::rescale_all_windows_from_screen(int screen, float f)
{
float old_f = this->scale(screen);
@@ -482,22 +480,18 @@ int Fl_Screen_Driver::scale_handler(int event)
return 0;
}
-#endif // FLTK_HIDPI_SUPPORT
-
// determine the scaling value used at startup time (helps supporting HiDPI displays)
float Fl_Screen_Driver::default_scale_factor()
{
float factor = 1;
-#if defined(FLTK_HIDPI_SUPPORT) || !(defined(WIN32) || defined(__APPLE__))
char *p = 0;
- if ((p = getenv("FLTK_SCALING_FACTOR"))) {
+ if ((p = fl_getenv("FLTK_SCALING_FACTOR"))) {
sscanf(p, "%f", &factor);
}
else {
factor = desktop_scale_factor();
}
-#endif // FLTK_HIDPI_SUPPORT
return factor;
}
@@ -511,9 +505,7 @@ void Fl_Screen_Driver::open_display()
if (rescalable()) {
float factor = default_scale_factor();
for (int i = 0; i < screen_count(); i++) scale(i, factor);
-#if defined(FLTK_HIDPI_SUPPORT) || !(defined(WIN32) || defined(__APPLE__))
Fl::add_handler(Fl_Screen_Driver::scale_handler);
-#endif
Fl_Graphics_Driver::default_driver().scale(factor);
}
}
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
index 9cb234a37..361a12d96 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
+++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
@@ -78,8 +78,11 @@ public:
virtual void disable_im();
virtual void open_display_platform();
virtual void offscreen_size(Fl_Offscreen off, int &width, int &height);
-
- virtual APP_SCALING_CAPABILITY rescalable() { return SYSTEMWIDE_APP_SCALING; }
+#if defined(FLTK_HIDPI_SUPPORT)
+ virtual APP_SCALING_CAPABILITY rescalable() {
+ return SYSTEMWIDE_APP_SCALING;
+ }
+#endif
virtual float scale(int n) {return scale_;}
virtual void scale(int n, float f) { scale_ = f;}
virtual float desktop_scale_factor();