X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fmswin%2Ffg_main_mswin.c;h=4bd703973eb3dd728d598bc1d6ad6033e666e1b8;hb=0ad162e4550450e4c5e0d930e564e88d1a197575;hp=656ae5143e1d065a121fff4fbed63b4b0c962b09;hpb=93011e4f079bbfdb796c7b7f524f247956cc4830;p=freeglut diff --git a/src/mswin/fg_main_mswin.c b/src/mswin/fg_main_mswin.c index 656ae51..4bd7039 100644 --- a/src/mswin/fg_main_mswin.c +++ b/src/mswin/fg_main_mswin.c @@ -135,7 +135,21 @@ static void fghUpdateWindowStatus(SFG_Window *window, GLboolean visState) if (window->State.Visible != visState) { window->State.Visible = visState; + /* On win32 we only have two states, window displayed and window not displayed (iconified) + * We map these to GLUT_FULLY_RETAINED and GLUT_HIDDEN respectively. + */ INVOKE_WCB( *window, WindowStatus, ( visState ? GLUT_FULLY_RETAINED:GLUT_HIDDEN ) ); + + /* If top level window (not a subwindow/child), and icon title text available, switch titles based on visibility state */ + if (!window->Parent && window->State.pWState.IconTitle) + { + if (visState) + /* visible, set window title */ + SetWindowText( window->Window.Handle, window->State.pWState.WindowTitle ); + else + /* not visible, set icon title */ + SetWindowText( window->Window.Handle, window->State.pWState.IconTitle ); + } } /* Also set visibility state for children */ @@ -914,30 +928,6 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR lRet = 0; /* Per docs, should return zero */ break; - /* Other messages that I have seen and which are not handled already */ - case WM_SETTEXT: /* 0x000c */ - lRet = DefWindowProc( hWnd, uMsg, wParam, lParam ); - /* Pass it on to "DefWindowProc" to set the window text */ - break; - - case WM_GETTEXT: /* 0x000d */ - /* Ideally we would copy the title of the window into "lParam" */ - /* strncpy ( (char *)lParam, "Window Title", wParam ); - lRet = ( wParam > 12 ) ? 12 : wParam; */ - /* the number of characters copied */ - lRet = DefWindowProc( hWnd, uMsg, wParam, lParam ); - break; - - case WM_GETTEXTLENGTH: /* 0x000e */ - /* Ideally we would get the length of the title of the window */ - lRet = 12; - /* the number of characters in "Window Title\0" (see above) */ - break; - - case WM_ERASEBKGND: /* 0x0014 */ - lRet = DefWindowProc( hWnd, uMsg, wParam, lParam ); - break; - #if !defined(_WIN32_WCE) case WM_SYNCPAINT: /* 0x0088 */ /* Another window has moved, need to update this one */ @@ -946,12 +936,6 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR /* Help screen says this message must be passed to "DefWindowProc" */ break; - case WM_NCPAINT: /* 0x0085 */ - /* Need to update the border of this window */ - lRet = DefWindowProc( hWnd, uMsg, wParam, lParam ); - /* Pass it on to "DefWindowProc" to repaint a standard border */ - break; - case WM_SYSCOMMAND : /* 0x0112 */ { /*