diff options
| author | Manolo Gouy <Manolo> | 2017-12-27 07:46:50 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2017-12-27 07:46:50 +0000 |
| commit | d6a0e4a0104170b8630389b475c155168d819188 (patch) | |
| tree | bb0a78bfe3fbb179c523892d1af08ef38ba23160 /src | |
| parent | 7758d472c2356f6908bce9fec6aa3e6d7e6a63e1 (diff) | |
Continue support for GUI rescaling under MacOS: fix test/resize() application
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12606 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 380a984cc..95bf05f70 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3285,7 +3285,6 @@ void Fl_Cocoa_Window_Driver::resize(int X,int Y,int W,int H) { by += parent->y(); parent = parent->window(); } - 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 { @@ -3296,7 +3295,7 @@ void Fl_Cocoa_Window_Driver::resize(int X,int Y,int W,int H) { by += parent->y(); parent = parent->window(); } - NSPoint pt = NSMakePoint(bx, main_screen_height - (by + H)); + NSPoint pt = NSMakePoint(int(bx*s+0.5), main_screen_height - int((by + H)*s +0.5)); if (visible_r()) [fl_xid(pWindow) setFrameOrigin:pt]; // set cocoa coords to FLTK position } } |
