diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H index 24191c9db..e7125d633 100644 --- a/FL/Fl_Window.H +++ b/FL/Fl_Window.H @@ -541,6 +541,7 @@ public: void shape(const Fl_Image& b) ; const Fl_Image *shape(); int screen_num(); + static bool is_a_rescale(); }; #endif diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx index cd58f63e5..7188a320a 100644 --- a/src/Fl_Double_Window.cxx +++ b/src/Fl_Double_Window.cxx @@ -54,7 +54,7 @@ void Fl_Double_Window::resize(int X,int Y,int W,int H) { int oh = h(); Fl_Window::resize(X,Y,W,H); Fl_X *myi = Fl_X::i(this); - if (myi && Fl_Window_Driver::driver(this)->other_xid && (ow < w() || oh < h() || Fl_Window_Driver::is_a_rescale())) + if (myi && Fl_Window_Driver::driver(this)->other_xid && (ow < w() || oh < h() || is_a_rescale())) Fl_Window_Driver::driver(this)->destroy_double_buffer(); } diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx index 3ec175c1d..30a950ea5 100644 --- a/src/Fl_Gl_Window.cxx +++ b/src/Fl_Gl_Window.cxx @@ -261,7 +261,7 @@ void Fl_Gl_Window::resize(int X,int Y,int W,int H) { // printf("Fl_Gl_Window::resize(X=%d, Y=%d, W=%d, H=%d)\n", X, Y, W, H); // printf("current: x()=%d, y()=%d, w()=%d, h()=%d\n", x(), y(), w(), h()); - int is_a_resize = (W != Fl_Widget::w() || H != Fl_Widget::h() || Fl_Window_Driver::is_a_rescale()); + int is_a_resize = (W != Fl_Widget::w() || H != Fl_Widget::h() || is_a_rescale()); if (is_a_resize) valid(0); pGlWindowDriver->resize(is_a_resize, W, H); Fl_Window::resize(X,Y,W,H); diff --git a/src/Fl_Group.cxx b/src/Fl_Group.cxx index 229d33fbe..aefead997 100644 --- a/src/Fl_Group.cxx +++ b/src/Fl_Group.cxx @@ -708,7 +708,7 @@ void Fl_Group::resize(int X, int Y, int W, int H) { Fl_Widget::resize(X, Y, W, H); // make new xywh values visible for children - if ((!resizable() || (dw==0 && dh==0 )) && !Fl_Window_Driver::is_a_rescale()) { + if ((!resizable() || (dw==0 && dh==0 )) && !Fl_Window::is_a_rescale()) { if (!as_window()) { Fl_Widget*const* a = array(); diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx index fb77cf01d..db44d0450 100644 --- a/src/Fl_Window.cxx +++ b/src/Fl_Window.cxx @@ -689,6 +689,9 @@ void Fl_Window::shape(const Fl_Image& img) {pWindowDriver->shape(&img);} /** Returns the image controlling the window shape or NULL */ const Fl_Image* Fl_Window::shape() {return pWindowDriver->shape();} +/** Returns true when a window is being rescaled */ +bool Fl_Window::is_a_rescale() {return Fl_Window_Driver::is_a_rescale_;} + // // End of "$Id$". // diff --git a/src/Fl_Window_Driver.H b/src/Fl_Window_Driver.H index e31323d72..2fd8384ee 100644 --- a/src/Fl_Window_Driver.H +++ b/src/Fl_Window_Driver.H @@ -69,7 +69,6 @@ public: Fl_Offscreen other_xid; // offscreen bitmap (overlay and double-buffered windows) virtual int screen_num(); virtual void screen_num(int) {} - static bool is_a_rescale() {return is_a_rescale_;}; // --- frequently used accessors to public window data diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index aded8cb4e..02a270192 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3296,7 +3296,7 @@ void Fl_Cocoa_Window_Driver::resize(int X, int Y, int W, int H) { } else { NSPoint pt = FLTKtoCocoa(pWindow, X, Y, H); FLWindow *xid = fl_xid(pWindow); - if (W != w() || H != h() || is_a_rescale()) { + if (W != w() || H != h() || Fl_Window::is_a_rescale()) { NSRect r; float s = Fl::screen_driver()->scale(screen_num()); int bt = get_window_frame_sizes(pWindow); diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 090e49580..4ec2531ff 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1834,11 +1834,11 @@ int Fl_WinAPI_Window_Driver::fake_X_wm(int &X, int &Y, int &bt, int &bx, int &by void Fl_WinAPI_Window_Driver::resize(int X, int Y, int W, int H) { //fprintf(stderr, "resize w()=%d W=%d h()=%d H=%d\n",pWindow->w(), W,pWindow->h(), H); UINT flags = SWP_NOSENDCHANGING | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOOWNERZORDER; - int is_a_resize = (W != w() || H != h() || is_a_rescale()); + int is_a_resize = (W != w() || H != h() || Fl_Window::is_a_rescale()); int resize_from_program = (pWindow != resize_bug_fix); if (!resize_from_program) resize_bug_fix = 0; - if (X != x() || Y != y() || is_a_rescale()) { + if (X != x() || Y != y() || Fl_Window::is_a_rescale()) { force_position(1); } else { if (!is_a_resize) diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 9a8c813e5..ed3abf682 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -2252,8 +2252,8 @@ int fl_handle(const XEvent& thisevent) //////////////////////////////////////////////////////////////// void Fl_X11_Window_Driver::resize(int X,int Y,int W,int H) { - int is_a_move = (X != x() || Y != y() || is_a_rescale()); - int is_a_resize = (W != w() || H != h() || is_a_rescale()); + int is_a_move = (X != x() || Y != y() || Fl_Window::is_a_rescale()); + int is_a_resize = (W != w() || H != h() || Fl_Window::is_a_rescale()); int resize_from_program = (pWindow != resize_bug_fix); if (!resize_from_program) resize_bug_fix = 0; if (is_a_move && resize_from_program) force_position(1); diff --git a/src/drivers/Android/Fl_Android_Window_Driver.cxx b/src/drivers/Android/Fl_Android_Window_Driver.cxx index 7a3e276fd..d3e1147bd 100644 --- a/src/drivers/Android/Fl_Android_Window_Driver.cxx +++ b/src/drivers/Android/Fl_Android_Window_Driver.cxx @@ -124,8 +124,8 @@ void Fl_Android_Window_Driver::make_current() void Fl_Android_Window_Driver::resize(int X,int Y,int W,int H) { - int is_a_resize = (W != w() || H != h() || is_a_rescale()); - if (X != x() || Y != y() || is_a_rescale()) { + int is_a_resize = (W != w() || H != h() || Fl_Window::is_a_rescale()); + if (X != x() || Y != y() || Fl_Window::is_a_rescale()) { force_position(1); } else { if (!is_a_resize)