summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-14 23:26:31 +0000
committerrubidium <rubidium@openttd.org>2008-04-14 23:26:31 +0000
commitfd38b3f850863a3e4010bccd6cbab5e5b8cec0c1 (patch)
tree77a25d6657a8487d960faaa04c6d678fc4b42caf /src/window.cpp
parent2152e1c420769cca45748df897aada7f9de266ca (diff)
downloadopenttd-fd38b3f850863a3e4010bccd6cbab5e5b8cec0c1.tar.xz
(svn r12714) -Fix [FS#1904]: do not move windows below the toolbar on resizes unless they would go behind the toolbar.
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/window.cpp b/src/window.cpp
index ac5ec8022..976155644 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -2316,7 +2316,7 @@ void RelocateAllWindows(int neww, int newh)
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;