summaryrefslogtreecommitdiff
path: root/src/Fl_Gl_Window.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-07-25 10:57:24 +0000
committerManolo Gouy <Manolo>2017-07-25 10:57:24 +0000
commit225c3d6da316838aba9432a319bbdd33da97a001 (patch)
tree02d987786b068b2fb0918e62588233cf9543da13 /src/Fl_Gl_Window.cxx
parent2b529dc25d51b58eed4215e6794de470e2f9deab (diff)
Rewrite Fl_Window_Driver::resize_after_scale_change() removing calls to Fl_Window::hide() and Fl_Window::show().
Windows are now rescaled with a call to Fl_Window::resize() which has been slightly modified. Static member variable bool Fl_Window_Driver::in_resize_after_scale_change is created, and is true if and only if Fl_Window::resize() is called by Fl_Window_Driver::resize_after_scale_change(). This new flag allows Fl_Window::resize() to perform correctly the rescaling of the window. Fl_Gl_Window::resize() and Fl_Double_Window::resize() also consult the value of the Fl_Window_Driver::in_resize_after_scale_change flag. The platform-specific Fl_WinAPI_Window_Driver::resize() and Fl_X11_Window_Driver::resize() also use the Fl_Window_Driver::in_resize_after_scale_change flag. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12349 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Gl_Window.cxx')
-rw-r--r--src/Fl_Gl_Window.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx
index 22e81e946..fc5a7748d 100644
--- a/src/Fl_Gl_Window.cxx
+++ b/src/Fl_Gl_Window.cxx
@@ -24,6 +24,7 @@ extern int fl_gl_load_plugin;
#include <FL/gl.h>
#include <FL/Fl_Gl_Window.H>
#include <FL/Fl_Gl_Window_Driver.H>
+#include <FL/Fl_Window_Driver.H>
#include <stdlib.h>
#include <FL/fl_utf8.h>
# if (HAVE_DLSYM && HAVE_DLFCN_H)
@@ -260,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());
+ int is_a_resize = (W != Fl_Widget::w() || H != Fl_Widget::h() || Fl_Window_Driver::in_resize_after_scale_change);
if (is_a_resize) valid(0);
pGlWindowDriver->resize(is_a_resize, W, H);
Fl_Window::resize(X,Y,W,H);