summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-03-29 09:49:11 +0000
committeralberth <alberth@openttd.org>2009-03-29 09:49:11 +0000
commit9d2738b9c4c917fef1435276f7963c05fad817de (patch)
tree46a8610446402593770a93a3a51e586061127c7b /src/window.cpp
parent7a9a5cd139e924b966599e459db2f1fbdbcdf286 (diff)
downloadopenttd-9d2738b9c4c917fef1435276f7963c05fad817de.tar.xz
(svn r15885) -Codechange: Removed new_size parameter of Window::OnResize() callback
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/window.cpp b/src/window.cpp
index f2d238ead..a35eb28f4 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -920,13 +920,10 @@ void Window::FindWindowPlacementAndResize(int def_width, int def_height)
ResizeWindow(this, enlarge_x, enlarge_y);
- Point size;
Point diff;
- size.x = this->width;
- size.y = this->height;
diff.x = enlarge_x;
diff.y = enlarge_y;
- this->OnResize(size, diff);
+ this->OnResize(diff);
}
int nx = this->left;
@@ -1600,13 +1597,10 @@ static bool HandleWindowDragging()
/* ResizeWindow sets both pre- and after-size to dirty for redrawal */
ResizeWindow(w, x, y);
- Point size;
Point diff;
- size.x = x + w->width;
- size.y = y + w->height;
diff.x = x;
diff.y = y;
- w->OnResize(size, diff);
+ w->OnResize(diff);
return false;
}
}
@@ -2478,13 +2472,10 @@ void RelocateAllWindows(int neww, int newh)
if (neww - w->width != 0) {
ResizeWindow(w, min(neww, 640) - w->width, 0);
- Point size;
Point delta;
- size.x = w->width;
- size.y = w->height;
delta.x = neww - w->width;
delta.y = 0;
- w->OnResize(size, delta);
+ w->OnResize(delta);
}
top = w->top;