diff options
| author | Manolo Gouy <Manolo> | 2017-12-18 08:52:55 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2017-12-18 08:52:55 +0000 |
| commit | 3f9f4debbba0527658ce09044fbff90e332235cc (patch) | |
| tree | a3a4852ab786012432666a1fe07fdca9f05387dc /src/glut_compatibility.cxx | |
| parent | 31f16205cb31d724ee93444f5b9b17e7fa3ae3b1 (diff) | |
STR#3444: Add MacOS support for application rescaling (not quite complete)
With this, most MacOS FLTK app can be scaled with command/+/-/0/ keystrokes.
A scaling problem remains, visible in test/cube, where the "Test" string is not positioned correctly.
GLUT apps can also be scaled (across platforms).
SVG images are re-rasterized after app scaling for optimal drawing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12594 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/glut_compatibility.cxx')
| -rw-r--r-- | src/glut_compatibility.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glut_compatibility.cxx b/src/glut_compatibility.cxx index 13e06242a..8cb268a7d 100644 --- a/src/glut_compatibility.cxx +++ b/src/glut_compatibility.cxx @@ -29,6 +29,7 @@ #include "flstring.h" #if HAVE_GL # include <FL/Fl_Gl_Window_Driver.H> +# include <FL/Fl_Screen_Driver.H> # include <FL/glut.H> # define MAXWINDOWS 32 @@ -130,6 +131,9 @@ int Fl_Glut_Window::handle(int event) { if (!keyboard && !special) break; case FL_KEYBOARD: + // keyboard() does not distinguish between recognized and unrecognized keystrokes + // so check for window scaling keystroke before normal keystroke processing + if ( Fl::event_command() && Fl_Screen_Driver::scale_handler(FL_SHORTCUT) ) return 1; if (Fl::event_text()[0]) { if (keyboard) {keyboard(Fl::event_text()[0],ex,ey); return 1;} break; |
