diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-05-07 12:45:44 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-05-07 12:45:44 +0200 |
| commit | 5a57c928a13ccb692fb391a29e0d8c737078515f (patch) | |
| tree | 21848f0a3df24f5fa264985b474104973a526873 /src | |
| parent | c00f31ab10bcf26ecf6c4573be6df396d3df3b07 (diff) | |
Remove unnecessary code
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 7e255cd90..57fc89892 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1208,7 +1208,7 @@ static void CocoatoFLTK(Fl_Window *win, int &x, int &y) { static NSPoint FLTKtoCocoa(Fl_Window *win, int x, int y, int H) { float s = Fl::screen_driver()->scale(0); while (win->parent()) {win = win->window(); x += win->x(); y += win->y();} - return NSMakePoint(x * s, main_screen_height - (y + H)*s); + return NSMakePoint(round(x * s), main_screen_height - round((y + H)*s)); } static FLWindowDelegate *flwindowdelegate_instance = nil; @@ -2197,8 +2197,6 @@ static FLTextInputContext* fltextinputcontext_instance = nil; BOOL retval = [super did_view_resolution_change]; if (retval && Fl::use_high_res_GL()) { Fl_Window *window = [(FLWindow*)[self window] getFl_Window]; - Fl_Cocoa_Window_Driver *d = Fl_Cocoa_Window_Driver::driver(window); - [self layer].contentsScale = d->mapped_to_retina() ? 2. : 1.; window->redraw(); // necessary with 10.14.2; harmless before } return retval; |
