diff --git a/src/arch/LowLevelWindow/LowLevelWindow_Win32.h b/src/arch/LowLevelWindow/LowLevelWindow_Win32.h index f5bc5ec281..70168d098c 100644 --- a/src/arch/LowLevelWindow/LowLevelWindow_Win32.h +++ b/src/arch/LowLevelWindow/LowLevelWindow_Win32.h @@ -20,6 +20,8 @@ public: virtual bool SupportsRenderToTexture() const { return true; } virtual RenderTarget *CreateRenderTarget(); + bool SupportsFullscreenBorderlessWindow() const { return true; } + const ActualVideoModeParams GetActualVideoModeParams() const; }; diff --git a/src/archutils/Win32/GraphicsWindow.cpp b/src/archutils/Win32/GraphicsWindow.cpp index fa8f61197a..7b428f367c 100644 --- a/src/archutils/Win32/GraphicsWindow.cpp +++ b/src/archutils/Win32/GraphicsWindow.cpp @@ -261,12 +261,12 @@ RString GraphicsWindow::SetScreenMode( const VideoModeParams &p ) return RString(); } -static int GetWindowStyle( bool bWindowed ) +static int GetWindowStyle( bool bWindowed , bool bWindowIsFullscreenBorderless) { - if( bWindowed ) + if( bWindowed && !bWindowIsFullscreenBorderless ) return WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; else - return WS_POPUP; + return WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; } /* Set the final window size, set the window text and icon, and then unhide the @@ -280,7 +280,7 @@ void GraphicsWindow::CreateGraphicsWindow( const VideoModeParams &p, bool bForce if( g_hWndMain == nullptr || bForceRecreateWindow ) { - int iWindowStyle = GetWindowStyle( p.windowed ); + int iWindowStyle = GetWindowStyle( p.windowed , p.bWindowIsFullscreenBorderless ); AppInstance inst; HWND hWnd = CreateWindow( g_sClassName, "app", iWindowStyle, @@ -331,7 +331,7 @@ void GraphicsWindow::CreateGraphicsWindow( const VideoModeParams &p, bool bForce /* The window style may change as a result of switching to or from fullscreen; * apply it. Don't change the WS_VISIBLE bit. */ - int iWindowStyle = GetWindowStyle( p.windowed ); + int iWindowStyle = GetWindowStyle(p.windowed, p.bWindowIsFullscreenBorderless); if( GetWindowLong( g_hWndMain, GWL_STYLE ) & WS_VISIBLE ) iWindowStyle |= WS_VISIBLE; SetWindowLong( g_hWndMain, GWL_STYLE, iWindowStyle );