ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
May 2014
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
14 participants
437 discussions
Start a n
N
ew thread
[akhaldi] 63463: [HELP][SHUTDOWN] * Use vfwprintf instead of _vcwprintf which shouldn't be exported. CORE-8174
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon May 26 13:48:49 2014 New Revision: 63463 URL:
http://svn.reactos.org/svn/reactos?rev=63463&view=rev
Log: [HELP][SHUTDOWN] * Use vfwprintf instead of _vcwprintf which shouldn't be exported. CORE-8174 Modified: trunk/reactos/base/applications/cmdutils/help/help.c trunk/reactos/base/applications/shutdown/shutdown.c Modified: trunk/reactos/base/applications/cmdutils/help/help.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/help/help.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/help/help.c [iso-8859-1] Mon May 26 13:48:49 2014 @@ -56,7 +56,7 @@ // FIXME: Optimize by using Win32 console functions. if (IsConsoleHandle(OutputHandle)) { - _vcwprintf(tmpBuffer, arg_ptr); + vfwprintf(stdout, tmpBuffer, arg_ptr); } else { Modified: trunk/reactos/base/applications/shutdown/shutdown.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/shutdown…
============================================================================== --- trunk/reactos/base/applications/shutdown/shutdown.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/shutdown/shutdown.c [iso-8859-1] Mon May 26 13:48:49 2014 @@ -22,7 +22,7 @@ va_start(arg_ptr, resID); LoadStringW(GetModuleHandle(NULL), resID, tmpBuffer, MAX_BUFFER_SIZE); - _vcwprintf(tmpBuffer, arg_ptr); + vfwprintf(stdout, tmpBuffer, arg_ptr); va_end(arg_ptr); }
10 years, 7 months
1
0
0
0
[cwittich] 63462: [hivecls.inf] French translation by Pierre Schweitzer
by cwittich@svn.reactos.org
Author: cwittich Date: Mon May 26 13:23:48 2014 New Revision: 63462 URL:
http://svn.reactos.org/svn/reactos?rev=63462&view=rev
Log: [hivecls.inf] French translation by Pierre Schweitzer Modified: trunk/reactos/boot/bootdata/hivecls.inf Modified: trunk/reactos/boot/bootdata/hivecls.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivecls.inf?…
============================================================================== --- trunk/reactos/boot/bootdata/hivecls.inf [UTF-16LE] (original) +++ trunk/reactos/boot/bootdata/hivecls.inf [UTF-16LE] Mon May 26 13:23:48 2014 @@ -477,4 +477,9 @@ CPLFILE="Systemsteuerungselement" CPLFILE_OPENWITH="Mit der Systemsteuerung öffnen" +; LANG_FRENCH SUBLANG_NEUTRAL +[Strings.000C] +CPLFILE="Extension du Panneau de Contrôle" +CPLFILE_OPENWITH="Ouvrir avec le Panneau de Contrôle" + ; EOF
10 years, 7 months
1
0
0
0
[dquintana] 63461: [RSHELL] * Close menu on right click too. [BROWSEUI] * Check/uncheck the lock toolbar item based on the lock state. The view menu does not update yet. [SHELL32] * Destroy the men...
by dquintana@svn.reactos.org
Author: dquintana Date: Mon May 26 12:26:47 2014 New Revision: 63461 URL:
http://svn.reactos.org/svn/reactos?rev=63461&view=rev
Log: [RSHELL] * Close menu on right click too. [BROWSEUI] * Check/uncheck the lock toolbar item based on the lock state. The view menu does not update yet. [SHELL32] * Destroy the menu when the view window is destroyed. Modified: branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp branches/shell-experiments/dll/win32/browseui/internettoolbar.cpp branches/shell-experiments/dll/win32/browseui/internettoolbar.h branches/shell-experiments/dll/win32/browseui/toolsband.cpp branches/shell-experiments/dll/win32/shell32/shlview.cpp Modified: branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp [iso-8859-1] Mon May 26 12:26:47 2014 @@ -378,6 +378,8 @@ { case WM_NCLBUTTONDOWN: case WM_LBUTTONDOWN: + case WM_NCRBUTTONDOWN: + case WM_RBUTTONDOWN: if (m_menuBar) { POINT pt = msg->pt; @@ -445,6 +447,8 @@ { case WM_NCLBUTTONDOWN: case WM_LBUTTONDOWN: + case WM_NCRBUTTONDOWN: + case WM_RBUTTONDOWN: if (m_current->type == MenuPopupEntry) { HWND child = WindowFromPoint(pt); Modified: branches/shell-experiments/dll/win32/browseui/internettoolbar.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
============================================================================== --- branches/shell-experiments/dll/win32/browseui/internettoolbar.cpp [iso-8859-1] (original) +++ branches/shell-experiments/dll/win32/browseui/internettoolbar.cpp [iso-8859-1] Mon May 26 12:26:47 2014 @@ -158,14 +158,14 @@ HRESULT CDockSite::Initialize(IUnknown *containedBand, CInternetToolbar *browser, HWND hwnd, int bandID, int flags) { - CComPtr<IObjectWithSite> site; + CComPtr<IObjectWithSite> child; CComPtr<IOleWindow> oleWindow; CComPtr<IDeskBand> deskBand; TCHAR textBuffer[40]; REBARBANDINFOW bandInfo; HRESULT hResult; - hResult = containedBand->QueryInterface(IID_PPV_ARG(IObjectWithSite, &site)); + hResult = containedBand->QueryInterface(IID_PPV_ARG(IObjectWithSite, &child)); if (FAILED(hResult)) return hResult; hResult = containedBand->QueryInterface(IID_PPV_ARG(IOleWindow, &oleWindow)); @@ -179,7 +179,7 @@ fRebarWindow = hwnd; fBandID = bandID; fFlags = flags; - hResult = site->SetSite(static_cast<IOleWindow *>(this)); + hResult = child->SetSite(static_cast<IOleWindow *>(this)); if (FAILED(hResult)) return hResult; hResult = oleWindow->GetWindow(&fChildWindow); @@ -680,6 +680,8 @@ } } hResult = ReserveBorderSpace(); + + // TODO: refresh view menu? } return S_OK; } @@ -700,11 +702,11 @@ break; case 1: // forward - hResult = SetState(&CLSID_CommonButtons, gForwardCommandID, newValue ? TBSTATE_ENABLED : 0); + hResult = SetState(&CLSID_CommonButtons, IDM_GOTO_FORWARD, newValue ? TBSTATE_ENABLED : 0); break; case 2: // back - hResult = SetState(&CLSID_CommonButtons, gBackCommandID, newValue ? TBSTATE_ENABLED : 0); + hResult = SetState(&CLSID_CommonButtons, IDM_GOTO_BACK, newValue ? TBSTATE_ENABLED : 0); break; } return hResult; @@ -1398,7 +1400,7 @@ ::MapWindowPoints(fToolbarWindow, NULL, reinterpret_cast<POINT *>(&bounds), 2); switch (notifyInfo->iItem) { - case gBackCommandID: + case IDM_GOTO_BACK: newMenu = CreatePopupMenu(); hResult = fSite->QueryInterface(IID_PPV_ARG(IServiceProvider, &serviceProvider)); hResult = serviceProvider->QueryService( @@ -1428,7 +1430,7 @@ hResult = travelLog->Travel(browserService, -selectedItem); DestroyMenu(newMenu); break; - case gForwardCommandID: + case IDM_GOTO_FORWARD: newMenu = CreatePopupMenu(); hResult = fSite->QueryInterface(IID_PPV_ARG(IServiceProvider, &serviceProvider)); hResult = serviceProvider->QueryService(SID_SShellBrowser, IID_PPV_ARG(IBrowserService, &browserService)); @@ -1529,6 +1531,13 @@ default: break; } + + MENUITEMINFO mii; + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_STATE; + mii.fState = fLocked ? MFS_CHECKED : MFS_UNCHECKED; + command = SetMenuItemInfo(contextMenu, IDM_TOOLBARS_LOCKTOOLBARS, FALSE, &mii); + // TODO: use GetSystemMetrics(SM_MENUDROPALIGNMENT) to determine menu alignment command = TrackPopupMenu(contextMenu, TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD, clickLocation.x, clickLocation.y, 0, m_hWnd, NULL); @@ -1588,13 +1597,13 @@ if (nID != 0) { - if (nID == (UINT)gBackCommandID || nID == (UINT)gForwardCommandID) + if (nID == (UINT)IDM_GOTO_BACK || nID == (UINT)IDM_GOTO_FORWARD) { // TODO: Should this call QueryService? hResult = fSite->QueryInterface(IID_PPV_ARG(IBrowserService, &browserService)); hResult = browserService->GetTravelLog(&travelLog); hResult = travelLog->GetToolTipText(browserService, - (nID == (UINT)gBackCommandID) ? TLOG_BACK : TLOG_FORE, + (nID == (UINT)IDM_GOTO_BACK) ? TLOG_BACK : TLOG_FORE, 0, tempString, 299); if (FAILED(hResult)) { Modified: branches/shell-experiments/dll/win32/browseui/internettoolbar.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
============================================================================== --- branches/shell-experiments/dll/win32/browseui/internettoolbar.h [iso-8859-1] (original) +++ branches/shell-experiments/dll/win32/browseui/internettoolbar.h [iso-8859-1] Mon May 26 12:26:47 2014 @@ -20,9 +20,6 @@ #pragma once -static const int gBackCommandID = 0xa121; -static const int gForwardCommandID = 0xa122; -static const int gUpLevelCommandID = 0xa022; static const int gSearchCommandID = 1003; static const int gFoldersCommandID = 1004; static const int gMoveToCommandID = 0x701f; @@ -31,10 +28,7 @@ static const int gUndoCommandID = 0x701b; static const int gViewsCommandID = 0x7031; static const int gStopCommandID = 1010; -static const int gRefreshCommandID = 0xa220; static const int gHomeCommandID = 1012; -static const int gMapDriveCommandID = 41089; -static const int gDisconnectCommandID = 41090; static const int gFavoritesCommandID = 1015; static const int gHistoryCommandID = 1016; static const int gFullScreenCommandID = 1017; @@ -42,7 +36,6 @@ static const int gCutCommandID = 0x7018; static const int gCopyCommandID = 0x7019; static const int gPasteCommandID = 0x701a; -static const int gFolderOptionsCommandID = 41251; class CMenuCallback : public CComObjectRootEx<CComMultiThreadModelNoCS>, @@ -206,9 +199,9 @@ LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); BEGIN_MSG_MAP(CInternetToolbar) - COMMAND_ID_HANDLER(gBackCommandID, OnTravelBack) - COMMAND_ID_HANDLER(gForwardCommandID, OnTravelForward) - COMMAND_ID_HANDLER(gUpLevelCommandID, OnUpLevel) + COMMAND_ID_HANDLER(IDM_GOTO_BACK, OnTravelBack) + COMMAND_ID_HANDLER(IDM_GOTO_FORWARD, OnTravelForward) + COMMAND_ID_HANDLER(IDM_GOTO_UPONELEVEL, OnUpLevel) COMMAND_ID_HANDLER(gSearchCommandID, OnSearch) COMMAND_ID_HANDLER(gFoldersCommandID, OnFolders) COMMAND_RANGE_HANDLER(0x7000, 0x7fff, OnForwardToCommandTarget) Modified: branches/shell-experiments/dll/win32/browseui/toolsband.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
============================================================================== --- branches/shell-experiments/dll/win32/browseui/toolsband.cpp [iso-8859-1] (original) +++ branches/shell-experiments/dll/win32/browseui/toolsband.cpp [iso-8859-1] Mon May 26 12:26:47 2014 @@ -232,9 +232,9 @@ const int numHiddenButtons = 13; TBBUTTON tbButtonsAdd[numShownButtons + numHiddenButtons] = { - { backImageIndex, gBackCommandID, TBSTATE_ENABLED, BTNS_DROPDOWN | BTNS_SHOWTEXT, { 0 }, 0, BtnIdx_Back }, - { forwardImageIndex, gForwardCommandID, TBSTATE_ENABLED, BTNS_DROPDOWN, { 0 }, 0, BtnIdx_Forward }, - { upImageIndex, gUpLevelCommandID, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, BtnIdx_Up }, + { backImageIndex, IDM_GOTO_BACK, TBSTATE_ENABLED, BTNS_DROPDOWN | BTNS_SHOWTEXT, { 0 }, 0, BtnIdx_Back }, + { forwardImageIndex, IDM_GOTO_FORWARD, TBSTATE_ENABLED, BTNS_DROPDOWN, { 0 }, 0, BtnIdx_Forward }, + { upImageIndex, IDM_GOTO_UPONELEVEL, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, BtnIdx_Up }, { 6, -1, TBSTATE_ENABLED, BTNS_SEP }, { searchImageIndex, gSearchCommandID, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_SHOWTEXT, { 0 }, 0, BtnIdx_Search }, { foldersImageIndex, gFoldersCommandID, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_SHOWTEXT, { 0 }, 0, BtnIdx_Folders }, @@ -247,10 +247,10 @@ { viewsImageIndex, gViewsCommandID, TBSTATE_ENABLED, BTNS_WHOLEDROPDOWN, { 0 }, 0, BtnIdx_Views }, { 0, gStopCommandID, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, BtnIdx_Stop }, - { 0, gRefreshCommandID, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, BtnIdx_Refresh }, + { 0, IDM_VIEW_REFRESH, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, BtnIdx_Refresh }, { 0, gHomeCommandID, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, BtnIdx_Home }, - { mapDriveImageIndex, gMapDriveCommandID, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, BtnIdx_MapDrive }, - { disconnectImageIndex, gDisconnectCommandID, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, BtnIdx_Disconnect }, + { mapDriveImageIndex, IDM_TOOLS_MAPNETWORKDRIVE, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, BtnIdx_MapDrive }, + { disconnectImageIndex, IDM_TOOLS_DISCONNECTNETWORKDRIVE, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, BtnIdx_Disconnect }, { favoritesImageIndex, gFavoritesCommandID, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_SHOWTEXT, { 0 }, 0, BtnIdx_Favorites }, { 0, gHistoryCommandID, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, BtnIdx_History }, { 0, gFullScreenCommandID, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, BtnIdx_FullScreen }, @@ -258,11 +258,10 @@ { cutImageIndex, gCutCommandID, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, BtnIdx_Cut }, { copyImageIndex, gCopyCommandID, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, BtnIdx_Copy }, { pasteImageIndex, gPasteCommandID, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, BtnIdx_Paste }, - { folderOptionsImageIndex, gFolderOptionsCommandID, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, BtnIdx_FolderOptions }, + { folderOptionsImageIndex, IDM_TOOLS_FOLDEROPTIONS, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, BtnIdx_FolderOptions }, }; -HRESULT STDMETHODCALLTYPE CToolsBand::SetSite(IUnknown* pUnkSite) -{ +HRESULT STDMETHODCALLTYPE CToolsBand::SetSite(IUnknown* pUnkSite){ HWND parentWindow; IOleWindow *oleWindow; HWND toolbar; Modified: branches/shell-experiments/dll/win32/shell32/shlview.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
============================================================================== --- branches/shell-experiments/dll/win32/shell32/shlview.cpp [iso-8859-1] (original) +++ branches/shell-experiments/dll/win32/shell32/shlview.cpp [iso-8859-1] Mon May 26 12:26:47 2014 @@ -922,6 +922,8 @@ LRESULT CDefView::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) { + if (m_hMenu) + DestroyMenu(m_hMenu); RevokeDragDrop(m_hWnd); SHChangeNotifyDeregister(m_hNotify); bHandled = FALSE;
10 years, 7 months
1
0
0
0
[akhaldi] 63460: [MSVCRT] * Zap some exports that do not exist in native. * Group the ones that we're forced to keep (only temporarily right now) for Gecko. CORE-8174
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon May 26 09:57:36 2014 New Revision: 63460 URL:
http://svn.reactos.org/svn/reactos?rev=63460&view=rev
Log: [MSVCRT] * Zap some exports that do not exist in native. * Group the ones that we're forced to keep (only temporarily right now) for Gecko. CORE-8174 Modified: trunk/reactos/dll/win32/msvcrt/msvcrt.spec Modified: trunk/reactos/dll/win32/msvcrt/msvcrt.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msvcrt/msvcrt.sp…
============================================================================== --- trunk/reactos/dll/win32/msvcrt/msvcrt.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msvcrt/msvcrt.spec [iso-8859-1] Mon May 26 09:57:36 2014 @@ -212,13 +212,11 @@ @ extern __unguarded_readlc_active @ extern __wargv __wargv @ cdecl __wcserror(wstr) -@ cdecl __wcserror_s(ptr long wstr) @ cdecl __wgetmainargs(ptr ptr ptr long ptr) @ extern __winitenv @ cdecl _abnormal_termination() # stub _abs64 @ cdecl _access(str long) -@ cdecl _access_s(str long) @ extern _acmdln @ stdcall -arch=i386 _adj_fdiv_m16i(long) @ stdcall -arch=i386 _adj_fdiv_m32(long) @@ -266,7 +264,6 @@ @ extern _commode @ cdecl _control87(long long) @ cdecl _controlfp(long long) -@ cdecl _controlfp_s(ptr long long) @ cdecl _copysign( double double ) @ varargs _cprintf(str) @ cdecl _cputs(str) @@ -274,9 +271,7 @@ @ cdecl _creat(str long) @ varargs _cscanf(str) @ cdecl _ctime32(ptr) -@ cdecl _ctime32_s(str long ptr) @ cdecl _ctime64(ptr) -@ cdecl _ctime64_s(str long ptr) @ extern _ctype @ cdecl _cwait(ptr long long) @ varargs _cwprintf(wstr) @@ -379,9 +374,7 @@ @ cdecl _getws(ptr) @ cdecl -i386 _global_unwind2(ptr) @ cdecl _gmtime32(ptr) -@ cdecl _gmtime32_s(ptr ptr) @ cdecl _gmtime64(ptr) -@ cdecl _gmtime64_s(ptr ptr) @ cdecl _heapadd(ptr long) @ cdecl _heapchk() @ cdecl _heapmin() @@ -390,9 +383,7 @@ @ cdecl _heapwalk(ptr) @ cdecl _hypot(double double) @ cdecl _i64toa(long long ptr long) -@ cdecl _i64toa_s(long long ptr long long) @ cdecl _i64tow(long long ptr long) -@ cdecl _i64tow_s(long long ptr long long) @ cdecl _initterm(ptr ptr) @ cdecl _initterm_e(ptr ptr) @ cdecl -arch=i386 _inp(long) MSVCRT__inp @@ -434,9 +425,7 @@ @ cdecl _ismbstrail(ptr ptr) @ cdecl _isnan(double) @ cdecl _itoa(long ptr long) -@ cdecl _itoa_s(long ptr long long) @ cdecl _itow(long ptr long) -@ cdecl _itow_s(long ptr long long) @ cdecl _j0(double) @ cdecl _j1(double) @ cdecl _jn(long double) @@ -446,9 +435,7 @@ @ cdecl -i386 _local_unwind2(ptr long) @ cdecl -i386 _local_unwind4(ptr ptr long) @ cdecl _localtime32(ptr) -@ cdecl _localtime32_s(ptr ptr) @ cdecl _localtime64(ptr) -@ cdecl _localtime64_s(ptr ptr) @ cdecl _lock(long) @ cdecl _locking(long long long) @ cdecl _logb(double) @@ -459,11 +446,8 @@ @ cdecl _lseek(long long long) @ cdecl -ret64 _lseeki64(long double long) @ cdecl _ltoa(long ptr long) -@ cdecl _ltoa_s(long ptr long long) @ cdecl _ltow(long ptr long) -@ cdecl _ltow_s(long ptr long long) @ cdecl _makepath(ptr str str str str) -@ cdecl _makepath_s(ptr long str str str str) @ cdecl _mbbtombc(long) @ cdecl _mbbtype(long long) @ extern _mbcasemap @@ -496,7 +480,6 @@ @ cdecl _mbsnbcnt(ptr long) @ cdecl _mbsnbcoll(str str long) @ cdecl _mbsnbcpy(ptr str long) -@ cdecl _mbsnbcpy_s(ptr long str long) @ cdecl _mbsnbicmp(str str long) @ cdecl _mbsnbicoll(str str long) @ cdecl _mbsnbset(str long long) @@ -567,7 +550,6 @@ # stub _scprintf # stub _scwprintf @ cdecl _searchenv(str str ptr) -@ cdecl _searchenv_s(str str ptr long) @ stdcall -i386 _seh_longjmp_unwind4(ptr) @ stdcall -i386 _seh_longjmp_unwind(ptr) # stub _set_SSE2_enable @@ -585,13 +567,10 @@ @ cdecl _setsystime(ptr long) @ cdecl _sleep(long) @ varargs _snprintf(ptr long str) -@ varargs _snprintf_s(ptr long long ptr) # stub _snscanf @ varargs _snwprintf(ptr long wstr) -@ varargs _snwprintf_s(ptr long long ptr) # stub _snwscanf @ varargs _sopen(str long long) -@ cdecl _sopen_s(ptr str long long long) @ varargs _spawnl(long str str) @ varargs _spawnle(long str str) @ varargs _spawnlp(long str str) @@ -601,7 +580,6 @@ @ cdecl _spawnvp(long str ptr) @ cdecl _spawnvpe(long str ptr ptr) @ cdecl _splitpath(str ptr ptr ptr ptr) -@ cdecl _splitpath_s(str ptr long ptr long ptr long ptr long) @ cdecl _stat(str ptr) @ cdecl _stat64(str ptr) @ cdecl _stati64(str ptr) @@ -638,9 +616,7 @@ @ extern _tzname @ cdecl _tzset() @ cdecl _ui64toa(long long ptr long) -@ cdecl _ui64toa_s(long long ptr long long) @ cdecl _ui64tow(long long ptr long) -@ cdecl _ui64tow_s(long long ptr long long) @ cdecl _ultoa(long ptr long) @ cdecl _ultow(long ptr long) @ cdecl _umask(long) @@ -657,13 +633,10 @@ @ cdecl _vscwprintf(wstr ptr) @ cdecl _vsnprintf(ptr long str ptr) @ cdecl _vsnprintf_c(ptr long str ptr) _vsnprintf -@ cdecl _vsnprintf_s(ptr long long str ptr) @ cdecl _vsnwprintf(ptr long wstr ptr) -@ cdecl _vsnwprintf_s(ptr long long wstr ptr) @ cdecl _vsprintf_p(ptr long str ptr) @ cdecl _vswprintf_c(ptr long wstr ptr) _vsnwprintf @ cdecl _waccess(wstr long) -@ cdecl _waccess_s(wstr long) @ cdecl _wasctime(ptr) @ cdecl _wchdir(wstr) @ cdecl _wchmod(wstr long) @@ -671,11 +644,9 @@ @ cdecl _wcreat(wstr long) @ cdecl _wcsdup(wstr) @ cdecl _wcserror(long) -@ cdecl _wcserror_s(ptr long long) @ cdecl _wcsicmp(wstr wstr) @ cdecl _wcsicoll(wstr wstr) @ cdecl _wcslwr(wstr) -@ cdecl _wcslwr_s(wstr long) @ cdecl _wcsncoll(wstr wstr long) @ cdecl _wcsnicmp(wstr wstr long) @ cdecl _wcsnicoll(wstr wstr long) @@ -686,7 +657,6 @@ @ cdecl _wcstombs_l(ptr ptr long ptr) @ cdecl _wcstoui64(wstr ptr long) @ cdecl _wcsupr(wstr) -@ cdecl _wcsupr_s(wstr long) @ cdecl _wctime(ptr) @ cdecl _wctime32(ptr) @ cdecl _wctime64(ptr) @@ -708,7 +678,6 @@ # stub _wfindnext64 @ cdecl _wfindnexti64(long ptr) @ cdecl _wfopen(wstr wstr) -@ cdecl _wfopen_s(ptr wstr wstr) @ cdecl _wfreopen(wstr wstr ptr) @ cdecl _wfsopen(wstr wstr long) @ cdecl _wfullpath(ptr wstr long) @@ -719,7 +688,6 @@ @ extern _winminor @ extern _winver @ cdecl _wmakepath(ptr wstr wstr wstr wstr) -@ cdecl _wmakepath_s(ptr long wstr wstr wstr wstr) @ cdecl _wmkdir(wstr) @ cdecl _wmktemp(wstr) @ varargs _wopen(wstr long) @@ -734,7 +702,6 @@ @ cdecl _wsearchenv(wstr wstr ptr) @ cdecl _wsetlocale(long wstr) @ varargs _wsopen(wstr long long) -@ cdecl _wsopen_s(ptr wstr long long long) @ varargs _wspawnl(long wstr wstr) @ varargs _wspawnle(long wstr wstr) @ varargs _wspawnlp(long wstr wstr) @@ -744,7 +711,6 @@ @ cdecl _wspawnvp(long wstr ptr) @ cdecl _wspawnvpe(long wstr ptr ptr) @ cdecl _wsplitpath(wstr ptr ptr ptr ptr) -@ cdecl _wsplitpath_s(wstr ptr long ptr long ptr long ptr long) @ cdecl _wstat(wstr ptr) @ cdecl _wstati64(wstr ptr) @ cdecl _wstat64(wstr ptr) @@ -804,9 +770,7 @@ @ cdecl fmod(double double) @ cdecl -arch=x86_64 fmodf(long) @ cdecl fopen(str str) -@ cdecl fopen_s(ptr str str) @ varargs fprintf(ptr str) -@ varargs fprintf_s(ptr str) @ cdecl fputc(long ptr) @ cdecl fputs(str ptr) @ cdecl fputwc(long ptr) @@ -820,7 +784,6 @@ @ cdecl fsetpos(ptr ptr) @ cdecl ftell(ptr) @ varargs fwprintf(ptr wstr) -@ varargs fwprintf_s(ptr wstr) @ cdecl fwrite(ptr long long ptr) @ varargs fwscanf(ptr wstr) @ cdecl getc(ptr) @@ -873,9 +836,7 @@ @ cdecl memchr(ptr long long) @ cdecl memcmp(ptr ptr long) @ cdecl memcpy(ptr ptr long) -@ cdecl memcpy_s(ptr long ptr long) memmove_s @ cdecl memmove(ptr ptr long) -@ cdecl memmove_s(ptr long ptr long) @ cdecl memset(ptr long long) @ cdecl mktime(ptr) @ cdecl modf(double ptr) @@ -883,7 +844,6 @@ @ cdecl pow(double double) @ cdecl -arch=x86_64 powf(long) @ varargs printf(str) -@ varargs printf_s(str) @ cdecl putc(long ptr) @ cdecl putchar(long) @ cdecl puts(str) @@ -892,7 +852,6 @@ @ cdecl qsort(ptr long long ptr) @ cdecl raise(long) @ cdecl rand() -@ cdecl rand_s(ptr) @ cdecl realloc(ptr long) @ cdecl remove(str) @ cdecl rename(str str) @@ -907,27 +866,22 @@ @ cdecl -arch=x86_64 sinf(long) @ cdecl sinh(double) @ varargs sprintf(ptr str) -@ varargs sprintf_s(ptr long str) @ cdecl sqrt(double) @ cdecl -arch=x86_64 sqrtf(long) @ cdecl srand(long) @ varargs sscanf(str str) @ cdecl strcat(str str) -@ cdecl strcat_s(str long str) @ cdecl strchr(str long) @ cdecl strcmp(str str) @ cdecl strcoll(str str) @ cdecl strcpy(ptr str) -@ cdecl strcpy_s(ptr long str) @ cdecl strcspn(str str) @ cdecl strerror(long) -@ cdecl strerror_s(ptr long long) @ cdecl strftime(str long str ptr) @ cdecl strlen(str) @ cdecl strncat(str str long) @ cdecl strncmp(str str long) @ cdecl strncpy(ptr str long) -@ cdecl strncpy_s(ptr long str long) @ cdecl strnlen(str long) @ cdecl strpbrk(str str) @ cdecl strrchr(str long) @@ -935,12 +889,10 @@ @ cdecl strstr(str str) @ cdecl strtod(str ptr) @ cdecl strtok(str str) -@ cdecl strtok_s(ptr str ptr) @ cdecl strtol(str ptr long) @ cdecl strtoul(str ptr long) @ cdecl strxfrm(ptr str long) @ varargs swprintf(ptr wstr) -@ varargs swprintf_s(ptr long wstr) @ varargs swscanf(wstr wstr) @ cdecl system(str) @ cdecl tan(double) @@ -955,32 +907,22 @@ @ cdecl ungetc(long ptr) @ cdecl ungetwc(long ptr) @ cdecl vfprintf(ptr str ptr) -@ cdecl vfprintf_s(ptr str ptr) @ cdecl vfwprintf(ptr wstr ptr) -@ cdecl vfwprintf_s(ptr wstr ptr) @ cdecl vprintf(str ptr) -@ cdecl vprintf_s(str ptr) @ cdecl vsprintf(ptr str ptr) -@ cdecl vsprintf_s(ptr long str ptr) @ cdecl vswprintf(ptr wstr ptr) -@ cdecl vswprintf_s(ptr long wstr ptr) @ cdecl vwprintf(wstr ptr) -@ cdecl vwprintf_s(wstr ptr) @ cdecl wcscat(wstr wstr) -@ cdecl wcscat_s(wstr long wstr) @ cdecl wcschr(wstr long) @ cdecl wcscmp(wstr wstr) @ cdecl wcscoll(wstr wstr) @ cdecl wcscpy(ptr wstr) -@ cdecl wcscpy_s(ptr long wstr) @ cdecl wcscspn(wstr wstr) @ cdecl wcsftime(ptr long wstr ptr) @ cdecl wcslen(wstr) @ cdecl wcsncat(wstr wstr long) -@ cdecl wcsncat_s(wstr long wstr long) @ cdecl wcsncmp(wstr wstr long) @ cdecl wcsncpy(ptr wstr long) -@ cdecl wcsncpy_s(ptr long wstr long) @ cdecl wcsnlen(wstr long) @ cdecl wcspbrk(wstr wstr) @ cdecl wcsrchr(wstr long) @@ -988,16 +930,24 @@ @ cdecl wcsstr(wstr wstr) @ cdecl wcstod(wstr ptr) @ cdecl wcstok(wstr wstr) -@ cdecl wcstok_s(ptr wstr ptr) @ cdecl wcstol(wstr ptr long) @ cdecl wcstombs(ptr ptr long) @ cdecl wcstoul(wstr ptr long) @ cdecl wcsxfrm(ptr wstr long) @ cdecl wctomb(ptr long) @ varargs wprintf(wstr) -@ varargs wprintf_s(wstr) @ varargs wscanf(wstr) # Functions not exported in native dll: @ cdecl _get_invalid_parameter_handler() @ cdecl _set_invalid_parameter_handler(ptr) +# Gecko +@ cdecl _controlfp_s(ptr long long) +@ varargs _snwprintf_s(ptr long long ptr) +@ cdecl _vsnprintf_s(ptr long long str ptr) +@ cdecl _vsnwprintf_s(ptr long long wstr ptr) +@ cdecl _wcslwr_s(wstr long) +@ cdecl _wfopen_s(ptr wstr wstr) +@ cdecl fopen_s(ptr str str) +@ cdecl strtok_s(ptr str ptr) +@ varargs swprintf_s(ptr long wstr)
10 years, 7 months
1
0
0
0
[akhaldi] 63459: [INCLUDE/CRT] * Do not define __STDC_SECURE_LIB__ and co, our msvcrt won't provide the related exports. CORE-8174
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon May 26 09:55:29 2014 New Revision: 63459 URL:
http://svn.reactos.org/svn/reactos?rev=63459&view=rev
Log: [INCLUDE/CRT] * Do not define __STDC_SECURE_LIB__ and co, our msvcrt won't provide the related exports. CORE-8174 Modified: trunk/reactos/include/crt/crtdefs.h Modified: trunk/reactos/include/crt/crtdefs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/crtdefs.h?rev=…
============================================================================== --- trunk/reactos/include/crt/crtdefs.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/crtdefs.h [iso-8859-1] Mon May 26 09:55:29 2014 @@ -237,9 +237,11 @@ #define _TRUNCATE ((size_t)-1) #endif +#ifndef __REACTOS__ #define __STDC_SECURE_LIB__ 200411L #define __GOT_SECURE_LIB__ __STDC_SECURE_LIB__ #define _SECURECRT_FILL_BUFFER_PATTERN 0xFD +#endif /** Type definitions *********************************************************/
10 years, 7 months
1
0
0
0
[akhaldi] 63458: [SERVMAN] * Use StringCchCopy instead of {_t, w}cscpy_s as these shouldn't be exported. CORE-8174
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon May 26 09:53:49 2014 New Revision: 63458 URL:
http://svn.reactos.org/svn/reactos?rev=63458&view=rev
Log: [SERVMAN] * Use StringCchCopy instead of {_t,w}cscpy_s as these shouldn't be exported. CORE-8174 Modified: trunk/reactos/base/applications/mscutils/servman/precomp.h trunk/reactos/base/applications/mscutils/servman/propsheet_depends.c trunk/reactos/base/applications/mscutils/servman/query.c trunk/reactos/base/applications/mscutils/servman/stop_dependencies.c Modified: trunk/reactos/base/applications/mscutils/servman/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/precomp.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/servman/precomp.h [iso-8859-1] Mon May 26 09:53:49 2014 @@ -14,6 +14,7 @@ #include <wincon.h> #include <tchar.h> #include <shlobj.h> +#include <strsafe.h> #include "resource.h" Modified: trunk/reactos/base/applications/mscutils/servman/propsheet_depends.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/propsheet_depends.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/servman/propsheet_depends.c [iso-8859-1] Mon May 26 09:53:49 2014 @@ -60,7 +60,7 @@ dwSize * sizeof(TCHAR)); if (lpName) { - _tcscpy_s(lpName, dwSize, lpServiceName); + StringCchCopy(lpName, dwSize, lpServiceName); tvi.lParam = (LPARAM)lpName; } } Modified: trunk/reactos/base/applications/mscutils/servman/query.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/query.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/servman/query.c [iso-8859-1] Mon May 26 09:53:49 2014 @@ -183,9 +183,9 @@ dwSize * sizeof(TCHAR)); if (lpDescription) { - _tcscpy_s(lpDescription, - dwSize, - pServiceDescription->lpDescription); + StringCchCopy(lpDescription, + dwSize, + pServiceDescription->lpDescription); } } } Modified: trunk/reactos/base/applications/mscutils/servman/stop_dependencies.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/stop_dependencies.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/servman/stop_dependencies.c [iso-8859-1] Mon May 26 09:53:49 2014 @@ -32,9 +32,9 @@ if (lpNewList) { /* Copy the service name */ - wcscpy_s(lpNewList, - dwToAddSize, - lpServiceToAdd); + StringCchCopy(lpNewList, + dwToAddSize, + lpServiceToAdd); /* Add the double null char */ lpNewList[dwToAddSize - 1] = L'\0'; @@ -68,9 +68,9 @@ if (lpNewList) { /* Copy the service name */ - wcscpy_s(&lpNewList[dwCurSize - 1], - dwToAddSize, - lpServiceToAdd); + StringCchCopy(&lpNewList[dwCurSize - 1], + dwToAddSize, + lpServiceToAdd); /* Add the double null char */ lpNewList[dwCurSize + dwToAddSize - 1] = L'\0';
10 years, 7 months
1
0
0
0
[jimtabor] 63457: [Win32k] - Make minimizing windows in MDI application usable, more fixing is needed. ReactOS suffers from wine poisoning. Need more Vodka! See wine Bug 1719.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon May 26 04:36:58 2014 New Revision: 63457 URL:
http://svn.reactos.org/svn/reactos?rev=63457&view=rev
Log: [Win32k] - Make minimizing windows in MDI application usable, more fixing is needed. ReactOS suffers from wine poisoning. Need more Vodka! See wine Bug 1719. Modified: trunk/reactos/win32ss/user/ntuser/winpos.c Modified: trunk/reactos/win32ss/user/ntuser/winpos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winpos…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] Mon May 26 04:36:58 2014 @@ -362,134 +362,6 @@ if (WndTo) UserDerefObjectCo(WndTo); } -UINT -FASTCALL -co_WinPosArrangeIconicWindows(PWND parent) -{ - RECTL rectParent; - INT i, x, y, xspacing, yspacing, sx, sy; - HWND *List = IntWinListChildren(parent); - - ASSERT_REFS_CO(parent); - - /* Check if we found any children */ - if(List == NULL) - { - return 0; - } - - IntGetClientRect( parent, &rectParent ); - // FIXME: Support gspv.mm.iArrange. - x = rectParent.left; - y = rectParent.bottom; - - xspacing = (UserGetSystemMetrics(SM_CXMINSPACING)/2)+UserGetSystemMetrics(SM_CXBORDER); - yspacing = (UserGetSystemMetrics(SM_CYMINSPACING)/2)+UserGetSystemMetrics(SM_CYBORDER); - - //ERR("X:%d Y:%d XS:%d YS:%d\n",x,y,xspacing,yspacing); - - for(i = 0; List[i]; i++) - { - PWND Child; - - if (!(Child = ValidateHwndNoErr(List[i]))) - continue; - - if((Child->style & WS_MINIMIZE) != 0 ) - { - USER_REFERENCE_ENTRY Ref; - UserRefObjectCo(Child, &Ref); - - sx = x + UserGetSystemMetrics(SM_CXBORDER); - sy = y - yspacing - UserGetSystemMetrics(SM_CYBORDER); - - co_WinPosSetWindowPos( Child, 0, sx, sy, 0, 0, - SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE ); - - Child->InternalPos.IconPos.x = sx; - Child->InternalPos.IconPos.y = sy; - Child->InternalPos.flags |= WPF_MININIT; - Child->InternalPos.flags &= ~WPF_SETMINPOSITION; - - UserDerefObjectCo(Child); - - if (x <= (rectParent.right - UserGetSystemMetrics(SM_CXMINSPACING))) - x += xspacing; - else - { - x = rectParent.left; - y -= yspacing; - } - //ERR("X:%d Y:%d\n",x,y); - } - } - ExFreePoolWithTag(List, USERTAG_WINDOWLIST); - return yspacing; -} - -static VOID FASTCALL -WinPosFindIconPos(PWND Window, POINT *Pos) -{ - RECT rectParent; - PWND pwndChild, pwndParent; - int x, y, xspacing, yspacing; - - pwndParent = Window->spwndParent; - if (pwndParent == UserGetDesktopWindow()) - { - //ERR("Parent is Desktop, Min off screen!\n"); - /* ReactOS doesn't support iconic minimize to desktop */ - Pos->x = Pos->y = -32000; - Window->InternalPos.flags |= WPF_MININIT; - Window->InternalPos.IconPos.x = Pos->x; - Window->InternalPos.IconPos.y = Pos->y; - return; - } - - IntGetClientRect( pwndParent, &rectParent ); - // FIXME: Support gspv.mm.iArrange. - x = rectParent.left; - y = rectParent.bottom; - - xspacing = (UserGetSystemMetrics(SM_CXMINSPACING)/2)+UserGetSystemMetrics(SM_CXBORDER); - yspacing = (UserGetSystemMetrics(SM_CYMINSPACING)/2)+UserGetSystemMetrics(SM_CYBORDER); - - //ERR("X:%d Y:%d XS:%d YS:%d\n",Pos->x,Pos->y,xspacing,yspacing); - - // Set to default position when minimized. - Pos->x = x + UserGetSystemMetrics(SM_CXBORDER); - Pos->y = y - yspacing - UserGetSystemMetrics(SM_CYBORDER); - - for (pwndChild = pwndParent->spwndChild; pwndChild; pwndChild = pwndChild->spwndNext) - { - if (pwndChild == Window) continue; - - if (pwndChild->style & WS_VISIBLE) - { - //ERR("Loop!\n"); - continue; - } - //ERR("Pos Child X %d Y %d!\n", pwndChild->InternalPos.IconPos.x, pwndChild->InternalPos.IconPos.y); - if ( pwndChild->InternalPos.IconPos.x == Pos->x && - pwndChild->InternalPos.IconPos.y == Pos->y ) - { - if (x <= rectParent.right - UserGetSystemMetrics(SM_CXMINSPACING)) - x += xspacing; - else - { - x = rectParent.left; - y -= yspacing; - } - Pos->x = x + UserGetSystemMetrics(SM_CXBORDER); - Pos->y = y - yspacing - UserGetSystemMetrics(SM_CYBORDER); - } - } - Window->InternalPos.IconPos.x = Pos->x; - Window->InternalPos.IconPos.y = Pos->y; - Window->InternalPos.flags |= WPF_MININIT; - //ERR("Position is set! X:%d Y:%d\n",Pos->x,Pos->y); - return; -} VOID FASTCALL WinPosInitInternalPos(PWND Wnd, RECTL *RestoreRect) @@ -738,6 +610,118 @@ Wnd->InternalPos.flags |= WPF_RESTORETOMAXIMIZED; } return TRUE; +} + +UINT +FASTCALL +co_WinPosArrangeIconicWindows(PWND parent) +{ + RECTL rectParent; + PWND Child; + INT x, y, xspacing, yspacing, sx, sy; + + ASSERT_REFS_CO(parent); + + IntGetClientRect( parent, &rectParent ); + // FIXME: Support gspv.mm.iArrange. + x = rectParent.left; + y = rectParent.bottom; + + xspacing = (UserGetSystemMetrics(SM_CXMINSPACING)/2)+UserGetSystemMetrics(SM_CXBORDER); + yspacing = (UserGetSystemMetrics(SM_CYMINSPACING)/2)+UserGetSystemMetrics(SM_CYBORDER); + + Child = parent->spwndChild; + while(Child) + { + if((Child->style & WS_MINIMIZE) != 0 ) + { + USER_REFERENCE_ENTRY Ref; + UserRefObjectCo(Child, &Ref); + + sx = x + UserGetSystemMetrics(SM_CXBORDER); + sy = y - yspacing - UserGetSystemMetrics(SM_CYBORDER); + + Child->InternalPos.IconPos.x = sx; + Child->InternalPos.IconPos.y = sy; + Child->InternalPos.flags |= WPF_MININIT; + + co_WinPosSetWindowPos( Child, 0, sx, sy, 0, 0, SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS | SWP_ASYNCWINDOWPOS); + + UserDerefObjectCo(Child); + + if (x <= rectParent.right - xspacing) + x += xspacing; + else + { + x = rectParent.left; + y -= yspacing; + } + } + Child = Child->spwndNext; + } + return yspacing; +} + +static VOID FASTCALL +WinPosFindIconPos(PWND Window, POINT *Pos) +{ + RECT rectParent; + PWND pwndChild, pwndParent; + int x, y, xspacing, yspacing; + + pwndParent = Window->spwndParent; + if (pwndParent == UserGetDesktopWindow()) + { + //ERR("Parent is Desktop, Min off screen!\n"); + /* ReactOS doesn't support iconic minimize to desktop */ + Pos->x = Pos->y = -32000; + Window->InternalPos.flags |= WPF_MININIT; + Window->InternalPos.IconPos.x = Pos->x; + Window->InternalPos.IconPos.y = Pos->y; + return; + } + + IntGetClientRect( pwndParent, &rectParent ); + // FIXME: Support gspv.mm.iArrange. + x = rectParent.left; + y = rectParent.bottom; + + xspacing = (UserGetSystemMetrics(SM_CXMINSPACING)/2)+UserGetSystemMetrics(SM_CXBORDER); + yspacing = (UserGetSystemMetrics(SM_CYMINSPACING)/2)+UserGetSystemMetrics(SM_CYBORDER); + + // Set to default position when minimized. + Pos->x = x + UserGetSystemMetrics(SM_CXBORDER); + Pos->y = y - yspacing - UserGetSystemMetrics(SM_CYBORDER); + + for (pwndChild = pwndParent->spwndChild; pwndChild; pwndChild = pwndChild->spwndNext) + { + if (pwndChild == Window) continue; + + if ((pwndChild->style & (WS_VISIBLE|WS_MINIMIZE)) != (WS_VISIBLE|WS_MINIMIZE) ) + { + continue; + } + + if ( pwndChild->InternalPos.IconPos.x != Pos->x && pwndChild->InternalPos.IconPos.y != Pos->y ) + { + break; + } + if (x <= rectParent.right - xspacing) + x += xspacing; + else + { + x = rectParent.left; + y -= yspacing; + } + Pos->x = x + UserGetSystemMetrics(SM_CXBORDER); + Pos->y = y - yspacing - UserGetSystemMetrics(SM_CYBORDER); + } + + Window->InternalPos.IconPos.x = Pos->x; + Window->InternalPos.IconPos.y = Pos->y; + Window->InternalPos.flags |= WPF_MININIT; + TRACE("Position is set! X:%d Y:%d\n",Pos->x,Pos->y); + return; } UINT FASTCALL @@ -793,8 +777,7 @@ old_style = IntSetStyle( Wnd, WS_MINIMIZE, WS_MAXIMIZE ); - co_UserRedrawWindow(Wnd, NULL, 0, RDW_VALIDATE | RDW_NOERASE | - RDW_NOINTERNALPAINT); + co_UserRedrawWindow(Wnd, NULL, 0, RDW_VALIDATE | RDW_NOERASE | RDW_NOINTERNALPAINT); if (!(Wnd->InternalPos.flags & WPF_SETMINPOSITION)) Wnd->InternalPos.flags &= ~WPF_MININIT; @@ -808,10 +791,8 @@ UserGetSystemMetrics(SM_CYMINIMIZED)); */ RECTL_vSetRect(NewPos, wpl.ptMinPosition.x, wpl.ptMinPosition.y, -// wpl.ptMinPosition.x + UserGetSystemMetrics(SM_CXMINIMIZED), -// wpl.ptMinPosition.y + UserGetSystemMetrics(SM_CYMINIMIZED)); - UserGetSystemMetrics(SM_CXMINIMIZED), - UserGetSystemMetrics(SM_CYMINIMIZED)); + wpl.ptMinPosition.x + UserGetSystemMetrics(SM_CXMINIMIZED), + wpl.ptMinPosition.y + UserGetSystemMetrics(SM_CYMINIMIZED)); SwpFlags |= SWP_NOCOPYBITS; break; } @@ -849,6 +830,7 @@ old_style = IntSetStyle( Wnd, 0, WS_MINIMIZE | WS_MAXIMIZE ); if (old_style & WS_MINIMIZE) { + if (Wnd->InternalPos.flags & WPF_RESTORETOMAXIMIZED) { co_WinPosGetMinMaxInfo(Wnd, &Size, &wpl.ptMaxPosition, NULL, NULL); @@ -1302,8 +1284,8 @@ { if (Window->style & WS_MINIMIZE) { - WindowRect->right = WindowRect->left + UserGetSystemMetrics(SM_CXICON); - WindowRect->bottom = WindowRect->top + UserGetSystemMetrics(SM_CYICON); + WindowRect->right = WindowRect->left + (UserGetSystemMetrics(SM_CXMINSPACING)/2)+UserGetSystemMetrics(SM_CXBORDER); + WindowRect->bottom = WindowRect->top + (UserGetSystemMetrics(SM_CYMINSPACING)/2)+UserGetSystemMetrics(SM_CYBORDER); } else { @@ -2181,10 +2163,10 @@ LONG style; PWND Parent; PTHREADINFO pti; - // HRGN VisibleRgn; - //ERR("co_WinPosShowWindow START\n"); + //HRGN VisibleRgn; BOOL ShowOwned = FALSE; ASSERT_REFS_CO(Wnd); + //ERR("co_WinPosShowWindow START\n"); pti = PsGetCurrentThreadWin32Thread(); WasVisible = (Wnd->style & WS_VISIBLE) != 0;
10 years, 7 months
1
0
0
0
[jimtabor] 63456: [Win32k] - Use desktop system menu.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon May 26 03:08:06 2014 New Revision: 63456 URL:
http://svn.reactos.org/svn/reactos?rev=63456&view=rev
Log: [Win32k] - Use desktop system menu. Modified: trunk/reactos/win32ss/user/ntuser/desktop.h trunk/reactos/win32ss/user/ntuser/winsta.c trunk/reactos/win32ss/user/ntuser/winsta.h Modified: trunk/reactos/win32ss/user/ntuser/desktop.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/deskto…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/desktop.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/desktop.h [iso-8859-1] Mon May 26 03:08:06 2014 @@ -10,6 +10,11 @@ /* Pointer to the associated window station. */ struct _WINSTATION_OBJECT *rpwinstaParent; DWORD dwDTFlags; + DWORD_PTR dwDesktopId; + PMENU spmenuSys; + PMENU spmenuDialogSys; + PMENU spmenuHScroll; + PMENU spmenuVScroll; PWND spwndForeground; PWND spwndTray; PWND spwndMessage; Modified: trunk/reactos/win32ss/user/ntuser/winsta.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winsta…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/winsta.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/winsta.c [iso-8859-1] Mon May 26 03:08:06 2014 @@ -454,7 +454,6 @@ KeInitializeSpinLock(&WindowStationObject->Lock); InitializeListHead(&WindowStationObject->DesktopListHead); Status = RtlCreateAtomTable(37, &WindowStationObject->AtomTable); - WindowStationObject->SystemMenuTemplate = (HANDLE)0; WindowStationObject->Name = WindowStationName; WindowStationObject->dwSessionId = NtCurrentPeb()->SessionId; Modified: trunk/reactos/win32ss/user/ntuser/winsta.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winsta…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/winsta.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/winsta.h [iso-8859-1] Mon May 26 03:08:06 2014 @@ -15,7 +15,6 @@ UNICODE_STRING Name; LIST_ENTRY DesktopListHead; PRTL_ATOM_TABLE AtomTable; - HANDLE SystemMenuTemplate; HANDLE ShellWindow; HANDLE ShellListView;
10 years, 7 months
1
0
0
0
[jimtabor] 63455: [Win32k] - Fix G/SetSystemMenu. Move code into menu.c. - Add loading for MDI system menu.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon May 26 01:26:45 2014 New Revision: 63455 URL:
http://svn.reactos.org/svn/reactos?rev=63455&view=rev
Log: [Win32k] - Fix G/SetSystemMenu. Move code into menu.c. - Add loading for MDI system menu. Modified: trunk/reactos/win32ss/include/ntuser.h trunk/reactos/win32ss/user/ntuser/menu.c trunk/reactos/win32ss/user/ntuser/menu.h trunk/reactos/win32ss/user/ntuser/window.c trunk/reactos/win32ss/user/user32/windows/menu.c Modified: trunk/reactos/win32ss/include/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/include/ntuser.h?r…
============================================================================== --- trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] Mon May 26 01:26:45 2014 @@ -345,6 +345,8 @@ #define MNF_DESKTOPMN 0x0040 #define MNF_SYSDESKMN 0x0080 #define MNF_SYSSUBMENU 0x0100 +// Hack +#define MNF_SYSMENU 0x0200 typedef struct tagMENU { Modified: trunk/reactos/win32ss/user/ntuser/menu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/menu.c…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] Mon May 26 01:26:45 2014 @@ -915,7 +915,7 @@ } } - if( !(MenuObject->fFlags & MNF_SYSDESKMN) && + if( !(MenuObject->fFlags & MNF_SYSMENU) && !MenuItem->Xlpstr && !lpmii->dwTypeData && !(MenuItem->fType & MFT_OWNERDRAW) && @@ -1430,7 +1430,7 @@ return (HMENU)0; } Menu = IntCreateMenu(&Handle, !PopupMenu); - if (Menu->head.rpdesk->rpwinstaParent != WinStaObject) + if (Menu && Menu->head.rpdesk->rpwinstaParent != WinStaObject) { ERR("Desktop Window Station does not match Process one!\n"); } @@ -1658,6 +1658,183 @@ return TRUE; } +PMENU FASTCALL MENU_GetSystemMenu(PWND Window, PMENU Popup) +{ + PMENU Menu, NewMenu = NULL, SysMenu = NULL; + HMENU hSysMenu, hNewMenu = NULL; + ROSMENUITEMINFO ItemInfoSet = {0}; + ROSMENUITEMINFO ItemInfo = {0}; + UNICODE_STRING MenuName; + + hSysMenu = UserCreateMenu(FALSE); + if (NULL == hSysMenu) + { + return NULL; + } + SysMenu = IntGetMenuObject(hSysMenu); + if (NULL == SysMenu) + { + UserDestroyMenu(hSysMenu); + return NULL; + } + + SysMenu->fFlags |= MNF_SYSMENU; + SysMenu->hWnd = Window->head.h; + + if (!Popup) + { + //hNewMenu = co_IntLoadSysMenuTemplate(); + //if ( Window->ExStyle & WS_EX_MDICHILD ) + //{ + // RtlInitUnicodeString( &MenuName, L"SYSMENUMDI"); + // hNewMenu = co_IntCallLoadMenu( hModClient, &MenuName); + //} + //else + { + RtlInitUnicodeString( &MenuName, L"SYSMENU"); + hNewMenu = co_IntCallLoadMenu( hModClient, &MenuName); + //ERR("%wZ\n",&MenuName); + } + if (!hNewMenu) + { + ERR("No Menu!!\n"); + IntReleaseMenuObject(SysMenu); + UserDestroyMenu(hSysMenu); + return NULL; + } + Menu = IntGetMenuObject(hNewMenu); + if (!Menu) + { + IntReleaseMenuObject(SysMenu); + UserDestroyMenu(hSysMenu); + return NULL; + } + + // Do the rest in here. + + Menu->fFlags |= MNS_CHECKORBMP | MNF_SYSMENU | MNF_POPUP; + + ItemInfoSet.cbSize = sizeof( MENUITEMINFOW); + ItemInfoSet.fMask = MIIM_BITMAP; + ItemInfoSet.hbmpItem = HBMMENU_POPUP_CLOSE; + IntMenuItemInfo(Menu, SC_CLOSE, FALSE, &ItemInfoSet, TRUE, NULL); + ItemInfoSet.hbmpItem = HBMMENU_POPUP_RESTORE; + IntMenuItemInfo(Menu, SC_RESTORE, FALSE, &ItemInfoSet, TRUE, NULL); + ItemInfoSet.hbmpItem = HBMMENU_POPUP_MAXIMIZE; + IntMenuItemInfo(Menu, SC_MAXIMIZE, FALSE, &ItemInfoSet, TRUE, NULL); + ItemInfoSet.hbmpItem = HBMMENU_POPUP_MINIMIZE; + IntMenuItemInfo(Menu, SC_MINIMIZE, FALSE, &ItemInfoSet, TRUE, NULL); + + NewMenu = IntCloneMenu(Menu); + + IntReleaseMenuObject(NewMenu); + UserSetMenuDefaultItem(NewMenu, SC_CLOSE, FALSE); + + IntDestroyMenuObject(Menu, FALSE, TRUE); + } + else + { + NewMenu = Popup; + } + if (NewMenu) + { + NewMenu->fFlags |= MNF_SYSMENU | MNF_POPUP; + + if (Window->pcls->style & CS_NOCLOSE) + IntRemoveMenuItem(NewMenu, SC_CLOSE, MF_BYCOMMAND, TRUE); + + ItemInfo.cbSize = sizeof(MENUITEMINFOW); + ItemInfo.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_STATE | MIIM_SUBMENU; + ItemInfo.fType = 0; + ItemInfo.fState = MFS_ENABLED; + ItemInfo.dwTypeData = NULL; + ItemInfo.cch = 0; + ItemInfo.hSubMenu = UserHMGetHandle(NewMenu); + IntInsertMenuItem(SysMenu, (UINT) -1, TRUE, &ItemInfo, NULL); + + return SysMenu; + } + ERR("failed to load system menu!\n"); + return NULL; +} + +PMENU FASTCALL +IntGetSystemMenu(PWND Window, BOOL bRevert) +{ + PMENU Menu; + + if (bRevert) + { + if (Window->SystemMenu) + { + Menu = UserGetMenuObject(Window->SystemMenu); + if (Menu && !(Menu->fFlags & MNF_SYSDESKMN)) + { + IntDestroyMenuObject(Menu, TRUE, TRUE); + Window->SystemMenu = NULL; + } + } + } + else + { + Menu = Window->SystemMenu ? UserGetMenuObject(Window->SystemMenu) : NULL; + if ((!Window->SystemMenu || Menu->fFlags & MNF_SYSDESKMN) && Window->style & WS_SYSMENU) + { + Menu = MENU_GetSystemMenu(Window, NULL); + Window->SystemMenu = Menu ? UserHMGetHandle(Menu) : NULL; + } + } + + if (Window->SystemMenu) + { + HMENU hMenu = IntGetSubMenu( Window->SystemMenu, 0); + /* Store the dummy sysmenu handle to facilitate the refresh */ + /* of the close button if the SC_CLOSE item change */ + Menu = UserGetMenuObject(hMenu); + if (Menu) + { + Menu->spwndNotify = Window; + Menu->fFlags |= MNF_SYSSUBMENU; + } + return Menu; + } + return NULL; +} + +BOOL FASTCALL +IntSetSystemMenu(PWND Window, PMENU Menu) +{ + PMENU OldMenu; + + if (!(Window->style & WS_SYSMENU)) return FALSE; + + if (Window->SystemMenu) + { + OldMenu = UserGetMenuObject(Window->SystemMenu); + if (OldMenu) + { + OldMenu->fFlags &= ~MNF_SYSMENU; + IntDestroyMenuObject(OldMenu, TRUE, TRUE); + } + } + + OldMenu = MENU_GetSystemMenu(Window, Menu); + if (OldMenu) + { // Use spmenuSys too! + Window->SystemMenu = UserHMGetHandle(OldMenu); + } + else + Window->SystemMenu = NULL; + + if (Menu && Window != Menu->spwndNotify) + { + Menu->spwndNotify = Window; + } + + return TRUE; +} + + /* FUNCTIONS *****************************************************************/ /* @@ -1712,6 +1889,107 @@ CLEANUP: TRACE("Leave NtUserDeleteMenu, ret=%i\n",_ret_); + UserLeave(); + END_CLEANUP; +} + +/* + * NtUserGetSystemMenu + * + * The NtUserGetSystemMenu function allows the application to access the + * window menu (also known as the system menu or the control menu) for + * copying and modifying. + * + * Parameters + * hWnd + * Handle to the window that will own a copy of the window menu. + * bRevert + * Specifies the action to be taken. If this parameter is FALSE, + * NtUserGetSystemMenu returns a handle to the copy of the window menu + * currently in use. The copy is initially identical to the window menu + * but it can be modified. + * If this parameter is TRUE, GetSystemMenu resets the window menu back + * to the default state. The previous window menu, if any, is destroyed. + * + * Return Value + * If the bRevert parameter is FALSE, the return value is a handle to a + * copy of the window menu. If the bRevert parameter is TRUE, the return + * value is NULL. + * + * Status + * @implemented + */ + +HMENU APIENTRY +NtUserGetSystemMenu(HWND hWnd, BOOL bRevert) +{ + PWND Window; + PMENU Menu; + DECLARE_RETURN(HMENU); + + TRACE("Enter NtUserGetSystemMenu\n"); + UserEnterShared(); + + if (!(Window = UserGetWindowObject(hWnd))) + { + RETURN(NULL); + } + + if (!(Menu = IntGetSystemMenu(Window, bRevert))) + { + RETURN(NULL); + } + + RETURN(Menu->head.h); + +CLEANUP: + TRACE("Leave NtUserGetSystemMenu, ret=%p\n", _ret_); + UserLeave(); + END_CLEANUP; +} + +/* + * NtUserSetSystemMenu + * + * Status + * @implemented + */ + +BOOL APIENTRY +NtUserSetSystemMenu(HWND hWnd, HMENU hMenu) +{ + BOOL Result = FALSE; + PWND Window; + PMENU Menu; + DECLARE_RETURN(BOOL); + + TRACE("Enter NtUserSetSystemMenu\n"); + UserEnterExclusive(); + + if (!(Window = UserGetWindowObject(hWnd))) + { + RETURN( FALSE); + } + + if (hMenu) + { + /* + * Assign new menu handle and Up the Lock Count. + */ + if (!(Menu = IntGetMenuObject(hMenu))) + { + RETURN( FALSE); + } + + Result = IntSetSystemMenu(Window, Menu); + } + else + EngSetLastError(ERROR_INVALID_MENU_HANDLE); + + RETURN( Result); + +CLEANUP: + TRACE("Leave NtUserSetSystemMenu, ret=%i\n",_ret_); UserLeave(); END_CLEANUP; } @@ -1908,7 +2186,7 @@ break; case OBJID_SYSMENU: if (!(pWnd->style & WS_SYSMENU)) RETURN(FALSE); - Menu = IntGetSystemMenu(pWnd, FALSE, FALSE); + Menu = IntGetSystemMenu(pWnd, FALSE); hMenu = Menu->head.h; break; default: Modified: trunk/reactos/win32ss/user/ntuser/menu.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/menu.h…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/menu.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/menu.h [iso-8859-1] Mon May 26 01:26:45 2014 @@ -41,7 +41,7 @@ IntInsertMenuItem(_In_ PMENU MenuObject, UINT uItem, BOOL fByPosition, PROSMENUITEMINFO ItemInfo, PUNICODE_STRING lpstr); PMENU FASTCALL -IntGetSystemMenu(PWND Window, BOOL bRevert, BOOL RetMenu); +IntGetSystemMenu(PWND Window, BOOL bRevert); UINT FASTCALL IntFindSubMenu(HMENU *hMenu, HMENU hSubTarget ); UINT FASTCALL IntGetMenuState( HMENU hMenu, UINT uId, UINT uFlags); Modified: trunk/reactos/win32ss/user/ntuser/window.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/window…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] Mon May 26 01:26:45 2014 @@ -895,148 +895,6 @@ } } -PMENU FASTCALL -IntGetSystemMenu(PWND Window, BOOL bRevert, BOOL RetMenu) -{ - PMENU Menu, NewMenu = NULL, SysMenu = NULL, ret = NULL; - PTHREADINFO W32Thread; - HMENU hNewMenu, hSysMenu; - ROSMENUITEMINFO ItemInfoSet = {0}; - ROSMENUITEMINFO ItemInfo = {0}; - UNICODE_STRING MenuName; - - if(bRevert) - { - W32Thread = PsGetCurrentThreadWin32Thread(); - - if(!W32Thread->rpdesk) - return NULL; - - if(Window->SystemMenu) - { - Menu = UserGetMenuObject(Window->SystemMenu); - if(Menu) - { - IntDestroyMenuObject(Menu, TRUE, TRUE); - Window->SystemMenu = (HMENU)0; - } - } - - if(W32Thread->rpdesk->rpwinstaParent->SystemMenuTemplate) - { - /* Clone system menu */ - Menu = UserGetMenuObject(W32Thread->rpdesk->rpwinstaParent->SystemMenuTemplate); - if(!Menu) - return NULL; - - NewMenu = IntCloneMenu(Menu); - if(NewMenu) - { // Use spmenuSys - Window->SystemMenu = NewMenu->head.h; - NewMenu->fFlags |= MNF_SYSDESKMN; - NewMenu->hWnd = Window->head.h; - ret = NewMenu; - //IntReleaseMenuObject(NewMenu); - } - } - else - { - hSysMenu = UserCreateMenu(FALSE); - if (NULL == hSysMenu) - { - return NULL; - } - SysMenu = IntGetMenuObject(hSysMenu); - if (NULL == SysMenu) - { - UserDestroyMenu(hSysMenu); - return NULL; - } - SysMenu->fFlags |= MNF_SYSDESKMN; - SysMenu->hWnd = Window->head.h; - //hNewMenu = co_IntLoadSysMenuTemplate(); - //if ( Window->ExStyle & WS_EX_MDICHILD ) - //{ - // RtlInitUnicodeString( &MenuName, L"SYSMENUMDI"); - // hNewMenu = co_IntCallLoadMenu( hModClient, &MenuName); - //} - //else - { - RtlInitUnicodeString( &MenuName, L"SYSMENU"); - hNewMenu = co_IntCallLoadMenu( hModClient, &MenuName); - //ERR("%wZ\n",&MenuName); - } - if(!hNewMenu) - { - ERR("No Menu!!\n"); - IntReleaseMenuObject(SysMenu); - UserDestroyMenu(hSysMenu); - return NULL; - } - Menu = IntGetMenuObject(hNewMenu); - if(!Menu) - { - IntReleaseMenuObject(SysMenu); - UserDestroyMenu(hSysMenu); - return NULL; - } - - // Do the rest in here. - - Menu->fFlags |= MNS_CHECKORBMP | MNF_SYSDESKMN | MNF_POPUP; - - ItemInfoSet.cbSize = sizeof( MENUITEMINFOW); - ItemInfoSet.fMask = MIIM_BITMAP; - ItemInfoSet.hbmpItem = HBMMENU_POPUP_CLOSE; - IntMenuItemInfo(Menu, SC_CLOSE, FALSE, &ItemInfoSet, TRUE, NULL); - ItemInfoSet.hbmpItem = HBMMENU_POPUP_RESTORE; - IntMenuItemInfo(Menu, SC_RESTORE, FALSE, &ItemInfoSet, TRUE, NULL); - ItemInfoSet.hbmpItem = HBMMENU_POPUP_MAXIMIZE; - IntMenuItemInfo(Menu, SC_MAXIMIZE, FALSE, &ItemInfoSet, TRUE, NULL); - ItemInfoSet.hbmpItem = HBMMENU_POPUP_MINIMIZE; - IntMenuItemInfo(Menu, SC_MINIMIZE, FALSE, &ItemInfoSet, TRUE, NULL); - - NewMenu = IntCloneMenu(Menu); - if(NewMenu) - { - NewMenu->fFlags |= MNF_SYSDESKMN | MNF_POPUP; - // Do not set MNS_CHECKORBMP it breaks menus, also original code destroyed the style anyway. - IntReleaseMenuObject(NewMenu); - UserSetMenuDefaultItem(NewMenu, SC_CLOSE, FALSE); - - if (Window->pcls->style & CS_NOCLOSE) - IntRemoveMenuItem(NewMenu, SC_CLOSE, MF_BYCOMMAND, TRUE); - - ItemInfo.cbSize = sizeof(MENUITEMINFOW); - ItemInfo.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_STATE | MIIM_SUBMENU; - ItemInfo.fType = 0; - ItemInfo.fState = MFS_ENABLED; - ItemInfo.dwTypeData = NULL; - ItemInfo.cch = 0; - ItemInfo.hSubMenu = NewMenu->head.h; - IntInsertMenuItem(SysMenu, (UINT) -1, TRUE, &ItemInfo, NULL); - - Window->SystemMenu = SysMenu->head.h; - - ret = SysMenu; - } - IntDestroyMenuObject(Menu, FALSE, TRUE); - } - if(RetMenu) - return ret; - else - return NULL; - } - else - { - if(Window->SystemMenu) - return IntGetMenuObject((HMENU)Window->SystemMenu); - else - return NULL; - } -} - - BOOL FASTCALL IntIsChildWindow(PWND Parent, PWND BaseWindow) { @@ -1448,32 +1306,6 @@ } return( hWndOldParent); -} - -BOOL FASTCALL -IntSetSystemMenu(PWND Window, PMENU Menu) -{ - PMENU OldMenu; - if(Window->SystemMenu) - { - OldMenu = IntGetMenuObject(Window->SystemMenu); - if(OldMenu) - { - OldMenu->fFlags &= ~ MNF_SYSDESKMN; - IntReleaseMenuObject(OldMenu); - } - } - - if(Menu) - { - /* FIXME: Check window style, propably return FALSE? */ - Window->SystemMenu = Menu->head.h; - Menu->fFlags |= MNF_SYSDESKMN; - } - else // Use spmenuSys too! - Window->SystemMenu = (HMENU)0; - - return TRUE; } /* Unlink the window from siblings. children and parent are kept in place. */ @@ -1784,7 +1616,6 @@ PWND pWnd = NULL; HWND hWnd; PTHREADINFO pti = NULL; - PMENU SystemMenu; BOOL MenuChanged; BOOL bUnicodeWindow; @@ -2012,22 +1843,13 @@ if (!(pWnd->style & (WS_CHILD | WS_POPUP))) pWnd->state |= WNDS_SENDSIZEMOVEMSGS; - /* Create system menu */ - if ((Cs->style & WS_SYSMENU)) // && (dwStyle & WS_CAPTION) == WS_CAPTION) - { - SystemMenu = IntGetSystemMenu(pWnd, TRUE, TRUE); - if(SystemMenu) - { // spmenuSys - pWnd->SystemMenu = SystemMenu->head.h; - IntReleaseMenuObject(SystemMenu); - } - } - /* Set the window menu */ if ((Cs->style & (WS_CHILD | WS_POPUP)) != WS_CHILD) { - if (Cs->hMenu) + if (Cs->hMenu) + { IntSetMenu(pWnd, Cs->hMenu, &MenuChanged); + } else if (pWnd->pcls->lpszMenuName) // Take it from the parent. { UNICODE_STRING MenuName; @@ -2338,15 +2160,15 @@ Window->rcWindow.top = Cs->y; Window->rcWindow.right = Cs->x + Size.cx; Window->rcWindow.bottom = Cs->y + Size.cy; -/* + /* if (0 != (Window->style & WS_CHILD) && ParentWindow) { -// ERR("co_UserCreateWindowEx(): Offset rcWindow\n"); + ERR("co_UserCreateWindowEx(): Offset rcWindow\n"); RECTL_vOffsetRect(&Window->rcWindow, ParentWindow->rcClient.left, ParentWindow->rcClient.top); } -*/ + */ /* correct child window coordinates if mirroring on parent is enabled */ if (ParentWindow != NULL) { @@ -3679,105 +3501,6 @@ END_CLEANUP; } -/* - * NtUserGetSystemMenu - * - * The NtUserGetSystemMenu function allows the application to access the - * window menu (also known as the system menu or the control menu) for - * copying and modifying. - * - * Parameters - * hWnd - * Handle to the window that will own a copy of the window menu. - * bRevert - * Specifies the action to be taken. If this parameter is FALSE, - * NtUserGetSystemMenu returns a handle to the copy of the window menu - * currently in use. The copy is initially identical to the window menu - * but it can be modified. - * If this parameter is TRUE, GetSystemMenu resets the window menu back - * to the default state. The previous window menu, if any, is destroyed. - * - * Return Value - * If the bRevert parameter is FALSE, the return value is a handle to a - * copy of the window menu. If the bRevert parameter is TRUE, the return - * value is NULL. - * - * Status - * @implemented - */ - -HMENU APIENTRY -NtUserGetSystemMenu(HWND hWnd, BOOL bRevert) -{ - PWND Window; - PMENU Menu; - DECLARE_RETURN(HMENU); - - TRACE("Enter NtUserGetSystemMenu\n"); - UserEnterShared(); - - if (!(Window = UserGetWindowObject(hWnd))) - { - RETURN(NULL); - } - - if (!(Menu = IntGetSystemMenu(Window, bRevert, FALSE))) - { - RETURN(NULL); - } - - RETURN(Menu->head.h); - -CLEANUP: - TRACE("Leave NtUserGetSystemMenu, ret=%p\n", _ret_); - UserLeave(); - END_CLEANUP; -} - -/* - * NtUserSetSystemMenu - * - * Status - * @implemented - */ - -BOOL APIENTRY -NtUserSetSystemMenu(HWND hWnd, HMENU hMenu) -{ - BOOL Result = FALSE; - PWND Window; - PMENU Menu; - DECLARE_RETURN(BOOL); - - TRACE("Enter NtUserSetSystemMenu\n"); - UserEnterExclusive(); - - if (!(Window = UserGetWindowObject(hWnd))) - { - RETURN( FALSE); - } - - if (hMenu) - { - /* - * Assign new menu handle. - */ - if (!(Menu = UserGetMenuObject(hMenu))) - { - RETURN( FALSE); - } - - Result = IntSetSystemMenu(Window, Menu); - } - - RETURN( Result); - -CLEANUP: - TRACE("Leave NtUserSetSystemMenu, ret=%i\n",_ret_); - UserLeave(); - END_CLEANUP; -} - // Fixes wine Win test_window_styles and todo tests... static BOOL FASTCALL IntCheckFrameEdge(ULONG Style, ULONG ExStyle) Modified: trunk/reactos/win32ss/user/user32/windows/menu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/menu.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/menu.c [iso-8859-1] Mon May 26 01:26:45 2014 @@ -70,10 +70,10 @@ #define IS_MAGIC_BITMAP(id) ((id) && ((INT_PTR)(id) < 12) && ((INT_PTR)(id) >= -1)) #define IS_SYSTEM_MENU(MenuInfo) \ - (0 == ((MenuInfo)->fFlags & MNF_POPUP) && 0 != ((MenuInfo)->fFlags & MNF_SYSDESKMN)) + (0 == ((MenuInfo)->fFlags & MNF_POPUP) && 0 != ((MenuInfo)->fFlags & MNF_SYSMENU)) #define IS_SYSTEM_POPUP(MenuInfo) \ - (0 != ((MenuInfo)->fFlags & MNF_POPUP) && 0 != ((MenuInfo)->fFlags & MNF_SYSDESKMN)) + (0 != ((MenuInfo)->fFlags & MNF_POPUP) && 0 != ((MenuInfo)->fFlags & MNF_SYSMENU)) #define IS_BITMAP_ITEM(flags) (MF_BITMAP == MENU_ITEM_TYPE(flags)) @@ -902,7 +902,7 @@ } Flags |= menu->fFlags & MNF_POPUP ? MF_POPUP : 0; - Flags |= menu->fFlags & MNF_SYSDESKMN ? MF_SYSMENU : 0; + Flags |= menu->fFlags & MNF_SYSMENU ? MF_SYSMENU : 0; MenuChar = SendMessageW( WndOwner, WM_MENUCHAR, MAKEWPARAM(Key, Flags), (LPARAM) hmenu); @@ -1257,7 +1257,11 @@ MENU_GetMaxPopupHeight(PROSMENUINFO lppop) { if (lppop->cyMax) + { + //ERR("MGMaxPH cyMax %d\n",lppop->cyMax); return lppop->cyMax; + } + //ERR("MGMaxPH SyMax %d\n",GetSystemMetrics(SM_CYSCREEN) - GetSystemMetrics(SM_CYBORDER)); return GetSystemMetrics(SM_CYSCREEN) - GetSystemMetrics(SM_CYBORDER); } @@ -1844,13 +1848,14 @@ /* process text if present */ if (lpitem->lpstr) { - register int i = 0; + int i = 0; HFONT hfontOld = 0; + UINT uFormat = menuBar ? DT_CENTER | DT_VCENTER | DT_SINGLELINE : DT_LEFT | DT_VCENTER | DT_SINGLELINE; - if((MenuInfo->dwStyle & MNS_CHECKORBMP)) + if ((MenuInfo->dwStyle & MNS_CHECKORBMP)) rect.left += max(0, (int)(MenuInfo->cxTextAlign - GetSystemMetrics(SM_CXMENUCHECK))); else rect.left += MenuInfo->cxTextAlign; @@ -1861,8 +1866,13 @@ } if (menuBar) { - rect.left += MENU_BAR_ITEMS_SPACE / 2; - rect.right -= MENU_BAR_ITEMS_SPACE / 2; + if( lpitem->hbmpItem) + rect.left += lpitem->maxBmpSize.cx; + if( !(lpitem->hbmpItem == HBMMENU_CALLBACK)) + rect.left += MenuCharSize.cx; + rect.right -= MenuCharSize.cx; + //rect.left += MENU_BAR_ITEMS_SPACE / 2; + //rect.right -= MENU_BAR_ITEMS_SPACE / 2; } Text = lpitem->lpstr; @@ -1911,8 +1921,8 @@ --rect.left; --rect.top; --rect.right; --rect.bottom; } SetTextColor(hdc, RGB(0x80, 0x80, 0x80)); - } - DrawTextW( hdc, Text + i + 1, -1, &rect, uFormat ); + } + DrawTextW( hdc, Text + i + 1, -1, &rect, uFormat ); } if (hfontOld) @@ -1961,6 +1971,7 @@ UINT u; MenuInitRosMenuItemInfo(&ItemInfo); + //for (u = MenuInfo.cItems; u > 0; u--, item++) for (u = 0; u < MenuInfo.cItems; u++) { if (MenuGetRosMenuItemInfo(MenuInfo.Self, u, &ItemInfo)) @@ -1972,7 +1983,9 @@ } /* draw scroll arrows */ if (MenuInfo.dwArrowsOn) + { MENU_DrawScrollArrows(&MenuInfo, hdc); + } MenuSetRosMenuInfo(&MenuInfo); MenuCleanupRosMenuItemInfo(&ItemInfo); @@ -2013,7 +2026,7 @@ if (hfontOld) SelectObject( hDC, hfontOld); return lppop.cyMenu; } - else + else return DrawMenuBarTemp(hwnd, hDC, lprect, hMenu, NULL); } @@ -2185,6 +2198,7 @@ ScrollWindow(lppop->Wnd, 0, nOldPos - lppop->iTop, &rc, &rc); MENU_DrawScrollArrows(lppop, hdc); } + MenuSetRosMenuInfo(lppop); } } @@ -2248,7 +2262,7 @@ WPARAM wParam = MAKEWPARAM( ItemInfo.hSubMenu ? wIndex : ItemInfo.wID, ItemInfo.fType | ItemInfo.fState | (ItemInfo.hSubMenu ? MF_POPUP : 0) | - (hmenu->fFlags & MNF_SYSDESKMN ? MF_SYSMENU : 0 ) ); + (hmenu->fFlags & MNF_SYSMENU ? MF_SYSMENU : 0 ) ); SendMessageW(hwndOwner, WM_MENUSELECT, wParam, (LPARAM) hmenu->Self); } @@ -2267,7 +2281,7 @@ { WPARAM wParam = MAKEWPARAM( Pos, ItemInfo.fType | ItemInfo.fState | (ItemInfo.hSubMenu ? MF_POPUP : 0) | - (TopMenuInfo.fFlags & MNF_SYSDESKMN ? MF_SYSMENU : 0 ) ); + (TopMenuInfo.fFlags & MNF_SYSMENU ? MF_SYSMENU : 0 ) ); SendMessageW(hwndOwner, WM_MENUSELECT, wParam, (LPARAM) topmenu); } @@ -3065,7 +3079,7 @@ do not send a message to the owner */ if (0 == (Flags & TPM_RETURNCMD)) { - if (0 != (MenuInfo->fFlags & MNF_SYSDESKMN)) + if (0 != (MenuInfo->fFlags & MNF_SYSMENU)) { PostMessageW(Mt->OwnerWnd, WM_SYSCOMMAND, ItemInfo.wID, MAKELPARAM((SHORT) Mt->Pt.x, (SHORT) Mt->Pt.y)); @@ -3250,7 +3264,7 @@ if (ht != HTNOWHERE && ht != HTERROR) ret = hMenu; } else if (ht == HTSYSMENU) - ret = NtUserGetSystemMenu(menu->hWnd, FALSE); + ret = get_win_sys_menu(menu->hWnd); else if (ht == HTMENU) ret = GetMenu( menu->hWnd ); } @@ -3398,7 +3412,7 @@ else if (0 != (Style & WS_SYSMENU)) { /* switch to the system menu */ - NewMenu = NtUserGetSystemMenu(NewWnd, FALSE); + NewMenu = get_win_sys_menu(NewWnd); } else { @@ -3415,10 +3429,10 @@ DWORD Style = GetWindowLongPtrW(NewWnd, GWL_STYLE); if (0 != (Style & WS_SYSMENU) - && GetSystemMenu(NewWnd, FALSE) == NewMenu) + && get_win_sys_menu(NewWnd) == NewMenu) { /* get the real system menu */ - NewMenu = NtUserGetSystemMenu(NewWnd, FALSE); + NewMenu = get_win_sys_menu(NewWnd); } else if (0 != (Style & WS_CHILD) || GetMenu(NewWnd) != NewMenu) { @@ -4081,7 +4095,7 @@ IntNotifyWinEvent( EVENT_SYSTEM_MENUSTART, hWnd, - MenuInfo.fFlags & MNF_SYSDESKMN ? OBJID_SYSMENU : OBJID_MENU, + MenuInfo.fFlags & MNF_SYSMENU ? OBJID_SYSMENU : OBJID_MENU, CHILDID_SELF, 0); return TRUE; } @@ -4108,7 +4122,7 @@ */ VOID MenuTrackMouseMenuBar( HWND hWnd, ULONG ht, POINT pt) { - HMENU hMenu = (ht == HTSYSMENU) ? NtUserGetSystemMenu( hWnd, FALSE) : GetMenu(hWnd); + HMENU hMenu = (ht == HTSYSMENU) ? get_win_sys_menu( hWnd ) : GetMenu(hWnd); UINT wFlags = TPM_BUTTONDOWN | TPM_LEFTALIGN | TPM_LEFTBUTTON; TRACE("wnd=%p ht=0x%04x (%ld,%ld)\n", hWnd, ht, pt.x, pt.y); @@ -4124,6 +4138,8 @@ } MenuInitTracking(hWnd, hMenu, FALSE, wFlags); + /* fetch the window menu again, it may have changed */ + hMenu = (ht == HTSYSMENU) ? get_win_sys_menu( hWnd ) : GetMenu( hWnd ); MenuTrackMenu(hMenu, wFlags, pt.x, pt.y, hWnd, NULL); MenuExitTracking(hWnd, FALSE); } @@ -4155,7 +4171,7 @@ if (!hTrackMenu || IsIconic(hwnd) || wChar == ' ' ) { if (!(GetWindowLongPtrW( hwnd, GWL_STYLE ) & WS_SYSMENU)) return; - hTrackMenu = NtUserGetSystemMenu(hwnd, FALSE); + hTrackMenu = get_win_sys_menu(hwnd); uItem = 0; wParam |= HTSYSMENU; /* prevent item lookup */ } @@ -4432,6 +4448,44 @@ } } +HMENU FASTCALL MENU_LoadSystemMenu(BOOL mdi) +{ + HMENU hmenu = LoadMenuW(User32Instance, L"SYSMENU"); + + if (hmenu) + { + MENUINFO menuinfo = {0}; + MENUITEMINFOW info = {0}; + //WCHAR buf[128]; + + // removing space for checkboxes from menu + menuinfo.cbSize = sizeof(menuinfo); + menuinfo.fMask = MIM_STYLE; + GetMenuInfo(hmenu, &menuinfo); + menuinfo.dwStyle |= MNS_CHECKORBMP; + SetMenuInfo(hmenu, &menuinfo); + + // adding bitmaps to menu items + info.cbSize = sizeof(info); + info.fMask |= MIIM_BITMAP; + info.hbmpItem = HBMMENU_POPUP_MINIMIZE; + SetMenuItemInfoW(hmenu, SC_MINIMIZE, FALSE, &info); + info.hbmpItem = HBMMENU_POPUP_RESTORE; + SetMenuItemInfoW(hmenu, SC_RESTORE, FALSE, &info); + info.hbmpItem = HBMMENU_POPUP_MAXIMIZE; + SetMenuItemInfoW(hmenu, SC_MAXIMIZE, FALSE, &info); + info.hbmpItem = HBMMENU_POPUP_CLOSE; + SetMenuItemInfoW(hmenu, SC_CLOSE, FALSE, &info); + if (mdi) + { + AppendMenuW(hmenu, MF_SEPARATOR, 0, NULL); + //LoadStringW(User32Instance, IDS_MDI_NEXT, buf, sizeof(buf)/sizeof(WCHAR)); + //AppendMenuW(hmenu, MF_STRING, SC_NEXTWINDOW, buf); + } + } + return hmenu; +} + NTSTATUS WINAPI User32LoadSysMenuTemplateForKernel(PVOID Arguments, ULONG ArgumentLength) { @@ -5023,11 +5077,7 @@ HWND hWnd, BOOL bRevert) { - HMENU TopMenu; - - TopMenu = NtUserGetSystemMenu(hWnd, bRevert); - - return NULL == TopMenu ? NULL : GetSubMenu(TopMenu, 0); + return NtUserGetSystemMenu(hWnd, bRevert); } /*
10 years, 7 months
1
0
0
0
[jimtabor] 63454: [Win32k] - Code cleanup.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sun May 25 21:30:52 2014 New Revision: 63454 URL:
http://svn.reactos.org/svn/reactos?rev=63454&view=rev
Log: [Win32k] - Code cleanup. Modified: trunk/reactos/win32ss/user/ntuser/winpos.c Modified: trunk/reactos/win32ss/user/ntuser/winpos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winpos…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] Sun May 25 21:30:52 2014 @@ -198,7 +198,7 @@ } // -// This helps with bug 6751 forcing modal dialog active when another app is minimized or closed. +// This helps with CORE-6129 forcing modal dialog active when another app is minimized or closed. // BOOL FASTCALL ActivateOtherWindowMin(PWND Wnd) { @@ -1212,12 +1212,9 @@ Parent = Window->spwndParent; if (0 != (Window->style & WS_CHILD) && Parent) { - RECTL_vOffsetRect(&(params.rgrc[0]), - Parent->rcClient.left, - - Parent->rcClient.top); - RECTL_vOffsetRect(&(params.rgrc[1]), - Parent->rcClient.left, - - Parent->rcClient.top); - RECTL_vOffsetRect(&(params.rgrc[2]), - Parent->rcClient.left, - - Parent->rcClient.top); + RECTL_vOffsetRect(&(params.rgrc[0]), - Parent->rcClient.left, - Parent->rcClient.top); + RECTL_vOffsetRect(&(params.rgrc[1]), - Parent->rcClient.left, - Parent->rcClient.top); + RECTL_vOffsetRect(&(params.rgrc[2]), - Parent->rcClient.left, - Parent->rcClient.top); } params.lppos = &winposCopy; @@ -1232,8 +1229,7 @@ *ClientRect = params.rgrc[0]; // First rectangle contains the coordinates of the new client rectangle resulting from the move or resize if ((Window->style & WS_CHILD) && Parent) { - RECTL_vOffsetRect(ClientRect, Parent->rcClient.left, - Parent->rcClient.top); + RECTL_vOffsetRect(ClientRect, Parent->rcClient.left, Parent->rcClient.top); } FixClientRect(ClientRect, WindowRect); } @@ -1244,16 +1240,14 @@ WinPos->flags &= ~SWP_NOCLIENTMOVE; } - if (ClientRect->right - ClientRect->left != - Window->rcClient.right - Window->rcClient.left) + if (ClientRect->right - ClientRect->left != Window->rcClient.right - Window->rcClient.left) { WinPos->flags &= ~SWP_NOCLIENTSIZE; } else wvrFlags &= ~WVR_HREDRAW; - if (ClientRect->bottom - ClientRect->top != - Window->rcClient.bottom - Window->rcClient.top) + if (ClientRect->bottom - ClientRect->top != Window->rcClient.bottom - Window->rcClient.top) { WinPos->flags &= ~SWP_NOCLIENTSIZE; } @@ -1317,44 +1311,24 @@ WindowRect->bottom = WindowRect->top + WinPos->cy; } } -#if 0 - if (!(WinPos->flags & SWP_NOMOVE)) - { - WindowRect->left = WinPos->x; - WindowRect->top = WinPos->y; - WindowRect->right += WinPos->x - Window->rcWindow.left; - WindowRect->bottom += WinPos->y - Window->rcWindow.top; - RECTL_vOffsetRect(ClientRect, - WinPos->x - Window->rcWindow.left, - WinPos->y - Window->rcWindow.top); - - } - - *WindowRect = Window->rcWindow; - *ClientRect = Window->rcClient; - - if (!(WinPos->flags & SWP_NOSIZE)) - { - WindowRect->right = WindowRect->left + WinPos->cx; - WindowRect->bottom = WindowRect->top + WinPos->cy; - } -#endif + if (!(WinPos->flags & SWP_NOMOVE)) { INT X, Y; PWND Parent; X = WinPos->x; Y = WinPos->y; - //ERR("Not SWP_NOMOVE\n"); + Parent = Window->spwndParent; + if (((Window->style & WS_CHILD) != 0) && Parent && Parent != Window->head.rpdesk->pDeskInfo->spwnd) { - //ERR("Not SWP_NOMOVE 1 Parent client offset X %d Y %d\n",X,Y); + TRACE("Not SWP_NOMOVE 1 Parent client offset X %d Y %d\n",X,Y); X += Parent->rcClient.left; Y += Parent->rcClient.top; - //ERR("Not SWP_NOMOVE 2 Parent client offset X %d Y %d\n",X,Y); + TRACE("Not SWP_NOMOVE 2 Parent client offset X %d Y %d\n",X,Y); } WindowRect->left = X; @@ -1365,12 +1339,13 @@ RECTL_vOffsetRect(ClientRect, X - Window->rcWindow.left, Y - Window->rcWindow.top); } - WinPos->flags |= SWP_NOCLIENTMOVE | SWP_NOCLIENTSIZE; TRACE( "hwnd %p, after %p, swp %d,%d %dx%d flags %08x\n", WinPos->hwnd, WinPos->hwndInsertAfter, WinPos->x, WinPos->y, WinPos->cx, WinPos->cy, WinPos->flags ); + TRACE("WindowRect: %d %d %d %d\n", WindowRect->left,WindowRect->top,WindowRect->right,WindowRect->bottom); + TRACE("ClientRect: %d %d %d %d\n", ClientRect->left,ClientRect->top,ClientRect->right,ClientRect->bottom); return TRUE; } @@ -1533,6 +1508,7 @@ PWND Child; ASSERT(Window != Window->spwndChild); + TRACE("InternalMoveWin X %d Y %d\n", MoveX, MoveY); Window->rcWindow.left += MoveX; Window->rcWindow.right += MoveX; @@ -1591,7 +1567,7 @@ pt.x = WinPos->x; pt.y = WinPos->y; IntClientToScreen( Parent, &pt ); - //ERR("WPFU C2S wpx %d wpy %d ptx %d pty %d\n",WinPos->x,WinPos->y,pt.x,pt.y); + TRACE("WPFU C2S wpx %d wpy %d ptx %d pty %d\n",WinPos->x,WinPos->y,pt.x,pt.y); /* Check for right position */ if (Wnd->rcWindow.left == pt.x && Wnd->rcWindow.top == pt.y) { @@ -1846,12 +1822,11 @@ OldWindowRect = Window->rcWindow; OldClientRect = Window->rcClient; - //ERR("SetWindowPos OldWindowRect: %d %d %d %d\n", OldWindowRect.left,OldWindowRect.top,OldWindowRect.right,OldWindowRect.bottom); - //ERR("SetWindowPos OldClientRect: %d %d %d %d\n", OldClientRect.left,OldClientRect.top,OldClientRect.right,OldClientRect.bottom); if (NewClientRect.left != OldClientRect.left || NewClientRect.top != OldClientRect.top) { + // Move child window if their parent is moved. Keep Child window relative to Parent... WinPosInternalMoveWindow(Window, NewClientRect.left - OldClientRect.left, NewClientRect.top - OldClientRect.top); @@ -1859,9 +1834,6 @@ Window->rcWindow = NewWindowRect; Window->rcClient = NewClientRect; - - //ERR("SetWindowPos NewWindowRect: %d %d %d %d\n", NewWindowRect.left,NewWindowRect.top,NewWindowRect.right,NewWindowRect.bottom); - //ERR("SetWindowPos NewClientRect: %d %d %d %d\n", NewClientRect.left,NewClientRect.top,NewClientRect.right,NewClientRect.bottom); /* erase parent when hiding or resizing child */ if (WinPos.flags & SWP_HIDEWINDOW) @@ -2374,7 +2346,8 @@ Swp |= SWP_NOACTIVATE | SWP_NOZORDER; } -#if 0 // Explorer issues with common controls. Someone does not know how CS_SAVEBITS works. +#if 0 // Explorer issues with common controls? Someone does not know how CS_SAVEBITS works. + // Breaks startup and shutdown active window... if ((Wnd->style & (WS_POPUP|WS_CHILD)) != WS_CHILD && Wnd->pcls->style & CS_SAVEBITS && ((Cmd == SW_SHOW) || (Cmd == SW_NORMAL)))
10 years, 7 months
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
44
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Results per page:
10
25
50
100
200