diff --git a/src/win32/OSystemWin32.cxx b/src/win32/OSystemWin32.cxx index 4a7a97148..08402fad1 100644 --- a/src/win32/OSystemWin32.cxx +++ b/src/win32/OSystemWin32.cxx @@ -17,7 +17,7 @@ // $Id$ //============================================================================ -#include +#include #include #include "bspf.hxx" @@ -91,24 +91,24 @@ OSystemWin32::~OSystemWin32() } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void OSystemWin32::setAppWindowPos(int x, int y, int w, int h) -{ - SDL_SysWMinfo sdl_info; - memset(&sdl_info, 0, sizeof(sdl_info)); - SDL_VERSION (&sdl_info.version); - if(SDL_GetWMInfo(&sdl_info) <= 0) - return; - - // The following mostly comes from SDL_dx5video.c - HWND window = sdl_info.window; - RECT bounds; - - bounds.left = x; - bounds.top = y; - bounds.right = x + w; - bounds.bottom = y + h; - AdjustWindowRectEx(&bounds, GetWindowLong(window, GWL_STYLE), (GetMenu(window) != NULL), 0); - - SetWindowPos(window, HWND_NOTOPMOST, x, y, bounds.right-bounds.left, - bounds.bottom-bounds.top, SWP_NOCOPYBITS | SWP_SHOWWINDOW); -} +void OSystemWin32::setAppWindowPos(int x, int y, int w, int h) +{ + SDL_SysWMinfo sdl_info; + memset(&sdl_info, 0, sizeof(sdl_info)); + SDL_VERSION (&sdl_info.version); + if(SDL_GetWMInfo(&sdl_info) <= 0) + return; + + // The following mostly comes from SDL_dx5video.c + HWND window = sdl_info.window; + RECT bounds; + + bounds.left = x; + bounds.top = y; + bounds.right = x + w; + bounds.bottom = y + h; + AdjustWindowRectEx(&bounds, GetWindowLong(window, GWL_STYLE), (GetMenu(window) != NULL), 0); + + SetWindowPos(window, HWND_NOTOPMOST, x, y, bounds.right-bounds.left, + bounds.bottom-bounds.top, SWP_NOCOPYBITS | SWP_SHOWWINDOW); +} diff --git a/src/win32/OSystemWin32.hxx b/src/win32/OSystemWin32.hxx index 11bbece97..a2ddf0574 100644 --- a/src/win32/OSystemWin32.hxx +++ b/src/win32/OSystemWin32.hxx @@ -43,12 +43,12 @@ class OSystemWin32 : public OSystem virtual ~OSystemWin32(); public: - /** - Move window to given position. The width and height are also - required for the underlying function, but the window size itself - absolutely must not be changed. - */ - void setAppWindowPos(int x, int y, int w, int h); + /** + Move window to given position. The width and height are also + required for the underlying function, but the window size itself + absolutely must not be changed. + */ + void setAppWindowPos(int x, int y, int w, int h); }; #endif