summaryrefslogtreecommitdiff
path: root/src/Fl_Screen_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-02-26 11:00:42 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-02-26 11:00:42 +0100
commit41740caa2e8542c155980486638f3fb0b781862a (patch)
tree0c1b1ad03c94da9fffb419595224c506a94f49c0 /src/Fl_Screen_Driver.cxx
parent2ea52918214dd83932d8bf30f2a073e08ca563f0 (diff)
Don't rescale when top window is fullscreen or maximized (#919)
Diffstat (limited to 'src/Fl_Screen_Driver.cxx')
-rw-r--r--src/Fl_Screen_Driver.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Fl_Screen_Driver.cxx b/src/Fl_Screen_Driver.cxx
index 1839c76dd..c13c6c1fd 100644
--- a/src/Fl_Screen_Driver.cxx
+++ b/src/Fl_Screen_Driver.cxx
@@ -497,7 +497,10 @@ int Fl_Screen_Driver::scale_handler(int event)
if (Fl::grab()) return 0; // don't rescale when menu windows are on
Fl_Widget *wid = Fl::focus();
if (!wid) return 0;
- int screen = Fl_Window_Driver::driver(wid->top_window())->screen_num();
+ Fl_Window *top = wid->top_window();
+ // don't rescale when top window is fullscreen or maximized
+ if (top->fullscreen_active() || top->maximize_active()) return 0;
+ int screen = Fl_Window_Driver::driver(top)->screen_num();
Fl_Screen_Driver *screen_dr = Fl::screen_driver();
static float initial_scale = screen_dr->scale(screen);
#if defined(TEST_SCALING)