From 849856388ab026dcac7760f8fb384e2cda105085 Mon Sep 17 00:00:00 2001 From: fayjf Date: Fri, 27 May 2011 20:10:13 +0000 Subject: [PATCH] Fixing 'GLUT_BORDERLESS' on Windows per e-mail from Eero Pajarre dated 4/24/2011 9:19 AM git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@917 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/freeglut_main.c | 3 ++- freeglut/freeglut/src/freeglut_window.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/freeglut/freeglut/src/freeglut_main.c b/freeglut/freeglut/src/freeglut_main.c index 7fba2dd..e31ee1a 100644 --- a/freeglut/freeglut/src/freeglut_main.c +++ b/freeglut/freeglut/src/freeglut_main.c @@ -122,7 +122,8 @@ static void fghReshapeWindow ( SFG_Window *window, int width, int height ) if ( window->Parent == NULL ) { - if ( ! window->IsMenu && (window != fgStructure.GameModeWindow) ) + if ( ! window->IsMenu && (window != fgStructure.GameModeWindow) && + !( fgState.DisplayMode & GLUT_BORDERLESS )) { w += GetSystemMetrics( SM_CXSIZEFRAME ) * 2; h += GetSystemMetrics( SM_CYSIZEFRAME ) * 2 + diff --git a/freeglut/freeglut/src/freeglut_window.c b/freeglut/freeglut/src/freeglut_window.c index 4f5c9bc..0c56fe1 100644 --- a/freeglut/freeglut/src/freeglut_window.c +++ b/freeglut/freeglut/src/freeglut_window.c @@ -1286,7 +1286,7 @@ void fgOpenWindow( SFG_Window* window, const char* title, else if ( fgState.DisplayMode & GLUT_BORDERLESS ) { SetWindowLong ( window->Window.Handle, GWL_STYLE, - WindowStyle & ~(WS_BORDER | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX)); + WindowStyle & ~(WS_BORDER | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_DLGFRAME | WS_SIZEBOX)); } /* SetWindowPos(window->Window.Handle, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); */