From ca0521f89fc53be22e18cb56f6d9c358555246af Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 24 Oct 2009 14:53:55 +0000 Subject: (svn r17853) -Codechange: remove the 'delta' parameter from OnResize; it was used in ways that aren't always wanted, causing bugs and the like. Also with nested widgets most reasons for handling OnResize have gone. --- src/window.cpp | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'src/window.cpp') diff --git a/src/window.cpp b/src/window.cpp index 957b5eba3..fc8e605eb 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -640,10 +640,7 @@ void Window::ReInit() } ResizeWindow(this, dx, dy); // Sets post-resize dirty blocks. - Point diff; - diff.x = dx; - diff.y = dy; - this->OnResize(diff); // Calls NWidgetViewport::UpdateViewportCoordinates() + this->OnResize(); // Calls NWidgetViewport::UpdateViewportCoordinates() } /** Find the Window whose parent pointer points to this window @@ -1046,11 +1043,7 @@ void Window::FindWindowPlacementAndResize(int def_width, int def_height) if (this->resize.step_height > 1) enlarge_y -= enlarge_y % (int)this->resize.step_height; ResizeWindow(this, enlarge_x, enlarge_y); - - Point diff; - diff.x = enlarge_x; - diff.y = enlarge_y; - this->OnResize(diff); + this->OnResize(); } int nx = this->left; @@ -1840,11 +1833,7 @@ static bool HandleWindowDragging() /* ResizeWindow sets both pre- and after-size to dirty for redrawal */ ResizeWindow(w, x, y); - - Point diff; - diff.x = x; - diff.y = y; - w->OnResize(diff); + w->OnResize(); return false; } } @@ -2696,11 +2685,7 @@ void RelocateAllWindows(int neww, int newh) case WC_MAIN_TOOLBAR: if (neww - w->width != 0) { ResizeWindow(w, min(neww, 640) - w->width, 0); - - Point delta; - delta.x = neww - w->width; - delta.y = 0; - w->OnResize(delta); + w->OnResize(); } top = w->top; -- cgit v1.2.3-54-g00ecf