summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-04-23 08:11:10 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-04-23 08:11:10 +0200
commit6f82d88af3bb393c2418436962e51a7318ea04b7 (patch)
treea1d4ed1f76302bf11ff1ab9fa7a9657a01633ea3
parent94f859c373393dc0b9b546e7a8c0b1f50470d3ae (diff)
macOS: restore correct tabbing/untabbing of windows - continued
slightly simpler and more explicit than previous commit at 602c6ffd8a9154f323f38c2e599abea8947f1f04
-rw-r--r--src/Fl_cocoa.mm8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index bdc418a5d..ba7e0693f 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -2218,7 +2218,7 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
NSRect rect = [self frame];
if (!window->parent() && window->border() && fabs(rect.size.height - window->h() * scale) > 5. ) {
// this happens with tabbed windows
- window->resize([[self window] frame].origin.x/scale,
+ window->Fl_Group::resize([[self window] frame].origin.x/scale,
(main_screen_height - ([[self window] frame].origin.y + rect.size.height))/scale,
rect.size.width/scale, rect.size.height/scale);
[self reset_layer_data];
@@ -2325,7 +2325,7 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
Fl_Window *window = [cw getFl_Window];
float scale = Fl::screen_driver()->scale(0);
if ( !window->parent() && window->border() && fabs(rect.size.height - window->h() * scale) > 5. ) { // this happens with tabbed windows
- window->resize([cw frame].origin.x/scale,
+ window->Fl_Group::resize([cw frame].origin.x/scale,
(main_screen_height - ([cw frame].origin.y + rect.size.height))/scale,
rect.size.width/scale, rect.size.height/scale);
}
@@ -3343,9 +3343,7 @@ void Fl_Cocoa_Window_Driver::resize(int X, int Y, int W, int H) {
r.origin = pt;
r.size.width = round(W*s);
r.size.height = round(H*s) + bt;
- if (NSEqualRects(r, [xid frame])) // occurs with tabbed windows
- pWindow->Fl_Group::resize(X, Y, W, H);
- else [xid setFrame:r display:YES];
+ [xid setFrame:r display:YES];
}
else {
[xid setFrameOrigin:pt]; // set cocoa coords to FLTK position