From 90e2465d7d2c770707feeaebfebbe56bd76383f1 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 9 Feb 2009 02:33:10 +0000 Subject: (svn r15427) -Codechange: give w->caption_color a more sensible name as it holds the owner of whatever is shown in the window --- src/window.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/window.cpp') diff --git a/src/window.cpp b/src/window.cpp index 1e950fcfc..59df698ce 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -608,7 +608,7 @@ restart_search: * as deleting this window could cascade in deleting (many) others * anywhere in the z-array */ FOR_ALL_WINDOWS_FROM_BACK(w) { - if (w->caption_color == id) { + if (w->owner == id) { delete w; goto restart_search; } @@ -627,7 +627,7 @@ void ChangeWindowOwner(Owner old_owner, Owner new_owner) { Window *w; FOR_ALL_WINDOWS_FROM_BACK(w) { - if (w->caption_color != old_owner) continue; + if (w->owner != old_owner) continue; switch (w->window_class) { case WC_COMPANY_COLOR: @@ -642,7 +642,7 @@ void ChangeWindowOwner(Owner old_owner, Owner new_owner) continue; default: - w->caption_color = new_owner; + w->owner = new_owner; break; } } @@ -768,7 +768,7 @@ void Window::Initialize(int x, int y, int min_width, int min_height, /* Set up window properties */ this->window_class = cls; this->flags4 = WF_WHITE_BORDER_MASK; // just opened windows have a white border - this->caption_color = 0xFF; + this->owner = INVALID_OWNER; this->left = x; this->top = y; this->width = min_width; -- cgit v1.2.3-54-g00ecf