Index: FL/Fl_Graphics_Driver.H
===================================================================
--- FL/Fl_Graphics_Driver.H	(revision 12593)
+++ FL/Fl_Graphics_Driver.H	(working copy)
@@ -77,6 +77,8 @@
 class FL_EXPORT Fl_Graphics_Driver {
   friend class Fl_Surface_Device;
   friend class Fl_Display_Device;
+  friend class Fl_Screen_Driver;
+  friend class Fl_Window_Driver;
   friend class Fl_Pixmap;
   friend class Fl_Bitmap;
   friend class Fl_RGB_Image;
@@ -93,6 +95,10 @@
 private:
   // some platforms may need to reimplement this
   virtual void set_current_();
+protected:
+  float scale_; // scale between user and graphical coordinates: graphical = user * scale_
+  /** Sets the current value of the scaling factor */
+  virtual void scale(float f) { scale_ = f; }
 public:
   // The following functions create the various graphics drivers that are required
   // for core operations. They must be implemented as members of Fl_Graphics_Driver,
@@ -218,6 +224,8 @@
   Fl_Graphics_Driver();
   virtual ~Fl_Graphics_Driver() {} ///< Destructor
   static Fl_Graphics_Driver &default_driver();
+  /** Current scale factor between FLTK and graphical coordinates: graphical = FLTK * scale() */
+  float scale() { return scale_; }
   /** Return whether the graphics driver can do alpha blending */
   virtual char can_do_alpha_blending() { return 0; }
   // --- implementation is in src/fl_rect.cxx which includes src/drivers/xxx/Fl_xxx_Graphics_Driver_rect.cxx
@@ -370,10 +378,6 @@
   virtual void add_rectangle_to_region(Fl_Region r, int x, int y, int w, int h);
   virtual Fl_Region XRectangleRegion(int x, int y, int w, int h);
   virtual void XDestroyRegion(Fl_Region r);
-  /** Returns the current value of the scaling factor (usually > 1 on HiDPI displays) */
-  virtual float scale() {return 1;}
-  /** Sets the current value of the scaling factor */
-  virtual void scale(float f) {}
   /** Support for Fl::get_font_name() */
   virtual const char* get_font_name(Fl_Font fnum, int* ap) {return NULL;}
   /** Support for Fl::get_font_sizes() */
@@ -411,9 +415,7 @@
 class FL_EXPORT Fl_Scalable_Graphics_Driver : public Fl_Graphics_Driver {
 public:
   Fl_Scalable_Graphics_Driver();
-  float scale() { return scale_; }
 protected:
-  float scale_; // scale between user and graphical coordinates: graphical = user * scale_
   int line_width_;
   void cache_size(Fl_Image *img, int &width, int &height);
   virtual Fl_Region scale_clip(float f)=0;
Index: src/Fl_Gl_Window.cxx
===================================================================
--- src/Fl_Gl_Window.cxx	(revision 12593)
+++ src/Fl_Gl_Window.cxx	(working copy)
@@ -25,6 +25,7 @@
 #include <FL/Fl_Gl_Window.H>
 #include <FL/Fl_Gl_Window_Driver.H>
 #include <FL/Fl_Window_Driver.H>
+#include <FL/Fl_Graphics_Driver.H>
 #include <stdlib.h>
 #include <FL/fl_utf8.h>
 #  if (HAVE_DLSYM && HAVE_DLFCN_H)
@@ -516,8 +517,9 @@
 
 float Fl_Cocoa_Gl_Window_Driver::pixels_per_unit()
 {
-  return (fl_mac_os_version >= 100700 && Fl::use_high_res_GL() && Fl_X::i(pWindow) &&
+  int retina = (fl_mac_os_version >= 100700 && Fl::use_high_res_GL() && Fl_X::i(pWindow) &&
           Fl_Cocoa_Window_Driver::driver(pWindow)->mapped_to_retina()) ? 2 : 1;
+  return retina * Fl_Graphics_Driver::default_driver().scale();
 }
 
 int Fl_Cocoa_Gl_Window_Driver::mode_(int m, const int *a) {
Index: src/Fl_Graphics_Driver.cxx
===================================================================
--- src/Fl_Graphics_Driver.cxx	(revision 12593)
+++ src/Fl_Graphics_Driver.cxx	(working copy)
@@ -41,6 +41,7 @@
   m = m0; 
   fl_matrix = &m; 
   font_descriptor_ = NULL;
+  scale_ = 1;
 };
 
 /** Return the graphics driver used when drawing to the platform's display */
Index: src/Fl_SVG_Image.cxx
===================================================================
--- src/Fl_SVG_Image.cxx	(revision 12593)
+++ src/Fl_SVG_Image.cxx	(working copy)
@@ -193,6 +193,7 @@
   rasterized_ = true;
   raster_w_ = W;
   raster_h_ = H;
+//printf("rasterize to %dx%d\n",W, H);
 }
 
 
@@ -234,10 +235,14 @@
 
 
 void Fl_SVG_Image::draw(int X, int Y, int W, int H, int cx, int cy) {
-  static float f = Fl::screen_driver()->retina_factor();
+  float f = 1;
+  if (Fl_Surface_Device::surface() == Fl_Display_Device::display_device()) {
+    f = Fl::screen_driver()->retina_factor() * fl_graphics_driver->scale();
+  }
   int w1 = w(), h1 = h();
   /* When f > 1, there may be several pixels per drawing unit in an area
-   of size w() x h() of the display. This occurs, e.g., with Apple retina displays.
+   of size w() x h() of the display. This occurs, e.g., with Apple retina displays
+   and when the display is rescaled.
    The SVG is rasterized to the area dimension in pixels. The image is then drawn
    scaled to its size expressed in drawing units. With this procedure,
    the SVG image is drawn using the full resolution of the display.
@@ -269,9 +274,6 @@
 
 
 int Fl_SVG_Image::draw_scaled(int X, int Y, int W, int H) {
-  if (rasterized_ && raster_w_ >= W && raster_h_ >= H) {
-    return fl_graphics_driver->draw_scaled(this, X, Y, W, H);
-  }
   w(W);
   h(H);
   draw(X, Y, W, H, 0, 0);
Index: src/Fl_cocoa.mm
===================================================================
--- src/Fl_cocoa.mm	(revision 12593)
+++ src/Fl_cocoa.mm	(working copy)
@@ -3,7 +3,7 @@
 //
 // MacOS-Cocoa specific code for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 1998-2016 by Bill Spitzak and others.
+// Copyright 1998-2017 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -742,7 +742,10 @@
     by += parent->y();
     parent = parent->window();
   }
-  NSRect rp = NSMakeRect(bx, main_screen_height - (by + w->h()), w->w(), w->h());
+  float s = Fl::screen_driver()->scale(0);
+  NSRect rp = NSMakeRect(int(s * bx + 0.5), main_screen_height - int(s * (by + w->h()) + 0.5),
+                         int(s * w->w() + 0.5), int(s * w->h() + 0.5));
+
   if (!NSEqualRects(rp, [self frame])) {
     [self setFrame:rp display:YES];
   }
@@ -982,11 +985,12 @@
 {
   NSPoint pt;
   pt = [nsw mouseLocationOutsideOfEventStream];
-  Fl::e_x = int(pt.x);
-  Fl::e_y = int([[nsw contentView] frame].size.height - pt.y);
+  float s = Fl::screen_driver()->scale(0);
+  Fl::e_x = int(pt.x / s);
+  Fl::e_y = int(([[nsw contentView] frame].size.height - pt.y)/s);
   pt = [NSEvent mouseLocation];
-  Fl::e_x_root = int(pt.x);
-  Fl::e_y_root = int(main_screen_height - pt.y);
+  Fl::e_x_root = int(pt.x/s);
+  Fl::e_y_root = int((main_screen_height - pt.y)/s);
 }
 
 
@@ -1074,6 +1078,8 @@
   Fl_Window *first = Fl::first_window();
   if (first != window && !(first->modal() || first->non_modal())) Fl::first_window(window);
   NSPoint pos = [theEvent locationInWindow];
+  float s = Fl::screen_driver()->scale(0);
+  pos.x /= s; pos.y /= s;
   pos.y = window->h() - pos.y;
   NSInteger btn = [theEvent buttonNumber]  + 1;
   NSUInteger mods = [theEvent modifierFlags];  
@@ -1311,6 +1317,9 @@
   pt2 = [nsw convertBaseToScreen:NSMakePoint(0, [[nsw contentView] frame].size.height)];
   update_e_xy_and_e_xy_root(nsw);
   pt2.y = main_screen_height - pt2.y;
+  float s = Fl::screen_driver()->scale(0);
+  pt2.x = int(pt2.x / s + 0.5);
+  pt2.y = int(pt2.y / s + 0.5);
   Fl_Window *parent = window->window();
   while (parent) {
     pt2.x -= parent->x();
@@ -1340,6 +1349,8 @@
   r = [[nsw contentView] frame];
   pt2 = [nsw convertBaseToScreen:NSMakePoint(0, r.size.height)];
   pt2.y = main_screen_height - pt2.y;
+  float s = Fl::screen_driver()->scale(window->driver()->screen_num());
+  pt2.x = int(pt2.x/s + 0.5); pt2.y = int(pt2.y/s + 0.5);
   Fl_Window *parent = window->window();
   while (parent) {
     pt2.x -= parent->x();
@@ -1350,7 +1361,7 @@
   Fl_Cocoa_Window_Driver *d = Fl_Cocoa_Window_Driver::driver(window);
   if (window->as_gl_window() && Fl_X::i(window)) d->in_windowDidResize(true);
   update_e_xy_and_e_xy_root(nsw);
-  window->resize((int)pt2.x, (int)pt2.y, (int)r.size.width, (int)r.size.height);
+  window->resize((int)(pt2.x), (int)(pt2.y), (int)(r.size.width/s +0.5), (int)(r.size.height/s +0.5));
   [nsw recursivelySendToSubwindows:@selector(setSubwindowFrame)];
   [nsw recursivelySendToSubwindows:@selector(checkSubwindowFrame)];
   if (window->as_gl_window() && Fl_X::i(window)) d->in_windowDidResize(false);
@@ -3009,10 +3020,11 @@
     winstyle = NSBorderlessWindowMask;
     winlevel = NSStatusWindowLevel;
   }
-  crect.origin.x = w->x(); // correct origin set later for subwindows
-  crect.origin.y = main_screen_height - (w->y() + w->h());
-  crect.size.width=w->w();
-  crect.size.height=w->h();
+  float s = Fl::screen_driver()->scale(0);
+  crect.origin.x = int(s * w->x()); // correct origin set later for subwindows
+  crect.origin.y = main_screen_height - int(s * (w->y() + w->h()));
+  crect.size.width = int(s * w->w());
+  crect.size.height = int(s * w->h());
   FLWindow *cw = [[FLWindow alloc] initWithFl_W:w
                                     contentRect:crect
                                       styleMask:winstyle];
@@ -3056,8 +3068,8 @@
       delta = [cw cascadeTopLeftFromPoint:delta];
     }
     crect = [cw frame]; // synchronize FLTK's and the system's window coordinates
-    this->x(int(crect.origin.x));
-    this->y(int(main_screen_height - (crect.origin.y + w->h())));
+    this->x(int(crect.origin.x/s));
+    this->y( main_screen_height/s - (crect.origin.y/s + w->h()) );
   }
   if(w->menu_window()) { // make menu windows slightly transparent
     [cw setAlphaValue:0.97];
@@ -3196,7 +3208,7 @@
   Fl_Window *parent;
   if (W<=0) W = 1; // OS X does not like zero width windows
   if (H<=0) H = 1;
-  int is_a_resize = (W != w() || H != h());
+  int is_a_resize = (W != w() || H != h() || is_a_rescale());
   //  printf("Fl_Window::resize(X=%d, Y=%d, W=%d, H=%d), is_a_resize=%d, resize_from_system=%p, this=%p\n",
   //         X, Y, W, H, is_a_resize, resize_from_system, this);
   if (X != x() || Y != y()) force_position(1);
@@ -3226,7 +3238,8 @@
         by += parent->y();
         parent = parent->window();
       }
-      NSRect r = NSMakeRect(bx, main_screen_height - (by + H), W, H + (border()?bt:0));
+      float s = Fl::screen_driver()->scale(screen_num());
+      NSRect r = NSMakeRect(int(bx*s+0.5), main_screen_height - int((by + H)*s +0.5), int(W*s+0.5), int(H*s+0.5) + (border()?bt:0));
       if (visible_r()) [fl_xid(pWindow) setFrame:r display:YES];
     } else {
       bx = X; by = Y;
@@ -3310,6 +3323,9 @@
   // half pixel offset is necessary for clipping as done by fl_cgrectmake_cocoa()
   if (subRect()) CGContextClipToRect(gc, CGRectOffset(*(subRect()), -0.5, -0.5));
   
+  float s = Fl::screen_driver()->scale(0);
+  CGContextScaleCTM(gc, s, s); // apply current scaling factor
+  
 // this is the context with origin at top left of (sub)window
   CGContextSaveGState(gc);
 #if defined(FLTK_USE_CAIRO)
@@ -4333,17 +4349,19 @@
   int htop = pWindow->decorated_h() - h();
   CALayer *layer = get_titlebar_layer(pWindow);
   CGColorSpaceRef cspace = CGColorSpaceCreateDeviceRGB();
-  uchar *rgba = new uchar[4 * w() * htop * 4];
-  CGContextRef auxgc = CGBitmapContextCreate(rgba, 2 * w(), 2 * htop, 8, 8 * w(), cspace, kCGImageAlphaPremultipliedLast);
+  float s = Fl::screen_driver()->scale(screen_num());
+  int scaled_w = int(w() * s);
+  uchar *rgba = new uchar[4 * scaled_w * htop * 4];
+  CGContextRef auxgc = CGBitmapContextCreate(rgba, 2 * scaled_w, 2 * htop, 8, 8 * scaled_w, cspace, kCGImageAlphaPremultipliedLast);
   CGColorSpaceRelease(cspace);
-  CGContextClearRect(auxgc, CGRectMake(0,0,2*w(),2*htop));
+  CGContextClearRect(auxgc, CGRectMake(0,0,2*scaled_w,2*htop));
   CGContextScaleCTM(auxgc, 2, 2);
   if (layer) {
-    Fl_Cocoa_Window_Driver::draw_layer_to_context(layer, auxgc, w(), htop);
+    Fl_Cocoa_Window_Driver::draw_layer_to_context(layer, auxgc, scaled_w, htop);
     if (fl_mac_os_version >= 101300) {
       // drawn layer is left transparent and alpha-premultiplied: demultiply it and set it opaque.
       uchar *p = rgba;
-      uchar *last = rgba + 4 * w() * htop * 4;
+      uchar *last = rgba + 4 * scaled_w * htop * 4;
       while (p < last) {
         uchar q = *(p+3);
         if (q) {
@@ -4356,14 +4374,14 @@
       }
     }
   } else {
-    CGImageRef img = CGImage_from_window_rect(0, -htop, w(), htop);
+    CGImageRef img = CGImage_from_window_rect(0, -htop, scaled_w, htop);
     CGContextSaveGState(auxgc);
-    clip_to_rounded_corners(auxgc, w(), htop);
-    CGContextDrawImage(auxgc, CGRectMake(0, 0, w(), htop), img);
+    clip_to_rounded_corners(auxgc, scaled_w, htop);
+    CGContextDrawImage(auxgc, CGRectMake(0, 0, scaled_w, htop), img);
     CGContextRestoreGState(auxgc);
     CFRelease(img);
   }
-  Fl_RGB_Image *top_rgb = new Fl_RGB_Image(rgba, 2 * w(), 2 * htop, 4);
+  Fl_RGB_Image *top_rgb = new Fl_RGB_Image(rgba, 2 * scaled_w, 2 * htop, 4);
   top_rgb->alloc_array = 1;
   top = Fl_Shared_Image::get(top_rgb);
   top->scale(w(),htop);
Index: src/drivers/Cocoa/Fl_Cocoa_Printer_Driver.mm
===================================================================
--- src/drivers/Cocoa/Fl_Cocoa_Printer_Driver.mm	(revision 12593)
+++ src/drivers/Cocoa/Fl_Cocoa_Printer_Driver.mm	(working copy)
@@ -19,6 +19,7 @@
 #include <FL/Fl_Printer.H>
 #include <FL/Fl_Shared_Image.H>
 #include <FL/Fl_Window_Driver.H>
+#include <FL/Fl_Screen_Driver.H>
 #include "../Quartz/Fl_Quartz_Graphics_Driver.H"
 #include "../Darwin/Fl_Darwin_System_Driver.H"
 #include "Fl_Cocoa_Window_Driver.H"
@@ -401,8 +402,9 @@
       CGContextRef gc = (CGContextRef)driver()->gc();
       CGContextSaveGState(gc);
       CGContextTranslateCTM(gc, x_offset - 0.5, y_offset + bt - 0.5);
-      CGContextScaleCTM(gc, 1, -1);
-      Fl_Cocoa_Window_Driver::draw_layer_to_context(layer, gc, win->w(), bt);
+      float s = Fl::screen_driver()->scale(win->driver()->screen_num());
+      CGContextScaleCTM(gc, 1/s, -1/s);
+      Fl_Cocoa_Window_Driver::draw_layer_to_context(layer, gc, win->w() * s, bt);
       CGContextRestoreGState(gc);
     }
     else {
Index: src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H
===================================================================
--- src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H	(revision 12593)
+++ src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H	(working copy)
@@ -4,7 +4,7 @@
 // Definition of Apple Cocoa Screen interface
 // for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 2010-2016 by Bill Spitzak and others.
+// Copyright 2010-2017 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -97,6 +97,12 @@
   // --- compute dimensions of an Fl_Offscreen
   virtual void offscreen_size(Fl_Offscreen o, int &width, int &height);
   virtual float retina_factor() { return 2; }
+  
+  virtual APP_SCALING_CAPABILITY rescalable() { return SYSTEMWIDE_APP_SCALING; }
+  virtual float scale(int n) {return scale_;}
+  virtual void scale(int n, float f) { scale_ = f;}
+private:
+  float scale_;
 };
 
 
Index: src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx
===================================================================
--- src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx	(revision 12593)
+++ src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx	(working copy)
@@ -99,10 +99,11 @@
   if ((n < 0) || (n >= num_screens))
     n = 0;
 
-  X = screens[n].x;
-  Y = screens[n].y;
-  W = screens[n].width;
-  H = screens[n].height;
+  float s = scale(0);
+  X = screens[n].x/s;
+  Y = screens[n].y/s;
+  W = screens[n].width/s;
+  H = screens[n].height/s;
 }
 
 
Index: src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx
===================================================================
--- src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx	(revision 12593)
+++ src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx	(working copy)
@@ -62,7 +62,7 @@
   // Global display scaling factor: 1, 1.25, 1.5, 1.75, etc...
 #ifdef FLTK_HIDPI_SUPPORT
   float scaling = Fl_Graphics_Driver::default_driver().scale();
-  driver()->scale(scaling);
+  ((Fl_GDI_Graphics_Driver*)driver())->scale(scaling);
 #else
   float scaling = 1/((Fl_WinAPI_Screen_Driver*)Fl::screen_driver())->DWM_scaling_factor();
 #endif
Index: src/drivers/GDI/Fl_GDI_Graphics_Driver.H
===================================================================
--- src/drivers/GDI/Fl_GDI_Graphics_Driver.H	(revision 12593)
+++ src/drivers/GDI/Fl_GDI_Graphics_Driver.H	(working copy)
@@ -93,7 +93,6 @@
   void untranslate_all(void);
   static HRGN scale_region(HRGN r, float f, Fl_GDI_Graphics_Driver *dr);
   virtual void scale(float f);
-  virtual float scale();
 protected:
   void transformed_vertex0(float x, float y);
   void fixloop();
Index: src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
===================================================================
--- src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx	(revision 12593)
+++ src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx	(working copy)
@@ -236,11 +236,7 @@
   }
 }
 
-float Fl_GDI_Graphics_Driver::scale() {
-  return scale_;
-}
 
-
 /* Rescale region r with factor f and returns the scaled region.
  Region r is returned unchanged if r is null or f is 1.
  The input region is deleted if dr is null.
Index: src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx
===================================================================
--- src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx	(revision 12593)
+++ src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx	(working copy)
@@ -58,7 +58,7 @@
   offscreen = off ? off : CreateCompatibleBitmap( (gc ? gc : fl_GetDC(0) ) , w, h);
   if (!offscreen) offscreen = CreateCompatibleBitmap(fl_GetDC(0), w, h);
   driver(new Fl_GDI_Graphics_Driver);
-  if (d != 1 && high_res) driver()->scale(d);
+  if (d != 1 && high_res) ((Fl_GDI_Graphics_Driver*)driver())->scale(d);
   origin.x = origin.y = 0;
 }
 
Index: src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
===================================================================
--- src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx	(revision 12593)
+++ src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx	(working copy)
@@ -28,6 +28,7 @@
 #include <FL/x.H>
 #include "Fl_WinAPI_Window_Driver.H"
 #include "Fl_WinAPI_Screen_Driver.H"
+#include "../GDI/Fl_GDI_Graphics_Driver.H"
 #include <windows.h>
 #include <math.h>  // for ceil()
 
@@ -415,7 +416,7 @@
 #endif // USE_COLORMAP
   
   fl_graphics_driver->clip_region(0);
-  fl_graphics_driver->scale(Fl::screen_driver()->scale(screen_num()));
+  ((Fl_GDI_Graphics_Driver*)fl_graphics_driver)->scale(Fl::screen_driver()->scale(screen_num()));
 }
 
 void Fl_WinAPI_Window_Driver::label(const char *name,const char *iname) {
Index: src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H
===================================================================
--- src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H	(revision 12593)
+++ src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H	(working copy)
@@ -105,7 +105,6 @@
   void translate_all(int dx, int dy);
   void untranslate_all();
   virtual void scale(float f);
-  virtual float scale();
   virtual int has_feature(driver_feature mask) { return mask & NATIVE; }
   virtual void *gc() { return gc_; }
   virtual void gc(void *value);
Index: src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
===================================================================
--- src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx	(revision 12593)
+++ src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx	(working copy)
@@ -100,11 +100,6 @@
 #endif
 }
 
-
-float Fl_Xlib_Graphics_Driver::scale() {
-  return scale_;
-}
-
 void Fl_Xlib_Graphics_Driver::copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) {
   XCopyArea(fl_display, pixmap, fl_window, gc_, srcx*scale_, srcy*scale_, w*scale_, h*scale_, (x+offset_x_)*scale_, (y+offset_y_)*scale_);
 
Index: src/glut_compatibility.cxx
===================================================================
--- src/glut_compatibility.cxx	(revision 12593)
+++ src/glut_compatibility.cxx	(working copy)
@@ -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 @@
     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;
