changeset 8940:24a80458fded draft

(svn r12714) -Fix [FS#1904]: do not move windows below the toolbar on resizes unless they would go behind the toolbar.
author rubidium <rubidium@openttd.org>
date Mon, 14 Apr 2008 23:26:31 +0000
parents fd776400b661
children 3b0ffce16526
files src/window.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -2316,7 +2316,7 @@
 
 				const Window *wt = FindWindowById(WC_MAIN_TOOLBAR, 0);
 				if (wt != NULL) {
-					if (top < wt->height) top = wt->height;
+					if (top < wt->height && wt->left < (w->left + w->width) && (wt->left + wt->width) > w->left) top = wt->height;
 					if (top >= newh) top = newh - 1;
 				} else {
 					if (top < 0) top = 0;