diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-09-25 20:18:59 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-09-25 20:19:41 +0300 |
commit | 92f92db220fe9393b9dd10914b804767649f9b99 (patch) | |
tree | c0a4c338681e494a8d88c6a2bfe9032266aa4859 /vcl | |
parent | 50c627257e5856c44e1a2f2ced3a948496df0cc6 (diff) |
mhPrevInst was pointless
Change-Id: Iacd1c0856f991e11ef26d7ff6bf1e75264b89ac9
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/win/saldata.hxx | 1 | ||||
-rw-r--r-- | vcl/win/source/app/salinst.cxx | 75 |
2 files changed, 35 insertions, 41 deletions
diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx index 9d9321d4b9ba..a50e67df1954 100644 --- a/vcl/inc/win/saldata.hxx +++ b/vcl/inc/win/saldata.hxx @@ -74,7 +74,6 @@ public: public: HINSTANCE mhInst; // default instance handle - HINSTANCE mhPrevInst; // previous instance handle int mnCmdShow; // default frame show style HPALETTE mhDitherPal; // dither palette HGLOBAL mhDitherDIB; // dither memory handle diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index e6ae9539218d..57dfc2801fbd 100644 --- a/vcl/win/source/app/salinst.cxx +++ b/vcl/win/source/app/salinst.cxx @@ -332,7 +332,6 @@ void SalData::initKeyCodeMap() SalData::SalData() { mhInst = 0; // default instance handle - mhPrevInst = 0; // previous instance handle mnCmdShow = 0; // default frame show style mhDitherPal = 0; // dither palette mhDitherDIB = 0; // dither memory handle @@ -435,7 +434,6 @@ void InitSalMain() aSI.cb = sizeof( aSI ); GetStartupInfo( &aSI ); pData->mhInst = GetModuleHandle( NULL ); - pData->mhPrevInst = NULL; pData->mnCmdShow = aSI.wShowWindow; } } @@ -464,44 +462,41 @@ SalInstance* CreateSalInstance() pSalData->mnAppThreadId = GetCurrentThreadId(); // register frame class - if ( !pSalData->mhPrevInst ) - { - WNDCLASSEXW aWndClassEx; - aWndClassEx.cbSize = sizeof( aWndClassEx ); - aWndClassEx.style = CS_OWNDC; - aWndClassEx.lpfnWndProc = SalFrameWndProcW; - aWndClassEx.cbClsExtra = 0; - aWndClassEx.cbWndExtra = SAL_FRAME_WNDEXTRA; - aWndClassEx.hInstance = pSalData->mhInst; - aWndClassEx.hCursor = 0; - aWndClassEx.hbrBackground = 0; - aWndClassEx.lpszMenuName = 0; - aWndClassEx.lpszClassName = SAL_FRAME_CLASSNAMEW; - ImplLoadSalIcon( SAL_RESID_ICON_DEFAULT, aWndClassEx.hIcon, aWndClassEx.hIconSm ); - if ( !RegisterClassExW( &aWndClassEx ) ) - return NULL; - - aWndClassEx.hIcon = 0; - aWndClassEx.hIconSm = 0; - aWndClassEx.style |= CS_SAVEBITS; - aWndClassEx.lpszClassName = SAL_SUBFRAME_CLASSNAMEW; - if ( !RegisterClassExW( &aWndClassEx ) ) - return NULL; - - // shadow effect for popups on XP - if( aSalShlData.mbWXP ) - aWndClassEx.style |= CS_DROPSHADOW; - aWndClassEx.lpszClassName = SAL_TMPSUBFRAME_CLASSNAMEW; - if ( !RegisterClassExW( &aWndClassEx ) ) - return NULL; - - aWndClassEx.style = 0; - aWndClassEx.lpfnWndProc = SalComWndProcW; - aWndClassEx.cbWndExtra = 0; - aWndClassEx.lpszClassName = SAL_COM_CLASSNAMEW; - if ( !RegisterClassExW( &aWndClassEx ) ) - return NULL; - } + WNDCLASSEXW aWndClassEx; + aWndClassEx.cbSize = sizeof( aWndClassEx ); + aWndClassEx.style = CS_OWNDC; + aWndClassEx.lpfnWndProc = SalFrameWndProcW; + aWndClassEx.cbClsExtra = 0; + aWndClassEx.cbWndExtra = SAL_FRAME_WNDEXTRA; + aWndClassEx.hInstance = pSalData->mhInst; + aWndClassEx.hCursor = 0; + aWndClassEx.hbrBackground = 0; + aWndClassEx.lpszMenuName = 0; + aWndClassEx.lpszClassName = SAL_FRAME_CLASSNAMEW; + ImplLoadSalIcon( SAL_RESID_ICON_DEFAULT, aWndClassEx.hIcon, aWndClassEx.hIconSm ); + if ( !RegisterClassExW( &aWndClassEx ) ) + return NULL; + + aWndClassEx.hIcon = 0; + aWndClassEx.hIconSm = 0; + aWndClassEx.style |= CS_SAVEBITS; + aWndClassEx.lpszClassName = SAL_SUBFRAME_CLASSNAMEW; + if ( !RegisterClassExW( &aWndClassEx ) ) + return NULL; + + // shadow effect for popups on XP + if( aSalShlData.mbWXP ) + aWndClassEx.style |= CS_DROPSHADOW; + aWndClassEx.lpszClassName = SAL_TMPSUBFRAME_CLASSNAMEW; + if ( !RegisterClassExW( &aWndClassEx ) ) + return NULL; + + aWndClassEx.style = 0; + aWndClassEx.lpfnWndProc = SalComWndProcW; + aWndClassEx.cbWndExtra = 0; + aWndClassEx.lpszClassName = SAL_COM_CLASSNAMEW; + if ( !RegisterClassExW( &aWndClassEx ) ) + return NULL; HWND hComWnd = CreateWindowExW( WS_EX_TOOLWINDOW, SAL_COM_CLASSNAMEW, L"", WS_POPUP, 0, 0, 0, 0, 0, 0, |