diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-02-26 11:00:42 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-02-26 11:00:42 +0100 |
| commit | 41740caa2e8542c155980486638f3fb0b781862a (patch) | |
| tree | 0c1b1ad03c94da9fffb419595224c506a94f49c0 /src/Fl_Screen_Driver.cxx | |
| parent | 2ea52918214dd83932d8bf30f2a073e08ca563f0 (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.cxx | 5 |
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) |
