From 05cd337c05c0b2775004d7a5e6be39271a5d4be8 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Wed, 23 Aug 2006 11:47:58 +0000 Subject: Fixed WIN32 zero size window issue (STR #1387) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5346 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_win32.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 7b615dbc2..8173ecd31 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1128,6 +1128,10 @@ void Fl_Window::resize(int X,int Y,int W,int H) { W += 2*bx; H += 2*by+bt; } + // avoid zero size windows. A zero sized window on Win32 + // will cause continouly new redraw events. + if (W<=0) W = 1; + if (H<=0) H = 1; SetWindowPos(i->xid, 0, X, Y, W, H, flags); } } -- cgit v1.2.3