summaryrefslogtreecommitdiff
path: root/src/Fl_win32.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1998-10-19 17:16:10 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1998-10-19 17:16:10 +0000
commitf3fc32d284661926b36420d0fa615b655becf94a (patch)
tree84780fc0e6e9d2c5d3d00cd411a87fe3fc19f490 /src/Fl_win32.cxx
parent9922616d2c3550459c2e043d79b9228fa99560d3 (diff)
Added another redraw patch from Bill Spitzak.
git-svn-id: file:///fltk/svn/fltk/trunk@16 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_win32.cxx')
-rw-r--r--src/Fl_win32.cxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index 1247ef3d0..7df5cfebf 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -423,14 +423,17 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
////////////////////////////////////////////////////////////////
void Fl_Window::resize(int X,int Y,int W,int H) {
- int resize_from_program = 1;
- if (this == resize_bug_fix) {
- resize_from_program = 0;
- resize_bug_fix = 0;
- }
- if (X==x() && Y==y() && W==w() && H==h()) return;
+ int is_a_resize = (W != w() || H != h());
+ int resize_from_program = (this != resize_bug_fix);
+ if (!resize_from_program) resize_bug_fix = 0;
if (X != x() || Y != y()) set_flag(FL_FORCE_POSITION);
- if (W != w() || H != h()) Fl_Group::resize(X,Y,W,H); else {x(X); y(Y);}
+ else if (!is_a_resize) return;
+ if (is_a_resize) {
+ Fl_Group::resize(X,Y,W,H);
+ if (shown()) {redraw(); i->wait_for_expose = 1;}
+ } else {
+ x(X); y(Y);
+ }
if (resize_from_program && shown()) {
if (border() && !parent()) {
X -= GetSystemMetrics(SM_CXFRAME);
@@ -439,7 +442,6 @@ void Fl_Window::resize(int X,int Y,int W,int H) {
H += 2*GetSystemMetrics(SM_CYFRAME)+GetSystemMetrics(SM_CYCAPTION);
}
MoveWindow(i->xid, X, Y, W, H, TRUE);
- //if (!parent()) redraw();
}
}