(svn r12714) -Fix [FS#1904]: do not move windows below the toolbar on resizes unless they would go behind the toolbar.
authorrubidium
Mon, 14 Apr 2008 23:26:31 +0000
changeset 8940 afe7bc9fcc6e
parent 8939 94ba66a68516
child 8941 daf347ea7a17
(svn r12714) -Fix [FS#1904]: do not move windows below the toolbar on resizes unless they would go behind the toolbar.
src/window.cpp
--- a/src/window.cpp	Mon Apr 14 21:49:13 2008 +0000
+++ b/src/window.cpp	Mon Apr 14 23:26:31 2008 +0000
@@ -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;