diff options
author | tron <tron@openttd.org> | 2004-11-13 11:08:50 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2004-11-13 11:08:50 +0000 |
commit | 3df0ff7854ce9a30d02cbcafbfbf894bd02aa3a3 (patch) | |
tree | aafe82662292666dcd8b8a44431e2a78790d2644 | |
parent | 53116247c3898a6ad01de6609ea1a64577908724 (diff) | |
download | openttd-3df0ff7854ce9a30d02cbcafbfbf894bd02aa3a3.tar.xz |
(svn r559) Minor simplification
-rw-r--r-- | window.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -806,10 +806,8 @@ bool HandleWindowDragging() int v_bottom = v->top + v->height; int v_right = v->left + v->width; if (ny + t->top >= v->top && ny + t->top < v_bottom) { - if (v->left < 13 && nx + t->left < v->left) { - ny = v_bottom; - } else if (v_right > _screen.width - 13 && - nx + t->right > v_right) { + if ((v->left < 13 && nx + t->left < v->left) || + (v_right > _screen.width - 13 && nx + t->right > v_right)) { ny = v_bottom; } else { if (nx + t->left > v->left - 13 && |