diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2006-08-23 11:47:58 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2006-08-23 11:47:58 +0000 |
| commit | 05cd337c05c0b2775004d7a5e6be39271a5d4be8 (patch) | |
| tree | baf96a9ecae291140238141ad67e10616ef7ad9e /src | |
| parent | 3bd03e7f18a2a5aedbdf991e7c428e64aa85bd57 (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_win32.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
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); } } |
