369 menu = (style & WS_CHILDWINDOW) ? FALSE : (GetMenu(hwnd) != NULL); |
368 menu = (style & WS_CHILDWINDOW) ? FALSE : (GetMenu(hwnd) != NULL); |
370 #endif |
369 #endif |
371 AdjustWindowRectEx(&rect, style, menu, 0); |
370 AdjustWindowRectEx(&rect, style, menu, 0); |
372 w = (rect.right - rect.left); |
371 w = (rect.right - rect.left); |
373 h = (rect.bottom - rect.top); |
372 h = (rect.bottom - rect.top); |
374 x = window->x + rect.left; |
373 |
375 y = window->y + rect.top; |
374 WIN_GetDisplayBounds(_this, display, &bounds); |
|
375 if (SDL_WINDOWPOS_ISCENTERED(window->x)) { |
|
376 x = bounds.x + (bounds.w - w) / 2; |
|
377 } else { |
|
378 x = window->x + rect.left; |
|
379 } |
|
380 if (SDL_WINDOWPOS_ISCENTERED(window->y)) { |
|
381 y = bounds.y + (bounds.h - h) / 2; |
|
382 } else { |
|
383 y = window->y + rect.top; |
|
384 } |
376 |
385 |
377 SetWindowPos(hwnd, top, x, y, 0, 0, (SWP_NOCOPYBITS | SWP_NOSIZE)); |
386 SetWindowPos(hwnd, top, x, y, 0, 0, (SWP_NOCOPYBITS | SWP_NOSIZE)); |
378 } |
387 } |
379 |
388 |
380 void |
389 void |