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
April 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
15 participants
492 discussions
Start a n
N
ew thread
[hbelusca] 62768: [BOOTDATA] In the same vein as in revision 62766: CORE-1697 CORE-7915 #comment Disable Multiprocessor choices at installation because it *DOESN'T correctly WORK* and cause problem...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Apr 17 20:58:30 2014 New Revision: 62768 URL:
http://svn.reactos.org/svn/reactos?rev=62768&view=rev
Log: [BOOTDATA] In the same vein as in revision 62766: CORE-1697 CORE-7915 #comment Disable Multiprocessor choices at installation because it *DOESN'T correctly WORK* and cause problems to newcomers. Please reenable it *ONLY WHEN* you know it *REALLY* works !!! (revision 62768). Modified: trunk/reactos/boot/bootdata/txtsetup.sif Modified: trunk/reactos/boot/bootdata/txtsetup.sif URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/txtsetup.sif…
============================================================================== --- trunk/reactos/boot/bootdata/txtsetup.sif [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/txtsetup.sif [iso-8859-1] Thu Apr 17 20:58:30 2014 @@ -132,32 +132,32 @@ [Computer] pci_up = "Standard PC Uniprocessor" -pci_mp = "Standard PC Multiprocessor" +;pci_mp = "Standard PC Multiprocessor" acpi_up = "ACPI PC Uniprocessor" -acpi_mp = "ACPI PC Multiprocessor" +;acpi_mp = "ACPI PC Multiprocessor" [Map.Computer] ;<id> = <pnp id string> pci_up = "PC UP" -pci_mp = "PC MP" +;pci_mp = "PC MP" acpi_up = "ACPI UP" -acpi_mp = "ACPI MP" +;acpi_mp = "ACPI MP" [Files.pci_up] ntoskrnl.exe=,,,,,,,,,,,,2 hal.dll=,,,,,,,,,,,,2 -[Files.pci_mp] -ntkrnlmp.exe=,,,,,,,,,,ntoskrnl.exe,,2 -halmps.dll=,,,,,,,,,,hal.dll,,2 +;[Files.pci_mp] +;ntkrnlmp.exe=,,,,,,,,,,ntoskrnl.exe,,2 +;halmps.dll=,,,,,,,,,,hal.dll,,2 [Files.acpi_up] ntoskrnl.exe=,,,,,,,,,,,,2 halacpi.dll=,,,,,,,,,,hal.dll,,2 -[Files.acpi_mp] -ntkrnlmp.exe=,,,,,,,,,,ntoskrnl.exe,,2 -halacpi.dll=,,,,,,,,,,hal.dll,,2 +;[Files.acpi_mp] +;ntkrnlmp.exe=,,,,,,,,,,ntoskrnl.exe,,2 +;halacpi.dll=,,,,,,,,,,hal.dll,,2 [Display] ;<id> = <user friendly name>,<spare>,<service key name>,<hight>,<width>,<bpp>
10 years, 8 months
1
0
0
0
[ekohl] 62767: [SYSDM] Bugfix: Enable the user to set a system managed paging file size if no paging file was set before. The user does not need to set a custom paging file size before setting the ...
by ekohl@svn.reactos.org
Author: ekohl Date: Thu Apr 17 20:56:12 2014 New Revision: 62767 URL:
http://svn.reactos.org/svn/reactos?rev=62767&view=rev
Log: [SYSDM] Bugfix: Enable the user to set a system managed paging file size if no paging file was set before. The user does not need to set a custom paging file size before setting the system managed paging file size. Modified: trunk/reactos/dll/cpl/sysdm/virtmem.c Modified: trunk/reactos/dll/cpl/sysdm/virtmem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/virtmem.c?re…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/virtmem.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/sysdm/virtmem.c [iso-8859-1] Thu Apr 17 20:56:12 2014 @@ -465,10 +465,6 @@ return; } - if ((pVirtMem->Pagefile[DriveIndex].NewMinSize != MinSize) && - (pVirtMem->Pagefile[DriveIndex].NewMaxSize != MaxSize)) - pVirtMem->bModified = TRUE; - pVirtMem->Pagefile[DriveIndex].NewMinSize = MinSize; pVirtMem->Pagefile[DriveIndex].NewMaxSize = MaxSize; pVirtMem->Pagefile[DriveIndex].bUsed = TRUE; @@ -476,25 +472,23 @@ else if (IsDlgButtonChecked(pVirtMem->hSelf, IDC_NOPAGEFILE) == BST_CHECKED) { - if ((pVirtMem->Pagefile[DriveIndex].NewMinSize != MinSize) && - (pVirtMem->Pagefile[DriveIndex].NewMaxSize != MaxSize)) - pVirtMem->bModified = TRUE; - - /* Set sizes to -1 */ + /* No pagefile */ pVirtMem->Pagefile[DriveIndex].NewMinSize = -1; pVirtMem->Pagefile[DriveIndex].NewMaxSize = -1; pVirtMem->Pagefile[DriveIndex].bUsed = TRUE; } else { - if ((pVirtMem->Pagefile[DriveIndex].NewMinSize != MinSize) && - (pVirtMem->Pagefile[DriveIndex].NewMaxSize != MaxSize)) - pVirtMem->bModified = TRUE; - + /* System managed size*/ pVirtMem->Pagefile[DriveIndex].NewMinSize = 0; pVirtMem->Pagefile[DriveIndex].NewMaxSize = 0; pVirtMem->Pagefile[DriveIndex].bUsed = TRUE; } + + /* Set the modified flag if min or max size has changed */ + if ((pVirtMem->Pagefile[DriveIndex].OldMinSize != pVirtMem->Pagefile[DriveIndex].NewMinSize) || + (pVirtMem->Pagefile[DriveIndex].OldMaxSize != pVirtMem->Pagefile[DriveIndex].NewMaxSize)) + pVirtMem->bModified = TRUE; UpdatePagefileEntry(pVirtMem, Index, DriveIndex); }
10 years, 8 months
1
0
0
0
[hbelusca] 62766: [USETUP] Disable EXT2 formatting because it *DOESN'T WORK* and cause problems to newcomers. Please reenable it *ONLY WHEN* you know it *REALLY* works !!!!!!!!!! CORE-3091 CORE-307...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Apr 17 20:43:41 2014 New Revision: 62766 URL:
http://svn.reactos.org/svn/reactos?rev=62766&view=rev
Log: [USETUP] Disable EXT2 formatting because it *DOESN'T WORK* and cause problems to newcomers. Please reenable it *ONLY WHEN* you know it *REALLY* works !!!!!!!!!! CORE-3091 CORE-3073 CORE-4003 #comment EXT2 formatting disabled in USETUP in revision 62766. Please reenable ONLY when you know it works. Modified: trunk/reactos/base/setup/usetup/interface/usetup.c trunk/reactos/base/setup/usetup/native/fslist.c Modified: trunk/reactos/base/setup/usetup/interface/usetup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
============================================================================== --- trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] Thu Apr 17 20:43:41 2014 @@ -2392,8 +2392,10 @@ } } } +#if 0 else if (wcscmp(FileSystemList->Selected->FileSystem, L"EXT2") == 0) PartEntry->PartInfo[PartNum].PartitionType = PARTITION_EXT2; +#endif else if (!FileSystemList->Selected->FormatFunc) return QUIT_PAGE; Modified: trunk/reactos/base/setup/usetup/native/fslist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/native/f…
============================================================================== --- trunk/reactos/base/setup/usetup/native/fslist.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/native/fslist.c [iso-8859-1] Thu Apr 17 20:43:41 2014 @@ -5,7 +5,9 @@ IN PFILE_SYSTEM_LIST List) { FS_AddProvider(List, L"FAT", VfatFormat, VfatChkdsk); +#if 0 FS_AddProvider(List, L"EXT2", Ext2Format, Ext2Chkdsk); +#endif return TRUE; }
10 years, 8 months
1
0
0
0
[ekohl] 62765: [SYSDM] Delete a paging file on the next boot after the user selected the "no paging file" option for a disk drive.
by ekohl@svn.reactos.org
Author: ekohl Date: Thu Apr 17 19:03:49 2014 New Revision: 62765 URL:
http://svn.reactos.org/svn/reactos?rev=62765&view=rev
Log: [SYSDM] Delete a paging file on the next boot after the user selected the "no paging file" option for a disk drive. Modified: trunk/reactos/dll/cpl/sysdm/precomp.h trunk/reactos/dll/cpl/sysdm/virtmem.c Modified: trunk/reactos/dll/cpl/sysdm/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/precomp.h?re…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/precomp.h [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/sysdm/precomp.h [iso-8859-1] Thu Apr 17 19:03:49 2014 @@ -52,8 +52,10 @@ { TCHAR szDrive[3]; LPTSTR pszVolume; - UINT InitialSize; - UINT MaximumSize; + INT OldMinSize; + INT OldMaxSize; + INT NewMinSize; + INT NewMaxSize; UINT FreeSize; BOOL bUsed; } PAGEFILE, *PPAGEFILE; Modified: trunk/reactos/dll/cpl/sysdm/virtmem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/virtmem.c?re…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/virtmem.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/sysdm/virtmem.c [iso-8859-1] Thu Apr 17 19:03:49 2014 @@ -108,8 +108,8 @@ LPTSTR DrivePtr = szDrives; TCHAR szDrive[3]; // Single drive TCHAR szVolume[MAX_PATH + 1]; - INT InitialSize; - INT MaximumSize; + INT MinSize; + INT MaxSize; INT DriveLen; INT PgCnt = 0; INT Len; @@ -129,19 +129,21 @@ if (GetDriveType(DrivePtr) == DRIVE_FIXED) { - InitialSize = -1; - MaximumSize = -1; + MinSize = -1; + MaxSize = -1; /* Does drive match the one in the registry ? */ if (!_tcsncmp(pVirtMem->szPagingFiles, szDrive, 2)) { GetPageFileSizes(pVirtMem->szPagingFiles, - &InitialSize, - &MaximumSize); - } - - pVirtMem->Pagefile[PgCnt].InitialSize = InitialSize; - pVirtMem->Pagefile[PgCnt].MaximumSize = MaximumSize; + &MinSize, + &MaxSize); + } + + pVirtMem->Pagefile[PgCnt].OldMinSize = MinSize; + pVirtMem->Pagefile[PgCnt].OldMaxSize = MaxSize; + pVirtMem->Pagefile[PgCnt].NewMinSize = MinSize; + pVirtMem->Pagefile[PgCnt].NewMaxSize = MaxSize; pVirtMem->Pagefile[PgCnt].bUsed = TRUE; lstrcpy(pVirtMem->Pagefile[PgCnt].szDrive, szDrive); @@ -185,14 +187,14 @@ for (i = 0; i < pVirtMem->Count; ++i) { if (pVirtMem->Pagefile[i].bUsed && - pVirtMem->Pagefile[i].InitialSize != -1 && - pVirtMem->Pagefile[i].MaximumSize != -1) + pVirtMem->Pagefile[i].NewMinSize != -1 && + pVirtMem->Pagefile[i].NewMaxSize != -1) { _stprintf(szText, _T("%s\\pagefile.sys %i %i"), pVirtMem->Pagefile[i].szDrive, - pVirtMem->Pagefile[i].InitialSize, - pVirtMem->Pagefile[i].MaximumSize); + pVirtMem->Pagefile[i].NewMinSize, + pVirtMem->Pagefile[i].NewMaxSize); /* Add it to our overall registry string */ lstrcpy(szPagingFiles + nPos, szText); @@ -229,8 +231,26 @@ RegCloseKey(hk); } + if (bErr == FALSE) + { + /* Delete obsolete paging files on the next boot */ + for (i = 0; i < 26; i++) + { + if (pVirtMem->Pagefile[i].OldMinSize != -1 && + pVirtMem->Pagefile[i].NewMinSize == -1) + { + _stprintf(szText, + _T("%s\\pagefile.sys"), + pVirtMem->Pagefile[i].szDrive); + + MoveFileEx(szText, NULL, MOVEFILE_DELAY_UNTIL_REBOOT); + } + } + } + if (bErr) ShowLastWin32Error(pVirtMem->hSelf); + } @@ -283,16 +303,16 @@ { if (pVirtMem->Pagefile[i].bUsed) { - if ((pVirtMem->Pagefile[i].InitialSize == -1) && - (pVirtMem->Pagefile[i].MaximumSize == -1)) + if ((pVirtMem->Pagefile[i].NewMinSize == -1) && + (pVirtMem->Pagefile[i].NewMaxSize == -1)) { LoadString(hApplet, IDS_PAGEFILE_NONE, szSize, sizeof(szSize) / sizeof(szSize[0])); } - else if ((pVirtMem->Pagefile[i].InitialSize == 0) && - (pVirtMem->Pagefile[i].MaximumSize == 0)) + else if ((pVirtMem->Pagefile[i].NewMinSize == 0) && + (pVirtMem->Pagefile[i].NewMaxSize == 0)) { LoadString(hApplet, IDS_PAGEFILE_SYSTEM, @@ -302,8 +322,8 @@ else { _stprintf(szSize, _T("%d - %d"), - pVirtMem->Pagefile[i].InitialSize, - pVirtMem->Pagefile[i].MaximumSize); + pVirtMem->Pagefile[i].NewMinSize, + pVirtMem->Pagefile[i].NewMaxSize); } _stprintf(szDisplayString, @@ -331,16 +351,16 @@ TCHAR szDisplayString[256]; TCHAR szSize[64]; - if ((pVirtMem->Pagefile[DriveIndex].InitialSize == -1) && - (pVirtMem->Pagefile[DriveIndex].MaximumSize == -1)) + if ((pVirtMem->Pagefile[DriveIndex].NewMinSize == -1) && + (pVirtMem->Pagefile[DriveIndex].NewMaxSize == -1)) { LoadString(hApplet, IDS_PAGEFILE_NONE, szSize, sizeof(szSize) / sizeof(szSize[0])); } - else if ((pVirtMem->Pagefile[DriveIndex].InitialSize == 0) && - (pVirtMem->Pagefile[DriveIndex].MaximumSize == 0)) + else if ((pVirtMem->Pagefile[DriveIndex].NewMinSize == 0) && + (pVirtMem->Pagefile[DriveIndex].NewMaxSize == 0)) { LoadString(hApplet, IDS_PAGEFILE_SYSTEM, @@ -351,8 +371,8 @@ { _stprintf(szSize, _T("%d - %d"), - pVirtMem->Pagefile[DriveIndex].InitialSize, - pVirtMem->Pagefile[DriveIndex].MaximumSize); + pVirtMem->Pagefile[DriveIndex].NewMinSize, + pVirtMem->Pagefile[DriveIndex].NewMaxSize); } _stprintf(szDisplayString, @@ -371,8 +391,8 @@ OnSet(PVIRTMEM pVirtMem) { INT Index; - UINT InitialSize = -1; - UINT MaximumSize = -1; + UINT MinSize = -1; + UINT MaxSize = -1; BOOL bTranslated; INT DriveIndex = 0; @@ -393,10 +413,10 @@ if (IsDlgButtonChecked(pVirtMem->hSelf, IDC_CUSTOM) == BST_CHECKED) { - InitialSize = GetDlgItemInt(pVirtMem->hSelf, - IDC_INITIALSIZE, - &bTranslated, - FALSE); + MinSize = GetDlgItemInt(pVirtMem->hSelf, + IDC_INITIALSIZE, + &bTranslated, + FALSE); if (!bTranslated) { ResourceMessageBox(hApplet, @@ -407,10 +427,10 @@ return; } - MaximumSize = GetDlgItemInt(pVirtMem->hSelf, - IDC_MAXSIZE, - &bTranslated, - FALSE); + MaxSize = GetDlgItemInt(pVirtMem->hSelf, + IDC_MAXSIZE, + &bTranslated, + FALSE); if (!bTranslated) { ResourceMessageBox(hApplet, @@ -421,9 +441,9 @@ return; } - /* Check the valid range of the inial size */ - if (InitialSize < 2 || - InitialSize > pVirtMem->Pagefile[DriveIndex].FreeSize) + /* Check the valid range of the minimum size */ + if (MinSize < 2 || + MinSize > pVirtMem->Pagefile[DriveIndex].FreeSize) { ResourceMessageBox(hApplet, NULL, @@ -434,8 +454,8 @@ } /* Check the valid range of the maximum size */ - if (MaximumSize < InitialSize || - MaximumSize > pVirtMem->Pagefile[DriveIndex].FreeSize) + if (MaxSize < MinSize || + MaxSize > pVirtMem->Pagefile[DriveIndex].FreeSize) { ResourceMessageBox(hApplet, NULL, @@ -445,34 +465,34 @@ return; } - if ((pVirtMem->Pagefile[DriveIndex].InitialSize != InitialSize) && - (pVirtMem->Pagefile[DriveIndex].MaximumSize != MaximumSize)) + if ((pVirtMem->Pagefile[DriveIndex].NewMinSize != MinSize) && + (pVirtMem->Pagefile[DriveIndex].NewMaxSize != MaxSize)) pVirtMem->bModified = TRUE; - pVirtMem->Pagefile[DriveIndex].InitialSize = InitialSize; - pVirtMem->Pagefile[DriveIndex].MaximumSize = MaximumSize; + pVirtMem->Pagefile[DriveIndex].NewMinSize = MinSize; + pVirtMem->Pagefile[DriveIndex].NewMaxSize = MaxSize; pVirtMem->Pagefile[DriveIndex].bUsed = TRUE; } else if (IsDlgButtonChecked(pVirtMem->hSelf, IDC_NOPAGEFILE) == BST_CHECKED) { - if ((pVirtMem->Pagefile[DriveIndex].InitialSize != InitialSize) && - (pVirtMem->Pagefile[DriveIndex].MaximumSize != MaximumSize)) + if ((pVirtMem->Pagefile[DriveIndex].NewMinSize != MinSize) && + (pVirtMem->Pagefile[DriveIndex].NewMaxSize != MaxSize)) pVirtMem->bModified = TRUE; /* Set sizes to -1 */ - pVirtMem->Pagefile[DriveIndex].InitialSize = -1; - pVirtMem->Pagefile[DriveIndex].MaximumSize = -1; + pVirtMem->Pagefile[DriveIndex].NewMinSize = -1; + pVirtMem->Pagefile[DriveIndex].NewMaxSize = -1; pVirtMem->Pagefile[DriveIndex].bUsed = TRUE; } else { - if ((pVirtMem->Pagefile[DriveIndex].InitialSize != InitialSize) && - (pVirtMem->Pagefile[DriveIndex].MaximumSize != MaximumSize)) + if ((pVirtMem->Pagefile[DriveIndex].NewMinSize != MinSize) && + (pVirtMem->Pagefile[DriveIndex].NewMaxSize != MaxSize)) pVirtMem->bModified = TRUE; - pVirtMem->Pagefile[DriveIndex].InitialSize = 0; - pVirtMem->Pagefile[DriveIndex].MaximumSize = 0; + pVirtMem->Pagefile[DriveIndex].NewMinSize = 0; + pVirtMem->Pagefile[DriveIndex].NewMaxSize = 0; pVirtMem->Pagefile[DriveIndex].bUsed = TRUE; } @@ -510,8 +530,8 @@ SetDlgItemText(hwndDlg, IDC_SPACEAVAIL, szBuffer); } - if (pVirtMem->Pagefile[Index].InitialSize == -1 && - pVirtMem->Pagefile[Index].MaximumSize == -1) + if (pVirtMem->Pagefile[Index].NewMinSize == -1 && + pVirtMem->Pagefile[Index].NewMaxSize == -1) { /* No pagefile */ @@ -520,8 +540,8 @@ CheckDlgButton(pVirtMem->hSelf, IDC_NOPAGEFILE, BST_CHECKED); } - else if (pVirtMem->Pagefile[Index].InitialSize == 0 && - pVirtMem->Pagefile[Index].MaximumSize == 0) + else if (pVirtMem->Pagefile[Index].NewMinSize == 0 && + pVirtMem->Pagefile[Index].NewMaxSize == 0) { /* System managed size*/ @@ -540,12 +560,12 @@ SetDlgItemInt(pVirtMem->hSelf, IDC_INITIALSIZE, - pVirtMem->Pagefile[Index].InitialSize, + pVirtMem->Pagefile[Index].NewMinSize, FALSE); SetDlgItemInt(pVirtMem->hSelf, IDC_MAXSIZE, - pVirtMem->Pagefile[Index].MaximumSize, + pVirtMem->Pagefile[Index].NewMaxSize, FALSE); CheckDlgButton(pVirtMem->hSelf, @@ -611,8 +631,10 @@ for (i = 0; i < 26; i++) { pVirtMem->Pagefile[i].bUsed = FALSE; - pVirtMem->Pagefile[i].InitialSize = -1; - pVirtMem->Pagefile[i].MaximumSize = -1; + pVirtMem->Pagefile[i].OldMinSize = -1; + pVirtMem->Pagefile[i].OldMaxSize = -1; + pVirtMem->Pagefile[i].NewMinSize = -1; + pVirtMem->Pagefile[i].NewMaxSize = -1; } /* Load the pagefile systems from the reg */
10 years, 8 months
1
0
0
0
[akhaldi] 62764: [CMAKE] * Enable the PCH related warnings globally.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Apr 17 13:49:49 2014 New Revision: 62764 URL:
http://svn.reactos.org/svn/reactos?rev=62764&view=rev
Log: [CMAKE] * Enable the PCH related warnings globally. Modified: trunk/reactos/cmake/gcc.cmake Modified: trunk/reactos/cmake/gcc.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?rev=62764&…
============================================================================== --- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Thu Apr 17 13:49:49 2014 @@ -324,6 +324,7 @@ # Macros if(PCH) + add_compile_flags("-Winvalid-pch -Werror=invalid-pch") macro(add_pch _target _pch _sources) # When including x.h GCC looks for x.h.gch first set(_pch_final_name "${_target}_pch.h") @@ -351,7 +352,7 @@ # Include the gch in the specified source files, skipping the pch file itself list(REMOVE_ITEM ${_sources} ${_pch}) foreach(_src ${${_sources}}) - set_property(SOURCE ${_src} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_ccache_flag} -Winvalid-pch -Werror=invalid-pch -include ${_pch_final_name}") + set_property(SOURCE ${_src} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_ccache_flag} -include ${_pch_final_name}") set_property(SOURCE ${_src} APPEND PROPERTY OBJECT_DEPENDS ${_gch}) endforeach() endmacro()
10 years, 8 months
1
0
0
0
[hbelusca] 62763: [CONSRV] Code "symmetrization" (see the upper helper function).
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Apr 17 00:46:43 2014 New Revision: 62763 URL:
http://svn.reactos.org/svn/reactos?rev=62763&view=rev
Log: [CONSRV] Code "symmetrization" (see the upper helper function). Modified: trunk/reactos/win32ss/user/winsrv/consrv/condrv/coninput.c Modified: trunk/reactos/win32ss/user/winsrv/consrv/condrv/coninput.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/consrv/condrv/coninput.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/consrv/condrv/coninput.c [iso-8859-1] Thu Apr 17 00:46:43 2014 @@ -51,6 +51,19 @@ ConsoleInputUnicodeCharToAnsiChar(Console, &InputEvent->Event.KeyEvent.uChar.AsciiChar, &UnicodeChar); + } +} + +static VOID FASTCALL +ConioInputEventToUnicode(PCONSOLE Console, PINPUT_RECORD InputEvent) +{ + if (InputEvent->EventType == KEY_EVENT) + { + CHAR AsciiChar = InputEvent->Event.KeyEvent.uChar.AsciiChar; + InputEvent->Event.KeyEvent.uChar.AsciiChar = 0; + ConsoleInputAnsiCharToUnicodeChar(Console, + &InputEvent->Event.KeyEvent.uChar.UnicodeChar, + &AsciiChar); } } @@ -465,12 +478,9 @@ for (i = (NumEventsWritten ? *NumEventsWritten : 0); i < NumEventsToWrite && NT_SUCCESS(Status); ++i) { - if (InputRecord->EventType == KEY_EVENT && !Unicode) - { - CHAR AsciiChar = InputRecord->Event.KeyEvent.uChar.AsciiChar; - ConsoleInputAnsiCharToUnicodeChar(Console, - &InputRecord->Event.KeyEvent.uChar.UnicodeChar, - &AsciiChar); + if (!Unicode) + { + ConioInputEventToUnicode(Console, InputRecord); } Status = ConioAddInputEvent(Console, InputRecord++, AppendToEnd);
10 years, 8 months
1
0
0
0
[khornicek] 62762: [LIBWINE] - apply r61265 and use relative paths
by khornicek@svn.reactos.org
Author: khornicek Date: Wed Apr 16 23:17:59 2014 New Revision: 62762 URL:
http://svn.reactos.org/svn/reactos?rev=62762&view=rev
Log: [LIBWINE] - apply r61265 and use relative paths Modified: trunk/reactos/include/reactos/wine/debug.h Modified: trunk/reactos/include/reactos/wine/debug.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/debug…
============================================================================== --- trunk/reactos/include/reactos/wine/debug.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/wine/debug.h [iso-8859-1] Wed Apr 16 23:17:59 2014 @@ -25,6 +25,12 @@ #include <windef.h> #ifndef GUID_DEFINED #include <guiddef.h> +#endif + +#include <builddir.h> + +#if !defined(__RELFILE__) +#define __RELFILE__ __FILE__ #endif #ifdef __WINE_WINE_TEST_H @@ -91,7 +97,7 @@ __WINE_DBG_LOG #define __WINE_DBG_LOG(args...) \ - ros_dbg_log( __dbcl, __dbch, __FILE__, __FUNCTION__, __LINE__, args); } } while(0) + ros_dbg_log( __dbcl, __dbch, __RELFILE__, __FUNCTION__, __LINE__, args); } } while(0) #define __WINE_PRINTF_ATTR(fmt,args) /*__attribute__((format (printf,fmt,args)))*/
10 years, 8 months
1
0
0
0
[khornicek] 62761: [LIBWINE] - bring back the old debug output format ie class:(file:line), Testman depends on this
by khornicek@svn.reactos.org
Author: khornicek Date: Wed Apr 16 22:47:40 2014 New Revision: 62761 URL:
http://svn.reactos.org/svn/reactos?rev=62761&view=rev
Log: [LIBWINE] - bring back the old debug output format ie class:(file:line), Testman depends on this Modified: trunk/reactos/include/reactos/wine/debug.h trunk/reactos/lib/3rdparty/libwine/debug.c Modified: trunk/reactos/include/reactos/wine/debug.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/debug…
============================================================================== --- trunk/reactos/include/reactos/wine/debug.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/wine/debug.h [iso-8859-1] Wed Apr 16 22:47:40 2014 @@ -91,7 +91,7 @@ __WINE_DBG_LOG #define __WINE_DBG_LOG(args...) \ - wine_dbg_log( __dbcl, __dbch, __FUNCTION__, args); } } while(0) + ros_dbg_log( __dbcl, __dbch, __FILE__, __FUNCTION__, __LINE__, args); } } while(0) #define __WINE_PRINTF_ATTR(fmt,args) /*__attribute__((format (printf,fmt,args)))*/ @@ -137,7 +137,7 @@ #define __WINE_DPRINTF(dbcl,dbch) \ (!__WINE_GET_DEBUGGING(dbcl,(dbch)) || \ - (wine_dbg_log(__WINE_DBCL##dbcl,(dbch),__FILE__,"%d: ",__LINE__) == -1)) ? \ + (ros_dbg_log(__WINE_DBCL##dbcl,(dbch),__FILE__,"",__LINE__,"") == -1)) ? \ (void)0 : (void)wine_dbg_printf #define __WINE_PRINTF_ATTR(fmt, args) @@ -152,7 +152,7 @@ const char * (*dbgstr_wn)( const WCHAR *s, int n ); int (*dbg_vprintf)( const char *format, va_list args ); int (*dbg_vlog)( enum __wine_debug_class cls, struct __wine_debug_channel *channel, - const char *function, const char *format, va_list args ); + const char *file, const char *function, const int line, const char *format, va_list args ); }; extern unsigned char __wine_dbg_get_channel_flags( struct __wine_debug_channel *channel ); @@ -175,6 +175,9 @@ extern int wine_dbg_printf( const char *format, ... ) __WINE_PRINTF_ATTR(1,2); extern int wine_dbg_log( enum __wine_debug_class cls, struct __wine_debug_channel *ch, const char *func, const char *format, ... ) __WINE_PRINTF_ATTR(4,5); +/* ReactOS compliant debug format */ +extern int ros_dbg_log( enum __wine_debug_class cls, struct __wine_debug_channel *ch, const char *file, + const char *func, const int line, const char *format, ... ) __WINE_PRINTF_ATTR(6,7); static __inline const char *wine_dbgstr_a( const char *s ) { Modified: trunk/reactos/lib/3rdparty/libwine/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/libwine/debug…
============================================================================== --- trunk/reactos/lib/3rdparty/libwine/debug.c [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/libwine/debug.c [iso-8859-1] Wed Apr 16 22:47:40 2014 @@ -247,7 +247,23 @@ if (!(__wine_dbg_get_channel_flags( channel ) & (1 << cls))) return -1; va_start(valist, format); - ret = funcs.dbg_vlog( cls, channel, func, format, valist ); + ret = funcs.dbg_vlog( cls, channel, NULL, func, 0, format, valist ); + va_end(valist); + return ret; +} + + +/* ReactOS compliant debug format wrapper for funcs.dbg_vlog */ +int ros_dbg_log( enum __wine_debug_class cls, struct __wine_debug_channel *channel, + const char *file, const char *func, const int line, const char *format, ... ) +{ + int ret; + va_list valist; + + if (!(__wine_dbg_get_channel_flags( channel ) & (1 << cls))) return -1; + + va_start(valist, format); + ret = funcs.dbg_vlog( cls, channel, file, func, line, format, valist ); va_end(valist); return ret; } @@ -396,12 +412,18 @@ /* default implementation of wine_dbg_vlog */ static int default_dbg_vlog( enum __wine_debug_class cls, struct __wine_debug_channel *channel, - const char *func, const char *format, va_list args ) + const char *file, const char *func, const int line, const char *format, va_list args ) { int ret = 0; if (cls < sizeof(debug_classes)/sizeof(debug_classes[0])) - ret += wine_dbg_printf( "%s:%s:%s ", debug_classes[cls], channel->name, func ); + ret += wine_dbg_printf( "%s:", debug_classes[cls] ); + + if (file && line) + ret += wine_dbg_printf ( "(%s:%d) ", file, line ); + else + ret += wine_dbg_printf( "%s:%s: ", channel->name, func ); + if (format) ret += funcs.dbg_vprintf( format, args ); return ret;
10 years, 8 months
1
0
0
0
[hbelusca] 62760: [KERNEL32] Fix a DPRINT. [CONSRV] Some code reorganization and few fixes.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Apr 16 22:25:29 2014 New Revision: 62760 URL:
http://svn.reactos.org/svn/reactos?rev=62760&view=rev
Log: [KERNEL32] Fix a DPRINT. [CONSRV] Some code reorganization and few fixes. Modified: trunk/reactos/dll/win32/kernel32/client/console/init.c trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c Modified: trunk/reactos/dll/win32/kernel32/client/console/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/client/console/init.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/console/init.c [iso-8859-1] Wed Apr 16 22:25:29 2014 @@ -70,7 +70,7 @@ if (ConsoleLibrary == NULL) { - DPRINT1("Failed to load console.dll"); + DPRINT1("Failed to load console.dll\n"); AlreadyDisplayingProps = FALSE; return STATUS_UNSUCCESSFUL; } Modified: trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c [iso-8859-1] Wed Apr 16 22:25:29 2014 @@ -200,8 +200,8 @@ } static VOID -GuiConsoleAppendMenuItems(HMENU hMenu, - const GUICONSOLE_MENUITEM *Items) +AppendMenuItems(HMENU hMenu, + const GUICONSOLE_MENUITEM *Items) { UINT i = 0; WCHAR szMenuString[255]; @@ -221,8 +221,7 @@ hSubMenu = CreatePopupMenu(); if (hSubMenu != NULL) { - GuiConsoleAppendMenuItems(hSubMenu, - Items[i].SubMenu); + AppendMenuItems(hSubMenu, Items[i].SubMenu); if (!AppendMenuW(hMenu, MF_STRING | MF_POPUP, @@ -254,18 +253,18 @@ } static VOID -GuiConsoleCreateSysMenu(HWND hWnd) +CreateSysMenu(HWND hWnd) { HMENU hMenu = GetSystemMenu(hWnd, FALSE); if (hMenu != NULL) { - GuiConsoleAppendMenuItems(hMenu, GuiConsoleMainMenuItems); + AppendMenuItems(hMenu, GuiConsoleMainMenuItems); DrawMenuBar(hWnd); } } static VOID -GuiSendMenuEvent(PCONSOLE Console, UINT CmdId) +SendMenuEvent(PCONSOLE Console, UINT CmdId) { INPUT_RECORD er; @@ -277,27 +276,83 @@ } static VOID -GuiConsoleCopy(PGUI_CONSOLE_DATA GuiData); +Copy(PGUI_CONSOLE_DATA GuiData); static VOID -GuiConsolePaste(PGUI_CONSOLE_DATA GuiData); +Paste(PGUI_CONSOLE_DATA GuiData); static VOID -GuiConsoleUpdateSelection(PCONSOLE Console, PCOORD coord); +UpdateSelection(PGUI_CONSOLE_DATA GuiData, PCOORD coord); + static VOID -GuiConsoleResizeWindow(PGUI_CONSOLE_DATA GuiData, DWORD WidthUnit, DWORD HeightUnit); +Mark(PGUI_CONSOLE_DATA GuiData) +{ + PCONSOLE Console = GuiData->Console; + PCONSOLE_SCREEN_BUFFER ActiveBuffer = GuiData->ActiveBuffer; + + /* Clear the old selection */ + // UpdateSelection(GuiData, NULL); + Console->Selection.dwFlags = CONSOLE_NO_SELECTION; + + /* Restart a new selection */ + Console->dwSelectionCursor.X = ActiveBuffer->ViewOrigin.X; + Console->dwSelectionCursor.Y = ActiveBuffer->ViewOrigin.Y; + Console->Selection.dwSelectionAnchor = Console->dwSelectionCursor; + UpdateSelection(GuiData, &Console->Selection.dwSelectionAnchor); +} + +static VOID +SelectAll(PGUI_CONSOLE_DATA GuiData) +{ + PCONSOLE Console = GuiData->Console; + PCONSOLE_SCREEN_BUFFER ActiveBuffer = GuiData->ActiveBuffer; + + /* Clear the old selection */ + // UpdateSelection(GuiData, NULL); + Console->Selection.dwFlags = CONSOLE_NO_SELECTION; + + /* + * The selection area extends to the whole screen buffer's width. + */ + Console->Selection.dwSelectionAnchor.X = 0; + Console->Selection.dwSelectionAnchor.Y = 0; + Console->dwSelectionCursor.X = ActiveBuffer->ScreenBufferSize.X - 1; + + /* + * Determine whether the selection must extend to just some part + * (for text-mode screen buffers) or to all of the screen buffer's + * height (for graphics ones). + */ + if (GetType(ActiveBuffer) == TEXTMODE_BUFFER) + { + /* + * We select all the characters from the first line + * to the line where the cursor is positioned. + */ + Console->dwSelectionCursor.Y = ActiveBuffer->CursorPosition.Y; + } + else /* if (GetType(ActiveBuffer) == GRAPHICS_BUFFER) */ + { + /* + * We select all the screen buffer area. + */ + Console->dwSelectionCursor.Y = ActiveBuffer->ScreenBufferSize.Y - 1; + } + + /* Restart a new selection */ + Console->Selection.dwFlags |= CONSOLE_MOUSE_SELECTION; + UpdateSelection(GuiData, &Console->dwSelectionCursor); +} static LRESULT -GuiConsoleHandleSysMenuCommand(PGUI_CONSOLE_DATA GuiData, WPARAM wParam, LPARAM lParam) +OnCommand(PGUI_CONSOLE_DATA GuiData, WPARAM wParam, LPARAM lParam) { LRESULT Ret = TRUE; PCONSOLE Console = GuiData->Console; - PCONSOLE_SCREEN_BUFFER ActiveBuffer; if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) { Ret = FALSE; goto Quit; } - ActiveBuffer = GuiData->ActiveBuffer; /* * In case the selected menu item belongs to the user-reserved menu id range, @@ -306,7 +361,7 @@ */ if (GuiData->CmdIdLow <= (UINT)wParam && (UINT)wParam <= GuiData->CmdIdHigh) { - GuiSendMenuEvent(Console, (UINT)wParam); + SendMenuEvent(Console, (UINT)wParam); goto Unlock_Quit; } @@ -314,68 +369,20 @@ switch (wParam) { case ID_SYSTEM_EDIT_MARK: - { - /* Clear the old selection */ - // GuiConsoleUpdateSelection(Console, NULL); - Console->Selection.dwFlags = CONSOLE_NO_SELECTION; - - /* Restart a new selection */ - Console->dwSelectionCursor.X = ActiveBuffer->ViewOrigin.X; - Console->dwSelectionCursor.Y = ActiveBuffer->ViewOrigin.Y; - Console->Selection.dwSelectionAnchor = Console->dwSelectionCursor; - GuiConsoleUpdateSelection(Console, &Console->Selection.dwSelectionAnchor); - - break; - } + Mark(GuiData); + break; case ID_SYSTEM_EDIT_COPY: - GuiConsoleCopy(GuiData); + Copy(GuiData); break; case ID_SYSTEM_EDIT_PASTE: - GuiConsolePaste(GuiData); + Paste(GuiData); break; case ID_SYSTEM_EDIT_SELECTALL: - { - /* Clear the old selection */ - // GuiConsoleUpdateSelection(Console, NULL); - Console->Selection.dwFlags = CONSOLE_NO_SELECTION; - - /* - * The selection area extends to the whole screen buffer's width. - */ - Console->Selection.dwSelectionAnchor.X = 0; - Console->Selection.dwSelectionAnchor.Y = 0; - Console->dwSelectionCursor.X = ActiveBuffer->ScreenBufferSize.X - 1; - - /* - * Determine whether the selection must extend to just some part - * (for text-mode screen buffers) or to all of the screen buffer's - * height (for graphics ones). - */ - if (GetType(ActiveBuffer) == TEXTMODE_BUFFER) - { - /* - * We select all the characters from the first line - * to the line where the cursor is positioned. - */ - Console->dwSelectionCursor.Y = ActiveBuffer->CursorPosition.Y; - } - else /* if (GetType(ActiveBuffer) == GRAPHICS_BUFFER) */ - { - /* - * We select all the screen buffer area. - */ - Console->dwSelectionCursor.Y = ActiveBuffer->ScreenBufferSize.Y - 1; - } - - /* Restart a new selection */ - Console->Selection.dwFlags |= CONSOLE_MOUSE_SELECTION; - GuiConsoleUpdateSelection(Console, &Console->dwSelectionCursor); - - break; - } + SelectAll(GuiData); + break; case ID_SYSTEM_EDIT_SCROLL: DPRINT1("Scrolling is not handled yet\n"); @@ -416,7 +423,7 @@ } static VOID -GuiConsoleResizeWindow(PGUI_CONSOLE_DATA GuiData, DWORD WidthUnit, DWORD HeightUnit) +ResizeConWnd(PGUI_CONSOLE_DATA GuiData, DWORD WidthUnit, DWORD HeightUnit) { PCONSOLE_SCREEN_BUFFER Buff = GuiData->ActiveBuffer; SCROLLINFO sInfo; @@ -468,7 +475,7 @@ } static BOOL -GuiConsoleHandleNcCreate(HWND hWnd, LPCREATESTRUCTW Create) +OnNcCreate(HWND hWnd, LPCREATESTRUCTW Create) { PGUI_CONSOLE_DATA GuiData = (PGUI_CONSOLE_DATA)Create->lpCreateParams; PCONSOLE Console; @@ -476,8 +483,6 @@ HFONT OldFont; TEXTMETRICW Metrics; SIZE CharSize; - - DPRINT("GuiConsoleHandleNcCreate\n"); if (NULL == GuiData) { @@ -556,6 +561,13 @@ GuiData->hBitmap = NULL; GuiData->hSysPalette = NULL; /* Original system palette */ + /* Update the icons of the window */ + if (GuiData->hIcon != ghDefaultIcon) + { + DefWindowProcW(GuiData->hWindow, WM_SETICON, ICON_BIG , (LPARAM)GuiData->hIcon ); + DefWindowProcW(GuiData->hWindow, WM_SETICON, ICON_SMALL, (LPARAM)GuiData->hIconSm); + } + // FIXME: Keep these instructions here ? /////////////////////////////////// Console->ActiveBuffer->CursorBlinkOn = TRUE; Console->ActiveBuffer->ForceCursorOff = FALSE; @@ -564,12 +576,81 @@ SetWindowLongPtrW(GuiData->hWindow, GWLP_USERDATA, (DWORD_PTR)GuiData); SetTimer(GuiData->hWindow, CONGUI_UPDATE_TIMER, CONGUI_UPDATE_TIME, NULL); - GuiConsoleCreateSysMenu(GuiData->hWindow); - - DPRINT("GuiConsoleHandleNcCreate - setting start event\n"); + CreateSysMenu(GuiData->hWindow); + + DPRINT("OnNcCreate - setting start event\n"); SetEvent(GuiData->hGuiInitEvent); return (BOOL)DefWindowProcW(GuiData->hWindow, WM_NCCREATE, 0, (LPARAM)Create); +} + + +BOOL +EnterFullScreen(PGUI_CONSOLE_DATA GuiData); +VOID +LeaveFullScreen(PGUI_CONSOLE_DATA GuiData); +VOID +SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen); +VOID +GuiConsoleSwitchFullScreen(PGUI_CONSOLE_DATA GuiData); + +static VOID +OnActivate(PGUI_CONSOLE_DATA GuiData, WPARAM wParam) +{ + PCONSOLE Console = GuiData->Console; + WORD ActivationState = LOWORD(wParam); + + DPRINT1("WM_ACTIVATE - ActivationState = %d\n"); + + if ( ActivationState == WA_ACTIVE || + ActivationState == WA_CLICKACTIVE ) + { + if (GuiData->GuiInfo.FullScreen) + { + EnterFullScreen(GuiData); + // // PostMessageW(GuiData->hWindow, WM_SYSCOMMAND, SC_RESTORE, 0); + // SendMessageW(GuiData->hWindow, WM_SYSCOMMAND, SC_RESTORE, 0); + } + } + else // if (ActivationState == WA_INACTIVE) + { + if (GuiData->GuiInfo.FullScreen) + { + SendMessageW(GuiData->hWindow, WM_SYSCOMMAND, SC_MINIMIZE, 0); + LeaveFullScreen(GuiData); + // // PostMessageW(GuiData->hWindow, WM_SYSCOMMAND, SC_MINIMIZE, 0); + // SendMessageW(GuiData->hWindow, WM_SYSCOMMAND, SC_MINIMIZE, 0); + } + } + + /* + * When we are in QuickEdit mode, ignore the next mouse signal + * when we are going to be enabled again via the mouse, in order + * to prevent e.g. an erroneous right-click from the user which + * would have as an effect to paste some unwanted text... + */ + if (Console->QuickEdit && (ActivationState == WA_CLICKACTIVE)) + GuiData->IgnoreNextMouseSignal = TRUE; +} + +static VOID +OnFocus(PGUI_CONSOLE_DATA GuiData, BOOL SetFocus) +{ + PCONSOLE Console = GuiData->Console; + INPUT_RECORD er; + + if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return; + + er.EventType = FOCUS_EVENT; + er.Event.FocusEvent.bSetFocus = SetFocus; + ConioProcessInputEvent(Console, &er); + + if (SetFocus) + DPRINT1("TODO: Create console caret\n"); + else + DPRINT1("TODO: Destroy console caret\n"); + + LeaveCriticalSection(&Console->Lock); } static VOID @@ -587,9 +668,9 @@ } static VOID -GuiConsoleUpdateSelection(PCONSOLE Console, PCOORD coord) -{ - PGUI_CONSOLE_DATA GuiData = Console->TermIFace.Data; +UpdateSelection(PGUI_CONSOLE_DATA GuiData, PCOORD coord) +{ + PCONSOLE Console = GuiData->Console; RECT oldRect; SmallRectToRect(GuiData, &oldRect, &Console->Selection.srSelection); @@ -696,7 +777,7 @@ PRECT rcFramebuffer); static VOID -GuiConsoleHandlePaint(PGUI_CONSOLE_DATA GuiData) +OnPaint(PGUI_CONSOLE_DATA GuiData) { BOOL Success = TRUE; PCONSOLE Console = GuiData->Console; @@ -763,6 +844,27 @@ DefWindowProcW(GuiData->hWindow, WM_PAINT, 0, 0); return; +} + +static VOID +OnPaletteChanged(PGUI_CONSOLE_DATA GuiData) +{ + PCONSOLE_SCREEN_BUFFER ActiveBuffer = GuiData->ActiveBuffer; + + // See WM_PALETTECHANGED message + // if ((HWND)wParam == hWnd) break; + + // if (GetType(ActiveBuffer) == GRAPHICS_BUFFER) + if (ActiveBuffer->PaletteHandle) + { + DPRINT("WM_PALETTECHANGED changing palette\n"); + + /* Specify the use of the system palette for the framebuffer */ + SetSystemPaletteUse(GuiData->hMemDC, ActiveBuffer->PaletteUsage); + + /* Realize the (logical) palette */ + RealizePalette(GuiData->hMemDC); + } } static BOOL @@ -789,7 +891,7 @@ } static VOID -GuiConsoleHandleKey(PGUI_CONSOLE_DATA GuiData, UINT msg, WPARAM wParam, LPARAM lParam) +OnKey(PGUI_CONSOLE_DATA GuiData, UINT msg, WPARAM wParam, LPARAM lParam) { PCONSOLE Console = GuiData->Console; PCONSOLE_SCREEN_BUFFER ActiveBuffer; @@ -807,14 +909,14 @@ if (VirtualKeyCode == VK_RETURN) { /* Copy (and clear) selection if ENTER is pressed */ - GuiConsoleCopy(GuiData); + Copy(GuiData); goto Quit; } else if ( VirtualKeyCode == VK_ESCAPE || (VirtualKeyCode == 'C' && GetKeyState(VK_CONTROL) & 0x8000) ) { /* Cancel selection if ESC or Ctrl-C are pressed */ - GuiConsoleUpdateSelection(Console, NULL); + UpdateSelection(GuiData, NULL); goto Quit; } @@ -906,7 +1008,7 @@ if (!MajPressed) Console->Selection.dwSelectionAnchor = Console->dwSelectionCursor; - GuiConsoleUpdateSelection(Console, &Console->dwSelectionCursor); + UpdateSelection(GuiData, &Console->dwSelectionCursor); } else if (!IsSystemKey(VirtualKeyCode)) { @@ -923,7 +1025,7 @@ if (!IsSystemKey(VirtualKeyCode)) { /* Clear the selection and send the key into the input buffer */ - GuiConsoleUpdateSelection(Console, NULL); + UpdateSelection(GuiData, NULL); } else { @@ -949,12 +1051,13 @@ } -// FIXME: Remove after fixing GuiConsoleHandleTimer +// FIXME: Remove after fixing OnTimer VOID -GuiInvalidateCell(IN OUT PFRONTEND This, SHORT x, SHORT y); +InvalidateCell(PGUI_CONSOLE_DATA GuiData, + SHORT x, SHORT y); static VOID -GuiConsoleHandleTimer(PGUI_CONSOLE_DATA GuiData) +OnTimer(PGUI_CONSOLE_DATA GuiData) { PCONSOLE Console = GuiData->Console; PCONSOLE_SCREEN_BUFFER Buff; @@ -967,7 +1070,7 @@ if (GetType(Buff) == TEXTMODE_BUFFER) { - GuiInvalidateCell(&Console->TermIFace, Buff->CursorPosition.X, Buff->CursorPosition.Y); + InvalidateCell(GuiData, Buff->CursorPosition.X, Buff->CursorPosition.Y); Buff->CursorBlinkOn = !Buff->CursorBlinkOn; if ((GuiData->OldCursor.x != Buff->CursorPosition.X) || @@ -1059,7 +1162,7 @@ } static BOOL -GuiConsoleHandleClose(PGUI_CONSOLE_DATA GuiData) +OnClose(PGUI_CONSOLE_DATA GuiData) { PCONSOLE Console = GuiData->Console; @@ -1080,7 +1183,7 @@ } static LRESULT -GuiConsoleHandleNcDestroy(HWND hWnd) +OnNcDestroy(HWND hWnd) { PGUI_CONSOLE_DATA GuiData = GuiGetGuiData(hWnd); @@ -1129,7 +1232,7 @@ } static LRESULT -GuiConsoleHandleMouse(PGUI_CONSOLE_DATA GuiData, UINT msg, WPARAM wParam, LPARAM lParam) +OnMouse(PGUI_CONSOLE_DATA GuiData, UINT msg, WPARAM wParam, LPARAM lParam) { BOOL Err = FALSE; PCONSOLE Console = GuiData->Console; @@ -1172,14 +1275,14 @@ case WM_LBUTTONDOWN: { /* Clear the old selection */ - // GuiConsoleUpdateSelection(Console, NULL); + // UpdateSelection(GuiData, NULL); Console->Selection.dwFlags = CONSOLE_NO_SELECTION; /* Restart a new selection */ Console->Selection.dwSelectionAnchor = PointToCoord(GuiData, lParam); SetCapture(GuiData->hWindow); Console->Selection.dwFlags |= CONSOLE_MOUSE_SELECTION | CONSOLE_MOUSE_DOWN; - GuiConsoleUpdateSelection(Console, &Console->Selection.dwSelectionAnchor); + UpdateSelection(GuiData, &Console->Selection.dwSelectionAnchor); break; } @@ -1192,7 +1295,7 @@ // c = PointToCoord(GuiData, lParam); Console->Selection.dwFlags &= ~CONSOLE_MOUSE_DOWN; - // GuiConsoleUpdateSelection(Console, &c); + // UpdateSelection(GuiData, &c); ReleaseCapture(); break; @@ -1241,7 +1344,7 @@ Console->dwSelectionCursor = cR; Console->Selection.dwFlags |= CONSOLE_MOUSE_SELECTION | CONSOLE_MOUSE_DOWN; - GuiConsoleUpdateSelection(Console, &Console->dwSelectionCursor); + UpdateSelection(GuiData, &Console->dwSelectionCursor); /* Ignore the next mouse move signal */ GuiData->IgnoreNextMouseSignal = TRUE; @@ -1255,11 +1358,11 @@ { if (!(Console->Selection.dwFlags & CONSOLE_SELECTION_NOT_EMPTY)) { - GuiConsolePaste(GuiData); + Paste(GuiData); } else { - GuiConsoleCopy(GuiData); + Copy(GuiData); } /* Ignore the next mouse move signal */ @@ -1275,7 +1378,7 @@ if (!(Console->Selection.dwFlags & CONSOLE_MOUSE_DOWN)) break; c = PointToCoord(GuiData, lParam); /* TODO: Scroll buffer to bring c into view */ - GuiConsoleUpdateSelection(Console, &c); + UpdateSelection(GuiData, &c); break; } @@ -1426,10 +1529,8 @@ PGUI_CONSOLE_DATA GuiData); static VOID -GuiConsoleCopy(PGUI_CONSOLE_DATA GuiData) -{ - PCONSOLE Console = GuiData->Console; - +Copy(PGUI_CONSOLE_DATA GuiData) +{ if (OpenClipboard(GuiData->hWindow) == TRUE) { PCONSOLE_SCREEN_BUFFER Buffer = GuiData->ActiveBuffer; @@ -1447,7 +1548,7 @@ } /* Clear the selection */ - GuiConsoleUpdateSelection(Console, NULL); + UpdateSelection(GuiData, NULL); } VOID @@ -1458,7 +1559,7 @@ PGUI_CONSOLE_DATA GuiData); static VOID -GuiConsolePaste(PGUI_CONSOLE_DATA GuiData) +Paste(PGUI_CONSOLE_DATA GuiData) { if (OpenClipboard(GuiData->hWindow) == TRUE) { @@ -1478,7 +1579,7 @@ } static VOID -GuiConsoleGetMinMaxInfo(PGUI_CONSOLE_DATA GuiData, PMINMAXINFO minMaxInfo) +OnGetMinMaxInfo(PGUI_CONSOLE_DATA GuiData, PMINMAXINFO minMaxInfo) { PCONSOLE Console = GuiData->Console; PCONSOLE_SCREEN_BUFFER ActiveBuffer; @@ -1510,7 +1611,7 @@ } static VOID -GuiConsoleResize(PGUI_CONSOLE_DATA GuiData, WPARAM wParam, LPARAM lParam) +OnSize(PGUI_CONSOLE_DATA GuiData, WPARAM wParam, LPARAM lParam) { PCONSOLE Console = GuiData->Console; @@ -1559,7 +1660,7 @@ Buff->ViewSize.Y = (chary <= Buff->ScreenBufferSize.Y) ? chary : Buff->ScreenBufferSize.Y; } - GuiConsoleResizeWindow(GuiData, WidthUnit, HeightUnit); + ResizeConWnd(GuiData, WidthUnit, HeightUnit); // Adjust the start of the visible area if we are attempting to show nonexistent areas if ((Buff->ScreenBufferSize.X - Buff->ViewOrigin.X) < Buff->ViewSize.X) Buff->ViewOrigin.X = Buff->ScreenBufferSize.X - Buff->ViewSize.X; @@ -1568,6 +1669,25 @@ GuiData->WindowSizeLock = FALSE; } + + LeaveCriticalSection(&Console->Lock); +} + +static VOID +OnMove(PGUI_CONSOLE_DATA GuiData) +{ + PCONSOLE Console = GuiData->Console; + RECT rcWnd; + + if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return; + + // TODO: Simplify the code. + // See: GuiConsoleNotifyWndProc() PM_CREATE_CONSOLE. + + /* Retrieve our real position */ + GetWindowRect(GuiData->hWindow, &rcWnd); + GuiData->GuiInfo.WindowOrigin.x = rcWnd.left; + GuiData->GuiInfo.WindowOrigin.y = rcWnd.top; LeaveCriticalSection(&Console->Lock); } @@ -1602,7 +1722,7 @@ */ static LRESULT -GuiConsoleHandleScroll(PGUI_CONSOLE_DATA GuiData, UINT uMsg, WPARAM wParam) +OnScroll(PGUI_CONSOLE_DATA GuiData, UINT uMsg, WPARAM wParam) { PCONSOLE Console = GuiData->Console; PCONSOLE_SCREEN_BUFFER Buff; @@ -1710,15 +1830,6 @@ } -BOOL -EnterFullScreen(PGUI_CONSOLE_DATA GuiData); -VOID -LeaveFullScreen(PGUI_CONSOLE_DATA GuiData); -VOID -SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen); -VOID -GuiConsoleSwitchFullScreen(PGUI_CONSOLE_DATA GuiData); - static LRESULT CALLBACK ConWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { @@ -1734,11 +1845,11 @@ */ if (msg == WM_NCCREATE) { - return (LRESULT)GuiConsoleHandleNcCreate(hWnd, (LPCREATESTRUCTW)lParam); + return (LRESULT)OnNcCreate(hWnd, (LPCREATESTRUCTW)lParam); } else if (msg == WM_NCDESTROY) { - return GuiConsoleHandleNcDestroy(hWnd); + return OnNcDestroy(hWnd); } /* @@ -1763,60 +1874,23 @@ switch (msg) { case WM_ACTIVATE: - { - WORD ActivationState = LOWORD(wParam); - - DPRINT1("WM_ACTIVATE - ActivationState = %d\n"); - - if ( ActivationState == WA_ACTIVE || - ActivationState == WA_CLICKACTIVE ) - { - if (GuiData->GuiInfo.FullScreen) - { - EnterFullScreen(GuiData); - // // PostMessageW(GuiData->hWindow, WM_SYSCOMMAND, SC_RESTORE, 0); - // SendMessageW(GuiData->hWindow, WM_SYSCOMMAND, SC_RESTORE, 0); - } - } - else // if (ActivationState == WA_INACTIVE) - { - if (GuiData->GuiInfo.FullScreen) - { - SendMessageW(GuiData->hWindow, WM_SYSCOMMAND, SC_MINIMIZE, 0); - LeaveFullScreen(GuiData); - // // PostMessageW(GuiData->hWindow, WM_SYSCOMMAND, SC_MINIMIZE, 0); - // SendMessageW(GuiData->hWindow, WM_SYSCOMMAND, SC_MINIMIZE, 0); - } - } - - /* - * When we are in QuickEdit mode, ignore the next mouse signal - * when we are going to be enabled again via the mouse, in order - * to prevent e.g. an erroneous right-click from the user which - * would have as an effect to paste some unwanted text... - */ - if (Console->QuickEdit && (ActivationState == WA_CLICKACTIVE)) - GuiData->IgnoreNextMouseSignal = TRUE; - - break; - } + OnActivate(GuiData, wParam); + break; case WM_CLOSE: - if (GuiConsoleHandleClose(GuiData)) goto Default; + if (OnClose(GuiData)) goto Default; break; case WM_PAINT: - GuiConsoleHandlePaint(GuiData); + OnPaint(GuiData); break; case WM_TIMER: - GuiConsoleHandleTimer(GuiData); + OnTimer(GuiData); break; case WM_PALETTECHANGED: { - PCONSOLE_SCREEN_BUFFER ActiveBuffer = GuiData->ActiveBuffer; - DPRINT("WM_PALETTECHANGED called\n"); /* @@ -1835,21 +1909,8 @@ if ((HWND)wParam == hWnd) break; DPRINT("WM_PALETTECHANGED ok\n"); - - // if (GetType(ActiveBuffer) == GRAPHICS_BUFFER) - if (ActiveBuffer->PaletteHandle) - { - DPRINT("WM_PALETTECHANGED changing palette\n"); - - /* Specify the use of the system palette for the framebuffer */ - SetSystemPaletteUse(GuiData->hMemDC, ActiveBuffer->PaletteUsage); - - /* Realize the (logical) palette */ - RealizePalette(GuiData->hMemDC); - } - + OnPaletteChanged(GuiData); DPRINT("WM_PALETTECHANGED quit\n"); - break; } @@ -1872,7 +1933,7 @@ break; } - GuiConsoleHandleKey(GuiData, msg, wParam, lParam); + OnKey(GuiData, msg, wParam, lParam); break; } @@ -1937,40 +1998,16 @@ case WM_MOUSEWHEEL: case WM_MOUSEHWHEEL: { - Result = GuiConsoleHandleMouse(GuiData, msg, wParam, lParam); + Result = OnMouse(GuiData, msg, wParam, lParam); break; } case WM_HSCROLL: case WM_VSCROLL: { - Result = GuiConsoleHandleScroll(GuiData, msg, wParam); - break; - } - - case WM_NCRBUTTONDOWN: - { - DPRINT1("WM_NCRBUTTONDOWN\n"); - /* - * HACK: !! Because, when we deal with WM_RBUTTON* and we do not - * call after that DefWindowProc, on ReactOS, right-clicks on the - * (non-client) application title-bar does not display the system - * menu and does not trigger a WM_NCRBUTTONUP message too. - * See:
http://git.reactos.org/?p=reactos.git;a=blob;f=reactos/win32ss/user/user32/…
- * and line 1135 too. - */ -#if 0 - if (DefWindowProcW(hWnd, WM_NCHITTEST, 0, lParam) == HTCAPTION) - { - /* Call DefWindowProcW with the WM_CONTEXTMENU message */ - msg = WM_CONTEXTMENU; - } -#endif - goto Default; - } - // case WM_NCRBUTTONUP: - // DPRINT1("WM_NCRBUTTONUP\n"); - // goto Default; + Result = OnScroll(GuiData, msg, wParam); + break; + } case WM_CONTEXTMENU: { @@ -1979,7 +2016,7 @@ HMENU hMenu = CreatePopupMenu(); if (hMenu != NULL) { - GuiConsoleAppendMenuItems(hMenu, GuiConsoleEditMenuItems); + AppendMenuItems(hMenu, GuiConsoleEditMenuItems); TrackPopupMenuEx(hMenu, TPM_RIGHTBUTTON, GET_X_LPARAM(lParam), @@ -2018,7 +2055,7 @@ if (ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) { - GuiSendMenuEvent(Console, WM_INITMENU); + SendMenuEvent(Console, WM_INITMENU); LeaveCriticalSection(&Console->Lock); } break; @@ -2030,7 +2067,7 @@ { if (ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) { - GuiSendMenuEvent(Console, WM_MENUSELECT); + SendMenuEvent(Console, WM_MENUSELECT); LeaveCriticalSection(&Console->Lock); } } @@ -2040,57 +2077,65 @@ case WM_COMMAND: case WM_SYSCOMMAND: { - Result = GuiConsoleHandleSysMenuCommand(GuiData, wParam, lParam); + Result = OnCommand(GuiData, wParam, lParam); break; } case WM_SETFOCUS: case WM_KILLFOCUS: - { - if (ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) - { - BOOL SetFocus = (msg == WM_SETFOCUS); - INPUT_RECORD er; - - er.EventType = FOCUS_EVENT; - er.Event.FocusEvent.bSetFocus = SetFocus; - ConioProcessInputEvent(Console, &er); - - if (SetFocus) - DPRINT1("TODO: Create console caret\n"); - else - DPRINT1("TODO: Destroy console caret\n"); - - LeaveCriticalSection(&Console->Lock); - } - break; - } + OnFocus(GuiData, (msg == WM_SETFOCUS)); + break; case WM_GETMINMAXINFO: - GuiConsoleGetMinMaxInfo(GuiData, (PMINMAXINFO)lParam); + OnGetMinMaxInfo(GuiData, (PMINMAXINFO)lParam); break; case WM_MOVE: - { - if (ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) - { - // TODO: Simplify the code. - // See: GuiConsoleNotifyWndProc() PM_CREATE_CONSOLE. - - RECT rcWnd; - - /* Retrieve our real position */ - GetWindowRect(GuiData->hWindow, &rcWnd); - GuiData->GuiInfo.WindowOrigin.x = rcWnd.left; - GuiData->GuiInfo.WindowOrigin.y = rcWnd.top; - - LeaveCriticalSection(&Console->Lock); - } - break; - } + OnMove(GuiData); + break; + +#if 0 // This code is here to prepare & control dynamic console SB resizing. + case WM_SIZING: + { + PRECT dragRect = (PRECT)lParam; + switch (wParam) + { + case WMSZ_LEFT: + DPRINT1("WMSZ_LEFT\n"); + break; + case WMSZ_RIGHT: + DPRINT1("WMSZ_RIGHT\n"); + break; + case WMSZ_TOP: + DPRINT1("WMSZ_TOP\n"); + break; + case WMSZ_TOPLEFT: + DPRINT1("WMSZ_TOPLEFT\n"); + break; + case WMSZ_TOPRIGHT: + DPRINT1("WMSZ_TOPRIGHT\n"); + break; + case WMSZ_BOTTOM: + DPRINT1("WMSZ_BOTTOM\n"); + break; + case WMSZ_BOTTOMLEFT: + DPRINT1("WMSZ_BOTTOMLEFT\n"); + break; + case WMSZ_BOTTOMRIGHT: + DPRINT1("WMSZ_BOTTOMRIGHT\n"); + break; + default: + DPRINT1("wParam = %d\n", wParam); + break; + } + DPRINT1("dragRect = {.left = %d ; .top = %d ; .right = %d ; .bottom = %d}\n", + dragRect->left, dragRect->top, dragRect->right, dragRect->bottom); + break; + } +#endif case WM_SIZE: - GuiConsoleResize(GuiData, wParam, lParam); + OnSize(GuiData, wParam, lParam); break; case PM_RESIZE_TERMINAL: @@ -2120,7 +2165,7 @@ /* Resize the window to the user's values */ GuiData->WindowSizeLock = TRUE; - GuiConsoleResizeWindow(GuiData, WidthUnit, HeightUnit); + ResizeConWnd(GuiData, WidthUnit, HeightUnit); GuiData->WindowSizeLock = FALSE; break; } Modified: trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1] Wed Apr 16 22:25:29 2014 @@ -113,14 +113,24 @@ Rect->bottom = (SmallRect->Bottom + 1 - Buffer->ViewOrigin.Y) * HeightUnit; } -static VOID NTAPI -GuiDrawRegion(IN OUT PFRONTEND This, - SMALL_RECT* Region); +static VOID +DrawRegion(PGUI_CONSOLE_DATA GuiData, + SMALL_RECT* Region) +{ + RECT RegionRect; + + SmallRectToRect(GuiData, &RegionRect, Region); + /* Do not erase the background: it speeds up redrawing and reduce flickering */ + InvalidateRect(GuiData->hWindow, &RegionRect, FALSE); + /**UpdateWindow(GuiData->hWindow);**/ +} + VOID -GuiInvalidateCell(IN OUT PFRONTEND This, SHORT x, SHORT y) +InvalidateCell(PGUI_CONSOLE_DATA GuiData, + SHORT x, SHORT y) { SMALL_RECT CellRect = { x, y, x, y }; - GuiDrawRegion(This, &CellRect); + DrawRegion(GuiData, &CellRect); } @@ -151,6 +161,8 @@ PGUI_CONSOLE_DATA GuiData = (PGUI_CONSOLE_DATA)lParam; PCONSOLE Console = GuiData->Console; RECT rcWnd; + + DPRINT("PM_CREATE_CONSOLE -- creating window\n"); NewWindow = CreateWindowExW(WS_EX_CLIENTEDGE, GUI_CONWND_CLASS, @@ -172,33 +184,26 @@ WindowCount++; SetWindowLongW(hWnd, GWL_USERDATA, WindowCount); - DPRINT("Set icons via PM_CREATE_CONSOLE\n"); - if (GuiData->hIcon == NULL) - { - DPRINT("Not really /o\\...\n"); - GuiData->hIcon = ghDefaultIcon; - GuiData->hIconSm = ghDefaultIconSm; - } - else if (GuiData->hIcon != ghDefaultIcon) - { - DPRINT("Yes \\o/\n"); - SendMessageW(GuiData->hWindow, WM_SETICON, ICON_BIG, (LPARAM)GuiData->hIcon); - SendMessageW(GuiData->hWindow, WM_SETICON, ICON_SMALL, (LPARAM)GuiData->hIconSm); - } + // + // FIXME: TODO: Move everything there into conwnd.c!OnNcCreate() + // /* Retrieve our real position */ + // See conwnd.c!OnMove() GetWindowRect(GuiData->hWindow, &rcWnd); GuiData->GuiInfo.WindowOrigin.x = rcWnd.left; GuiData->GuiInfo.WindowOrigin.y = rcWnd.top; /* Move and resize the window to the user's values */ /* CAN WE DEADLOCK ?? */ - GuiConsoleMoveWindow(GuiData); + GuiConsoleMoveWindow(GuiData); // FIXME: This MUST be done via the CreateWindowExW call. SendMessageW(GuiData->hWindow, PM_RESIZE_TERMINAL, 0, 0); /* Switch to full-screen mode if necessary */ + // FIXME: Move elsewhere, it cause misdrawings of the window. if (GuiData->GuiInfo.FullScreen) SwitchFullScreen(GuiData, TRUE); + DPRINT("PM_CREATE_CONSOLE -- showing window\n"); // ShowWindow(NewWindow, (int)wParam); ShowWindowAsync(NewWindow, (int)wParam); DPRINT("Window showed\n"); @@ -424,7 +429,7 @@ DPRINT1("CONSRV: Failed to create GUI_CONSOLE_DATA\n"); return STATUS_UNSUCCESSFUL; } - /* HACK */ Console->TermIFace.Data = (PVOID)GuiData; /* HACK */ + ///// /* HACK */ Console->TermIFace.Data = (PVOID)GuiData; /* HACK */ GuiData->Console = Console; GuiData->ActiveBuffer = Console->ActiveBuffer; GuiData->hWindow = NULL; @@ -509,13 +514,10 @@ &hIconSm, 1); DPRINT("hIcon = 0x%p ; hIconSm = 0x%p\n", hIcon, hIconSm); - if (hIcon != NULL) - { - DPRINT("Effectively set the icons\n"); - GuiData->hIcon = hIcon; - GuiData->hIconSm = hIconSm; - } - } + if (hIcon != NULL) GuiData->hIcon = hIcon; + if (hIconSm != NULL) GuiData->hIconSm = hIconSm; + } + ASSERT(GuiData->hIcon && GuiData->hIconSm); /* Mouse is shown by default with its default cursor shape */ GuiData->hCursor = ghDefaultCursor; @@ -597,12 +599,7 @@ SMALL_RECT* Region) { PGUI_CONSOLE_DATA GuiData = This->Data; - RECT RegionRect; - - SmallRectToRect(GuiData, &RegionRect, Region); - /* Do not erase the background: it speeds up redrawing and reduce flickering */ - InvalidateRect(GuiData->hWindow, &RegionRect, FALSE); - /**UpdateWindow(GuiData->hWindow);**/ + DrawRegion(GuiData, Region); } static VOID NTAPI @@ -641,12 +638,12 @@ SW_INVALIDATE); } - GuiDrawRegion(This, Region); + DrawRegion(GuiData, Region); if (CursorStartX < Region->Left || Region->Right < CursorStartX || CursorStartY < Region->Top || Region->Bottom < CursorStartY) { - GuiInvalidateCell(This, CursorStartX, CursorStartY); + InvalidateCell(GuiData, CursorStartX, CursorStartY); } CursorEndX = Buff->CursorPosition.X; @@ -655,7 +652,7 @@ || CursorEndY < Region->Top || Region->Bottom < CursorEndY) && (CursorEndX != CursorStartX || CursorEndY != CursorStartY)) { - GuiInvalidateCell(This, CursorEndX, CursorEndY); + InvalidateCell(GuiData, CursorEndX, CursorEndY); } // HACK!! @@ -673,7 +670,7 @@ if (GuiData->ActiveBuffer == Buff) { - GuiInvalidateCell(This, Buff->CursorPosition.X, Buff->CursorPosition.Y); + InvalidateCell(GuiData, Buff->CursorPosition.X, Buff->CursorPosition.Y); } return TRUE; @@ -690,9 +687,9 @@ if (GuiData->ActiveBuffer == Buff) { /* Redraw char at old position (remove cursor) */ - GuiInvalidateCell(This, OldCursorX, OldCursorY); + InvalidateCell(GuiData, OldCursorX, OldCursorY); /* Redraw char at new position (show cursor) */ - GuiInvalidateCell(This, Buff->CursorPosition.X, Buff->CursorPosition.Y); + InvalidateCell(GuiData, Buff->CursorPosition.X, Buff->CursorPosition.Y); } return TRUE; @@ -884,7 +881,7 @@ GuiData->hIconSm = hIconSm; DPRINT("Set icons in GuiChangeIcon\n"); - PostMessageW(GuiData->hWindow, WM_SETICON, ICON_BIG, (LPARAM)GuiData->hIcon); + PostMessageW(GuiData->hWindow, WM_SETICON, ICON_BIG , (LPARAM)GuiData->hIcon ); PostMessageW(GuiData->hWindow, WM_SETICON, ICON_SMALL, (LPARAM)GuiData->hIconSm); }
10 years, 8 months
1
0
0
0
[fireball] 62759: [ARWINSS] - Bring in Eng functions from trunk's gdi32 - Add GetFontResourceInfoW() because base/applications/fontviewer started to depend on it - Stub InitializeLpkHooks() in user...
by fireball@svn.reactos.org
Author: fireball Date: Wed Apr 16 17:02:22 2014 New Revision: 62759 URL:
http://svn.reactos.org/svn/reactos?rev=62759&view=rev
Log: [ARWINSS] - Bring in Eng functions from trunk's gdi32 - Add GetFontResourceInfoW() because base/applications/fontviewer started to depend on it - Stub InitializeLpkHooks() in user32 - Arwinss now builds in trunk. I hope the cat is happier now and gets off my window. Added: branches/arwinss/arwinss/client/gdi32/eng.c - copied, changed from r62758, trunk/reactos/win32ss/gdi/gdi32/objects/eng.c Modified: branches/arwinss/arwinss/client/gdi32/CMakeLists.txt branches/arwinss/arwinss/client/gdi32/font.c branches/arwinss/arwinss/client/gdi32/gdi32.spec branches/arwinss/arwinss/client/user32/legacy.c branches/arwinss/arwinss/client/user32/user32.spec Modified: branches/arwinss/arwinss/client/gdi32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/arwinss/client/gdi32/CM…
============================================================================== --- branches/arwinss/arwinss/client/gdi32/CMakeLists.txt [iso-8859-1] (original) +++ branches/arwinss/arwinss/client/gdi32/CMakeLists.txt [iso-8859-1] Wed Apr 16 17:02:22 2014 @@ -23,6 +23,7 @@ dc.c dib.c driver.c + eng.c enhmetafile.c enhmeta2.c font.c Copied: branches/arwinss/arwinss/client/gdi32/eng.c (from r62758, trunk/reactos/win32ss/gdi/gdi32/objects/eng.c) URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/arwinss/client/gdi32/en…
============================================================================== --- trunk/reactos/win32ss/gdi/gdi32/objects/eng.c [iso-8859-1] (original) +++ branches/arwinss/arwinss/client/gdi32/eng.c [iso-8859-1] Wed Apr 16 17:02:22 2014 @@ -6,7 +6,29 @@ * */ -#include <precomp.h> +#include "config.h" + +/* Definitions */ +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H +#define NTOS_MODE_USER + +#include <stdarg.h> + +/* SDK/DDK/NDK Headers. */ +#include <windef.h> +#include <winbase.h> +#include <winnls.h> +#include <objbase.h> +#include <ndk/rtlfuncs.h> +#include <wingdi.h> +#define _ENGINE_EXPORT_ +#include <winddi.h> +#include <winuser.h> + +#include "gdi_private.h" + /* * @implemented @@ -18,54 +40,6 @@ RtlEnterCriticalSection((PRTL_CRITICAL_SECTION)hsem); } - -/* - * @unimplemented - */ -BOOL -copy_my_glyphset( FD_GLYPHSET *dst_glyphset , FD_GLYPHSET * src_glyphset, ULONG Size) -{ - BOOL retValue = FALSE; - - memcpy(src_glyphset, dst_glyphset, Size); - if (src_glyphset->cRuns == 0) - { - retValue = TRUE; - } - - /* FIXME copy wrun */ - return retValue; -} - -/* - * @implemented - */ -FD_GLYPHSET* -WINAPI -EngComputeGlyphSet(INT nCodePage,INT nFirstChar,INT cChars) -{ - FD_GLYPHSET * ntfd_glyphset; - FD_GLYPHSET * myfd_glyphset = NULL; - - ntfd_glyphset = NtGdiEngComputeGlyphSet(nCodePage,nFirstChar,cChars); - - if (ntfd_glyphset) - { - if (ntfd_glyphset->cjThis) - { - myfd_glyphset = GlobalAlloc(0,ntfd_glyphset->cjThis); - if (myfd_glyphset) - { - if (copy_my_glyphset(myfd_glyphset,ntfd_glyphset,ntfd_glyphset->cjThis) == FALSE) - { - GlobalFree(myfd_glyphset); - myfd_glyphset = NULL; - } - } - } - } - return myfd_glyphset; -} /* * @implemented @@ -151,42 +125,6 @@ *AnsiCodePage = GetACP(); } - -/* - * @implemented - */ -LPWSTR WINAPI -EngGetDriverName(HDEV hdev) -{ - // DHPDEV from NtGdiGetDhpdev must be from print driver. - PUMPDEV pPDev = (PUMPDEV)NtGdiGetDhpdev(hdev); - - if (!pPDev) return NULL; - - if (pPDev->Sig != PDEV_UMPD_ID) - { - pPDev = (PUMPDEV)pPDev->Sig; - } - return pPDev->pdi5Info->pDriverPath; -} - -/* - * @implemented - */ -LPWSTR WINAPI -EngGetPrinterDataFileName(HDEV hdev) -{ - PUMPDEV pPDev = (PUMPDEV)NtGdiGetDhpdev(hdev); - - if (!pPDev) return NULL; - - if (pPDev->Sig != PDEV_UMPD_ID) - { - pPDev = (PUMPDEV)pPDev->Sig; - } - return pPDev->pdi5Info->pDataFile; -} - /* * @implemented */ Modified: branches/arwinss/arwinss/client/gdi32/font.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/arwinss/client/gdi32/fo…
============================================================================== --- branches/arwinss/arwinss/client/gdi32/font.c [iso-8859-1] (original) +++ branches/arwinss/arwinss/client/gdi32/font.c [iso-8859-1] Wed Apr 16 17:02:22 2014 @@ -3480,3 +3480,16 @@ return 0; } + +BOOL +WINAPI +GetFontResourceInfoW( + LPCWSTR lpFileName, + DWORD *pdwBufSize, + void* lpBuffer, + DWORD dwType +) +{ + FIXME("GetFontResourceInfoW(%S) UNIMPLEMENTED\n", lpFileName); + return FALSE; +} Modified: branches/arwinss/arwinss/client/gdi32/gdi32.spec URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/arwinss/client/gdi32/gd…
============================================================================== --- branches/arwinss/arwinss/client/gdi32/gdi32.spec [iso-8859-1] (original) +++ branches/arwinss/arwinss/client/gdi32/gdi32.spec [iso-8859-1] Wed Apr 16 17:02:22 2014 @@ -154,7 +154,7 @@ @ stub EndFormPage @ stdcall EndPage(long) @ stdcall EndPath(long) -@ stub EngAcquireSemaphore +@ stdcall EngAcquireSemaphore(ptr) @ stub EngAlphaBlend @ stub EngAssociateSurface @ stub EngBitBlt @@ -166,31 +166,31 @@ @ stub EngCreateDeviceBitmap @ stub EngCreateDeviceSurface @ stub EngCreatePalette -@ stub EngCreateSemaphore +@ stdcall EngCreateSemaphore() @ stub EngDeleteClip @ stub EngDeletePalette @ stub EngDeletePath -@ stub EngDeleteSemaphore +@ stdcall EngDeleteSemaphore(ptr) @ stub EngDeleteSurface @ stub EngEraseSurface @ stub EngFillPath -@ stub EngFindResource -@ stub EngFreeModule -@ stub EngGetCurrentCodePage +@ stdcall EngFindResource(ptr long long ptr) +@ stdcall EngFreeModule(ptr) +@ stdcall EngGetCurrentCodePage(ptr ptr) @ stub EngGetDriverName @ stub EngGetPrinterDataFileName @ stub EngGradientFill @ stub EngLineTo -@ stub EngLoadModule +@ stdcall EngLoadModule(ptr) @ stub EngLockSurface @ stub EngMarkBandingSurface @ stub EngMultiByteToUnicodeN -@ stub EngMultiByteToWideChar +@ stdcall EngMultiByteToWideChar(long wstr long str long) @ stub EngPaint @ stub EngPlgBlt @ stub EngQueryEMFInfo -@ stub EngQueryLocalTime -@ stub EngReleaseSemaphore +@ stdcall EngQueryLocalTime(ptr) +@ stdcall EngReleaseSemaphore(ptr) @ stub EngStretchBlt @ stub EngStretchBltROP @ stub EngStrokeAndFillPath @@ -249,15 +249,15 @@ @ stdcall GdiComment(long long ptr) @ stub GdiConsoleTextOut @ stub GdiConvertAndCheckDC -@ stub GdiConvertBitmap +@ stdcall GdiConvertBitmap(ptr) @ stub GdiConvertBitmapV5 -@ stub GdiConvertBrush -@ stub GdiConvertDC +@ stdcall GdiConvertBrush(ptr) +@ stdcall GdiConvertDC(ptr) @ stub GdiConvertEnhMetaFile -@ stub GdiConvertFont +@ stdcall GdiConvertFont(ptr) @ stub GdiConvertMetaFilePict -@ stub GdiConvertPalette -@ stub GdiConvertRegion +@ stdcall GdiConvertPalette(ptr) +@ stdcall GdiConvertRegion(ptr) @ stdcall GdiConvertToDevmodeW(ptr) @ stub GdiCreateLocalBitmap @ stub GdiCreateLocalBrush @@ -335,7 +335,7 @@ @ stub GdiQueryTable @ stdcall GdiRealizationInfo(long ptr) @ stub GdiReleaseDC -@ stub GdiReleaseLocalDC +@ stdcall GdiReleaseLocalDC(ptr) @ stub GdiResetDCEMF @ stdcall GdiSetAttrs(ptr) @ stdcall GdiSetBatchLimit(long) @@ -405,7 +405,7 @@ @ stdcall GetFontData(long long long ptr long) @ stdcall GetFontLanguageInfo(long) @ stub GetFontResourceInfo -@ stub GetFontResourceInfoW +@ stdcall GetFontResourceInfoW(str ptr ptr long) @ stdcall GetFontUnicodeRanges(ptr ptr) @ stdcall GetGlyphIndicesA(long ptr long ptr long) @ stdcall GetGlyphIndicesW(long ptr long ptr long) Modified: branches/arwinss/arwinss/client/user32/legacy.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/arwinss/client/user32/l…
============================================================================== --- branches/arwinss/arwinss/client/user32/legacy.c [iso-8859-1] (original) +++ branches/arwinss/arwinss/client/user32/legacy.c [iso-8859-1] Wed Apr 16 17:02:22 2014 @@ -23,6 +23,14 @@ { } +VOID +WINAPI +InitializeLpkHooks(FARPROC *hookfuncs) +{ + UNIMPLEMENTED; +} + + /* * Private calls for CSRSS */ Modified: branches/arwinss/arwinss/client/user32/user32.spec URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/arwinss/client/user32/u…
============================================================================== --- branches/arwinss/arwinss/client/user32/user32.spec [iso-8859-1] (original) +++ branches/arwinss/arwinss/client/user32/user32.spec [iso-8859-1] Wed Apr 16 17:02:22 2014 @@ -411,7 +411,7 @@ @ stdcall InflateRect(ptr long long) # @ stub InitSharedTable # @ stub InitTask -@ stub InitializeLpkHooks +@ stdcall InitializeLpkHooks(ptr) @ stub InitializeWin32EntryTable @ stdcall InsertMenuA(long long long long ptr) @ stdcall InsertMenuItemA(long long long ptr)
10 years, 8 months
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
50
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
45
46
47
48
49
50
Results per page:
10
25
50
100
200