Removed obsolete window positioning code.
authorSam Lantinga <slouken@libsdl.org>
Tue, 15 Mar 2011 21:44:56 -0700
changeset 5495b3680e05286d
parent 5494 78b351c52f53
child 5496 6b7464c2b90d
Removed obsolete window positioning code.
src/video/directfb/SDL_DirectFB_window.c
src/video/windows/SDL_windowswindow.c
     1.1 --- a/src/video/directfb/SDL_DirectFB_window.c	Tue Mar 15 21:40:57 2011 -0700
     1.2 +++ b/src/video/directfb/SDL_DirectFB_window.c	Tue Mar 15 21:44:56 2011 -0700
     1.3 @@ -62,26 +62,8 @@
     1.4  		bshaped = 1;
     1.5  	
     1.6      /* Fill the window description. */
     1.7 -    if (SDL_WINDOWPOS_ISCENTERED(window->x)) {
     1.8 -        x = (dispdata->cw - window->w) / 2;
     1.9 -    } else if (SDL_WINDOWPOS_ISUNDEFINED(window->x)) {
    1.10 -        x = 0;
    1.11 -    } else {
    1.12 -        x = window->x;
    1.13 -    }
    1.14 -    
    1.15 -    if (SDL_WINDOWPOS_ISCENTERED(window->y)) {
    1.16 -        y = (dispdata->ch - window->h) / 2;
    1.17 -    } else if (SDL_WINDOWPOS_ISUNDEFINED(window->y)) {
    1.18 -        y = 0;
    1.19 -    } else {
    1.20 -        y = window->y;
    1.21 -    }
    1.22 -    
    1.23 -    if (window->flags & SDL_WINDOW_FULLSCREEN) {
    1.24 -        x = 0;
    1.25 -        y = 0;
    1.26 -    }
    1.27 +    x = window->x;
    1.28 +    y = window->y;
    1.29  
    1.30      DirectFB_WM_AdjustWindowLayout(window, window->flags, window->w, window->h);
    1.31  
     2.1 --- a/src/video/windows/SDL_windowswindow.c	Tue Mar 15 21:40:57 2011 -0700
     2.2 +++ b/src/video/windows/SDL_windowswindow.c	Tue Mar 15 21:44:56 2011 -0700
     2.3 @@ -345,7 +345,6 @@
     2.4      SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
     2.5      HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
     2.6      RECT rect;
     2.7 -    SDL_Rect bounds;
     2.8      DWORD style;
     2.9      HWND top;
    2.10      BOOL menu;
    2.11 @@ -371,18 +370,8 @@
    2.12      AdjustWindowRectEx(&rect, style, menu, 0);
    2.13      w = (rect.right - rect.left);
    2.14      h = (rect.bottom - rect.top);
    2.15 -
    2.16 -    WIN_GetDisplayBounds(_this, display, &bounds);
    2.17 -    if (SDL_WINDOWPOS_ISCENTERED(window->x)) {
    2.18 -        x = bounds.x + (bounds.w - w) / 2;
    2.19 -    } else {
    2.20 -        x = window->x + rect.left;
    2.21 -    }
    2.22 -    if (SDL_WINDOWPOS_ISCENTERED(window->y)) {
    2.23 -        y = bounds.y + (bounds.h - h) / 2;
    2.24 -    } else {
    2.25 -        y = window->y + rect.top;
    2.26 -    }
    2.27 +    x = window->x + rect.left;
    2.28 +    y = window->y + rect.top;
    2.29  
    2.30      SetWindowPos(hwnd, top, x, y, 0, 0, (SWP_NOCOPYBITS | SWP_NOSIZE));
    2.31  }