Mercurial > sdl-ios-xcode
changeset 3693:d3f330fc2009
update window prev links
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 22 Jan 2010 16:17:11 +0000 |
parents | ad85eb21a559 |
children | b0a707f589a6 |
files | src/video/SDL_video.c |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/video/SDL_video.c Fri Jan 22 15:55:20 2010 +0000 +++ b/src/video/SDL_video.c Fri Jan 22 16:17:11 2010 +0000 @@ -903,6 +903,9 @@ window->flags = (flags & allowed_flags); window->display = display; window->next = display->windows; + if (display->windows) { + display->windows->prev = window; + } display->windows = window; if (_this->CreateWindow && _this->CreateWindow(_this, window) < 0) { @@ -943,6 +946,9 @@ window->flags = SDL_WINDOW_FOREIGN; window->display = display; window->next = display->windows; + if (display->windows) { + display->windows->prev = window; + } display->windows = window; if (!_this->CreateWindowFrom || @@ -1452,6 +1458,9 @@ /* Unlink the window from the list */ display = window->display; + if (window->next) { + window->next->prev = window->prev; + } if (window->prev) { window->prev->next = window->next; } else {