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
July 2019
----- 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
22 participants
146 discussions
Start a n
N
ew thread
[reactos] 01/01: [FREELDR] hwdisk: Add sanity checks to avoid infinite loop (#1731)
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=31aca248a1a94cb3ae1d8…
commit 31aca248a1a94cb3ae1d8b6dad5c97ad43e61ab3 Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Thu Jul 18 23:49:11 2019 +0300 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Thu Jul 18 22:49:11 2019 +0200 [FREELDR] hwdisk: Add sanity checks to avoid infinite loop (#1731) CORE-16204 CORE-16205 --- boot/freeldr/freeldr/arch/i386/hwdisk.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/boot/freeldr/freeldr/arch/i386/hwdisk.c b/boot/freeldr/freeldr/arch/i386/hwdisk.c index a254aeeaa70..826780a07fb 100644 --- a/boot/freeldr/freeldr/arch/i386/hwdisk.c +++ b/boot/freeldr/freeldr/arch/i386/hwdisk.c @@ -82,6 +82,13 @@ DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId) PARTITION_TABLE_ENTRY PartitionTableEntry; CHAR FileName[1]; + if (DiskReadBufferSize == 0) + { + ERR("DiskOpen(): DiskReadBufferSize is 0, something is wrong.\n"); + ASSERT(FALSE); + return ENOMEM; + } + if (!DissectArcPath(Path, FileName, &DriveNumber, &DrivePartition)) return EINVAL; @@ -139,10 +146,16 @@ DiskRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count) BOOLEAN ret; ULONGLONG SectorOffset; + ASSERT(DiskReadBufferSize > 0); + TotalSectors = (N + Context->SectorSize - 1) / Context->SectorSize; MaxSectors = DiskReadBufferSize / Context->SectorSize; SectorOffset = Context->SectorNumber + Context->SectorOffset; + // If MaxSectors is 0, this will lead to infinite loop + // In release builds assertions are disabled, however we also have sanity checks in DiskOpen() + ASSERT(MaxSectors > 0); + ret = TRUE; while (TotalSectors)
5 years, 5 months
1
0
0
0
[reactos] 01/01: [BOOTDATA][SETUP] Fix regression CORE-16200 font rendering
by Joachim Henze
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5dbc677cdda28c64d6dbc…
commit 5dbc677cdda28c64d6dbc6c27c2f3d0d20e5db69 Author: Joachim Henze <Joachim.Henze(a)reactos.org> AuthorDate: Tue Jul 16 22:51:42 2019 +0200 Commit: Joachim Henze <Joachim.Henze(a)reactos.org> CommitDate: Tue Jul 16 22:51:42 2019 +0200 [BOOTDATA][SETUP] Fix regression CORE-16200 font rendering By removing font substitution for 'Microsoft Sans Serif'. Thanks to the patches author Katayama Hirofumi MZ. This is a partial revert of the guilty rev master guilty 0.4.13-dev-9-g 811faed421a798659af3cb3f09369af84fc4edf0 RC guilty 0.4.12-RC-13-g 8d3def0529e7e1bb9095713d46f5fbb64df0d299 VBox test result:
https://reactos.org/testman/compare.php?ids=68497,68499
The same fix has been applied before to 0.4.12-RC-44-g ca0e00e8af009679351747150605857be580c538 --- base/setup/lib/muifonts.h | 10 ---------- boot/bootdata/livecd.inf | 1 - 2 files changed, 11 deletions(-) diff --git a/base/setup/lib/muifonts.h b/base/setup/lib/muifonts.h index 826d512bdc1..72292afc466 100644 --- a/base/setup/lib/muifonts.h +++ b/base/setup/lib/muifonts.h @@ -11,7 +11,6 @@ MUI_SUBFONT LatinFonts[] = { L"Helv", L"Tahoma" }, { L"Helvetica", L"Liberation Sans" }, { L"Lucida Console", L"DejaVu Sans Mono" }, - { L"Microsoft Sans Serif", L"Tahoma" }, { L"MS Sans Serif", L"Tahoma" }, { L"MS Shell Dlg", L"Tahoma" }, { L"MS Shell Dlg 2", L"Tahoma" }, @@ -38,7 +37,6 @@ MUI_SUBFONT CyrillicFonts[] = { L"Helv", L"Tahoma" }, { L"Helvetica", L"Liberation Sans" }, { L"Lucida Console", L"DejaVu Sans Mono" }, - { L"Microsoft Sans Serif", L"Tahoma" }, { L"MS Sans Serif", L"Tahoma" }, { L"MS Shell Dlg", L"Tahoma" }, { L"MS Shell Dlg 2", L"Tahoma" }, @@ -65,7 +63,6 @@ MUI_SUBFONT GreekFonts[] = { L"Helv", L"DejaVu Sans" }, { L"Helvetica", L"Liberation Sans" }, { L"Lucida Console", L"DejaVu Sans Mono" }, - { L"Microsoft Sans Serif", L"DejaVu Sans" }, { L"MS Sans Serif", L"DejaVu Sans" }, { L"MS Shell Dlg", L"DejaVu Sans" }, { L"MS Shell Dlg 2", L"DejaVu Sans" }, @@ -92,7 +89,6 @@ MUI_SUBFONT HebrewFonts[] = { L"Helv", L"Tahoma" }, { L"Helvetica", L"Tahoma" }, { L"Lucida Console", L"DejaVu Sans Mono" }, - { L"Microsoft Sans Serif", L"Tahoma" }, { L"MS Sans Serif", L"Tahoma" }, { L"MS Shell Dlg", L"Tahoma" }, { L"MS Shell Dlg 2", L"Tahoma" }, @@ -125,7 +121,6 @@ MUI_SUBFONT ChineseSimplifiedFonts[] = { L"Helv", L"Droid Sans Fallback" }, { L"Helvetica", L"Liberation Sans" }, { L"Lucida Console", L"DejaVu Sans Mono" }, - { L"Microsoft Sans Serif", L"Droid Sans Fallback" }, { L"MS Sans Serif", L"Droid Sans Fallback" }, { L"MS Shell Dlg", L"Droid Sans Fallback" }, { L"MS Shell Dlg 2", L"Droid Sans Fallback" }, @@ -168,7 +163,6 @@ MUI_SUBFONT ChineseTraditionalFonts[] = { L"Helv", L"Droid Sans Fallback" }, { L"Helvetica", L"Liberation Sans" }, { L"Lucida Console", L"DejaVu Sans Mono" }, - { L"Microsoft Sans Serif", L"Droid Sans Fallback" }, { L"MS Sans Serif", L"Droid Sans Fallback" }, { L"MS Shell Dlg", L"Droid Sans Fallback" }, { L"MS Shell Dlg 2", L"Droid Sans Fallback" }, @@ -212,7 +206,6 @@ MUI_SUBFONT JapaneseFonts[] = { L"Helv", L"Droid Sans Fallback" }, { L"Helvetica", L"Liberation Sans" }, { L"Lucida Console", L"DejaVu Sans Mono" }, - { L"Microsoft Sans Serif", L"Droid Sans Fallback" }, { L"MS Sans Serif", L"Droid Sans Fallback" }, { L"MS Shell Dlg", L"Droid Sans Fallback" }, { L"MS Shell Dlg 2", L"Droid Sans Fallback" }, @@ -257,7 +250,6 @@ MUI_SUBFONT KoreanFonts[] = { L"Helv", L"Droid Sans Fallback" }, { L"Helvetica", L"Liberation Sans" }, { L"Lucida Console", L"DejaVu Sans Mono" }, - { L"Microsoft Sans Serif", L"Droid Sans Fallback" }, { L"MS Sans Serif", L"Droid Sans Fallback" }, { L"MS Shell Dlg", L"Droid Sans Fallback" }, { L"MS Shell Dlg 2", L"Droid Sans Fallback" }, @@ -301,7 +293,6 @@ MUI_SUBFONT UnicodeFonts[] = { L"Helv", L"DejaVu Sans" }, { L"Helvetica", L"DejaVu Sans" }, { L"Lucida Console", L"DejaVu Sans Mono" }, - { L"Microsoft Sans Serif", L"DejaVu Sans" }, { L"MS Sans Serif", L"DejaVu Sans" }, { L"MS Shell Dlg", L"DejaVu Sans" }, { L"MS Shell Dlg 2", L"DejaVu Sans" }, @@ -329,7 +320,6 @@ MUI_SUBFONT HindiFonts[] = { L"Helv", L"Tahoma" }, { L"Helvetica", L"Liberation Sans" }, { L"Lucida Console", L"DejaVu Sans Mono" }, - { L"Microsoft Sans Serif", L"FreeSans" }, { L"MS Sans Serif", L"FreeSans" }, { L"MS Shell Dlg", L"FreeSans" }, { L"MS Shell Dlg 2", L"FreeSans" }, diff --git a/boot/bootdata/livecd.inf b/boot/bootdata/livecd.inf index 9c6e38d005f..465f9ef1969 100644 --- a/boot/bootdata/livecd.inf +++ b/boot/bootdata/livecd.inf @@ -55,7 +55,6 @@ HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes","Fixedsys",0 HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes","Helv",0x00000000,"Tahoma" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes","Helvetica",0x00000000,"Liberation Sans" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes","Lucida Console",0x00000000,"DejaVu Sans Mono" -HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes","Microsoft Sans Serif",0x00000000,"Tahoma" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes","MS Sans Serif",0x00000000,"Tahoma" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes","MS Shell Dlg",0x00000000,"Tahoma" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes","MS Shell Dlg 2",0x00000000,"Tahoma"
5 years, 5 months
1
0
0
0
[reactos] 01/01: [SDK][INCLUDE] Add WM_WTSSESSION_CHANGE message (#1730)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=34bf24756a6ebad1bac89…
commit 34bf24756a6ebad1bac8954670a30570cd2f7479 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Jul 15 23:03:06 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Jul 15 23:03:06 2019 +0900 [SDK][INCLUDE] Add WM_WTSSESSION_CHANGE message (#1730) - Add WM_WTSSESSION_CHANGE messages to <winuser.h>. - Add WTS_* constant macros. --- sdk/include/psdk/winuser.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sdk/include/psdk/winuser.h b/sdk/include/psdk/winuser.h index 081783cf6b0..40e629e6f18 100644 --- a/sdk/include/psdk/winuser.h +++ b/sdk/include/psdk/winuser.h @@ -1825,6 +1825,21 @@ extern "C" { #define WM_MOUSEHOVER 0x02A1 #define WM_MOUSELEAVE 0x02A3 +#if (_WIN32_WINNT >= 0x0501) +#define WTS_CONSOLE_CONNECT 0x1 +#define WTS_CONSOLE_DISCONNECT 0x2 +#define WTS_REMOTE_CONNECT 0x3 +#define WTS_REMOTE_DISCONNECT 0x4 +#define WTS_SESSION_LOGON 0x5 +#define WTS_SESSION_LOGOFF 0x6 +#define WTS_SESSION_LOCK 0x7 +#define WTS_SESSION_UNLOCK 0x8 +#define WTS_SESSION_REMOTE_CONTROL 0x9 +#define WTS_SESSION_CREATE 0xA +#define WTS_SESSION_TERMINATE 0xB +#define WM_WTSSESSION_CHANGE 0x02B1 +#endif + #define WM_CUT 768 #define WM_COPY 769 #define WM_PASTE 770
5 years, 5 months
1
0
0
0
[reactos] 01/01: [OSK] Implement "Always on Top" feature (#1729)
by Bișoc George
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b292acb5f78608ee6ef95…
commit b292acb5f78608ee6ef951daa404b95fee12fd64 Author: Bișoc George <fraizeraust99(a)gmail.com> AuthorDate: Mon Jul 15 15:59:06 2019 +0200 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Jul 15 15:59:06 2019 +0200 [OSK] Implement "Always on Top" feature (#1729) --- base/applications/osk/lang/ar-DZ.rc | 2 +- base/applications/osk/lang/cs-CZ.rc | 2 +- base/applications/osk/lang/de-DE.rc | 2 +- base/applications/osk/lang/en-GB.rc | 2 +- base/applications/osk/lang/en-US.rc | 2 +- base/applications/osk/lang/es-ES.rc | 2 +- base/applications/osk/lang/et-EE.rc | 2 +- base/applications/osk/lang/fr-CA.rc | 2 +- base/applications/osk/lang/fr-FR.rc | 2 +- base/applications/osk/lang/he-IL.rc | 2 +- base/applications/osk/lang/id-ID.rc | 2 +- base/applications/osk/lang/it-IT.rc | 2 +- base/applications/osk/lang/pl-PL.rc | 2 +- base/applications/osk/lang/ro-RO.rc | 2 +- base/applications/osk/lang/ru-RU.rc | 2 +- base/applications/osk/lang/tr-TR.rc | 2 +- base/applications/osk/lang/zh-CN.rc | 2 +- base/applications/osk/lang/zh-TW.rc | 2 +- base/applications/osk/main.c | 38 +++++++++++++++++++++++++++++++-- base/applications/osk/main.h | 1 + base/applications/osk/settings.c | 42 ++++++++++++++++++++++++++++++++++--- 21 files changed, 94 insertions(+), 23 deletions(-) diff --git a/base/applications/osk/lang/ar-DZ.rc b/base/applications/osk/lang/ar-DZ.rc index edd4536dd68..f9cda704bcf 100644 --- a/base/applications/osk/lang/ar-DZ.rc +++ b/base/applications/osk/lang/ar-DZ.rc @@ -268,7 +268,7 @@ BEGIN POPUP "Settings" BEGIN - MENUITEM "Always on Top", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "Always on Top", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Use Click Sound", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/lang/cs-CZ.rc b/base/applications/osk/lang/cs-CZ.rc index 5360c7075d5..2802a978f97 100644 --- a/base/applications/osk/lang/cs-CZ.rc +++ b/base/applications/osk/lang/cs-CZ.rc @@ -268,7 +268,7 @@ BEGIN POPUP "Settings" BEGIN - MENUITEM "Always on Top", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "Always on Top", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Use Click Sound", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/lang/de-DE.rc b/base/applications/osk/lang/de-DE.rc index dba2dc1788f..419fb87a96c 100644 --- a/base/applications/osk/lang/de-DE.rc +++ b/base/applications/osk/lang/de-DE.rc @@ -269,7 +269,7 @@ BEGIN POPUP "Settings" BEGIN - MENUITEM "Always on Top", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "Always on Top", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Use Click Sound", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/lang/en-GB.rc b/base/applications/osk/lang/en-GB.rc index ab04edc3a3f..8665669447e 100644 --- a/base/applications/osk/lang/en-GB.rc +++ b/base/applications/osk/lang/en-GB.rc @@ -269,7 +269,7 @@ BEGIN POPUP "Settings" BEGIN - MENUITEM "Always on Top", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "Always on Top", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Use Click Sound", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/lang/en-US.rc b/base/applications/osk/lang/en-US.rc index d955621f20b..f852a7e6293 100644 --- a/base/applications/osk/lang/en-US.rc +++ b/base/applications/osk/lang/en-US.rc @@ -268,7 +268,7 @@ BEGIN POPUP "Settings" BEGIN - MENUITEM "Always on Top", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "Always on Top", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Use Click Sound", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/lang/es-ES.rc b/base/applications/osk/lang/es-ES.rc index 319fe387d00..e09e8f88dbc 100644 --- a/base/applications/osk/lang/es-ES.rc +++ b/base/applications/osk/lang/es-ES.rc @@ -270,7 +270,7 @@ BEGIN POPUP "Settings" BEGIN - MENUITEM "Always on Top", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "Always on Top", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Use Click Sound", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/lang/et-EE.rc b/base/applications/osk/lang/et-EE.rc index c527e7e4497..c449c8ed4fc 100644 --- a/base/applications/osk/lang/et-EE.rc +++ b/base/applications/osk/lang/et-EE.rc @@ -268,7 +268,7 @@ BEGIN POPUP "Settings" BEGIN - MENUITEM "Always on Top", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "Always on Top", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Use Click Sound", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/lang/fr-CA.rc b/base/applications/osk/lang/fr-CA.rc index 18636d9614b..c7857d406be 100644 --- a/base/applications/osk/lang/fr-CA.rc +++ b/base/applications/osk/lang/fr-CA.rc @@ -269,7 +269,7 @@ BEGIN POPUP "Settings" BEGIN - MENUITEM "Always on Top", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "Always on Top", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Use Click Sound", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/lang/fr-FR.rc b/base/applications/osk/lang/fr-FR.rc index ba05f9f1953..2764cf9b57e 100644 --- a/base/applications/osk/lang/fr-FR.rc +++ b/base/applications/osk/lang/fr-FR.rc @@ -269,7 +269,7 @@ BEGIN POPUP "Settings" BEGIN - MENUITEM "Always on Top", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "Always on Top", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Use Click Sound", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/lang/he-IL.rc b/base/applications/osk/lang/he-IL.rc index fb7977d8475..cadeb7037dd 100644 --- a/base/applications/osk/lang/he-IL.rc +++ b/base/applications/osk/lang/he-IL.rc @@ -268,7 +268,7 @@ BEGIN POPUP "Settings" BEGIN - MENUITEM "Always on Top", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "Always on Top", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Use Click Sound", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/lang/id-ID.rc b/base/applications/osk/lang/id-ID.rc index 9fc8d1d73c9..f916f2932ef 100644 --- a/base/applications/osk/lang/id-ID.rc +++ b/base/applications/osk/lang/id-ID.rc @@ -268,7 +268,7 @@ BEGIN POPUP "&Pengaturan" BEGIN - MENUITEM "&Selalu di Atas", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "&Selalu di Atas", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Gunakan Suara", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/lang/it-IT.rc b/base/applications/osk/lang/it-IT.rc index b4ba448adfd..f2b3649fbf5 100644 --- a/base/applications/osk/lang/it-IT.rc +++ b/base/applications/osk/lang/it-IT.rc @@ -270,7 +270,7 @@ BEGIN POPUP "Impostazioni" BEGIN - MENUITEM "Sempre in primo piano", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "Sempre in primo piano", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Usa suono al click", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/lang/pl-PL.rc b/base/applications/osk/lang/pl-PL.rc index 7997b9790ed..1844ff89514 100644 --- a/base/applications/osk/lang/pl-PL.rc +++ b/base/applications/osk/lang/pl-PL.rc @@ -268,7 +268,7 @@ BEGIN POPUP "Ust&awienia" BEGIN - MENUITEM "&Zawsze na wierzchu", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "&Zawsze na wierzchu", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Użyj dźwięku kliknięcia", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/lang/ro-RO.rc b/base/applications/osk/lang/ro-RO.rc index f47416acbfe..bc30611f975 100644 --- a/base/applications/osk/lang/ro-RO.rc +++ b/base/applications/osk/lang/ro-RO.rc @@ -269,7 +269,7 @@ BEGIN POPUP "Setări" BEGIN - MENUITEM "Întotdeauna în sus", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "Întotdeauna în sus", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Folosește sunetul de clic", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/lang/ru-RU.rc b/base/applications/osk/lang/ru-RU.rc index 42f6b43e358..c2878b717ee 100644 --- a/base/applications/osk/lang/ru-RU.rc +++ b/base/applications/osk/lang/ru-RU.rc @@ -268,7 +268,7 @@ BEGIN POPUP "Settings" BEGIN - MENUITEM "Always on Top", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "Always on Top", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Use Click Sound", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/lang/tr-TR.rc b/base/applications/osk/lang/tr-TR.rc index fb40d8c76b9..179545d9bb5 100644 --- a/base/applications/osk/lang/tr-TR.rc +++ b/base/applications/osk/lang/tr-TR.rc @@ -268,7 +268,7 @@ BEGIN POPUP "Settings" BEGIN - MENUITEM "Always on Top", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "Always on Top", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Use Click Sound", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/lang/zh-CN.rc b/base/applications/osk/lang/zh-CN.rc index 5f8b49ec049..2ccaa37269b 100644 --- a/base/applications/osk/lang/zh-CN.rc +++ b/base/applications/osk/lang/zh-CN.rc @@ -271,7 +271,7 @@ BEGIN POPUP "Settings" BEGIN - MENUITEM "Always on Top", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "Always on Top", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Use Click Sound", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/lang/zh-TW.rc b/base/applications/osk/lang/zh-TW.rc index fbb62ff79fe..02d980a6cfc 100644 --- a/base/applications/osk/lang/zh-TW.rc +++ b/base/applications/osk/lang/zh-TW.rc @@ -270,7 +270,7 @@ BEGIN POPUP "Settings" BEGIN - MENUITEM "Always on Top", IDM_ON_TOP, CHECKED, GRAYED + MENUITEM "Always on Top", IDM_ON_TOP, CHECKED MENUITEM SEPARATOR MENUITEM "&Use Click Sound", IDM_CLICK_SOUND MENUITEM SEPARATOR diff --git a/base/applications/osk/main.c b/base/applications/osk/main.c index 939326d0da7..4bb7f5010cb 100644 --- a/base/applications/osk/main.c +++ b/base/applications/osk/main.c @@ -213,8 +213,20 @@ int OSK_DlgInitDialog(HWND hDlg) } } - /* Move the dialog according to the placement coordination */ - SetWindowPos(hDlg, HWND_TOP, Globals.PosX, Globals.PosY, 0, 0, SWP_NOSIZE); + /* + Place the window (with respective placement coordinates) as topmost, above + every window which are not on top or are at the bottom of the Z order. + */ + if (Globals.bAlwaysOnTop) + { + CheckMenuItem(GetMenu(hDlg), IDM_ON_TOP, MF_BYCOMMAND | MF_CHECKED); + SetWindowPos(hDlg, HWND_TOPMOST, Globals.PosX, Globals.PosY, 0, 0, SWP_NOSIZE); + } + else + { + CheckMenuItem(GetMenu(hDlg), IDM_ON_TOP, MF_BYCOMMAND | MF_UNCHECKED); + SetWindowPos(hDlg, HWND_NOTOPMOST, Globals.PosX, Globals.PosY, 0, 0, SWP_NOSIZE); + } /* Set icon on visual buttons */ OSK_SetImage(SCAN_CODE_15, IDI_BACK); @@ -637,6 +649,28 @@ INT_PTR APIENTRY OSK_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) break; } + case IDM_ON_TOP: + { + /* + Check the condition state before disabling/enabling the menu + item and change the topmost order. + */ + if (!Globals.bAlwaysOnTop) + { + Globals.bAlwaysOnTop = TRUE; + CheckMenuItem(GetMenu(hDlg), IDM_ON_TOP, MF_BYCOMMAND | MF_CHECKED); + SetWindowPos(hDlg, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE); + } + else + { + Globals.bAlwaysOnTop = FALSE; + CheckMenuItem(GetMenu(hDlg), IDM_ON_TOP, MF_BYCOMMAND | MF_UNCHECKED); + SetWindowPos(hDlg, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE); + } + + break; + } + case IDM_ABOUT: { OSK_About(); diff --git a/base/applications/osk/main.h b/base/applications/osk/main.h index da4cf2a7bae..5ce6a7acb7c 100644 --- a/base/applications/osk/main.h +++ b/base/applications/osk/main.h @@ -26,6 +26,7 @@ typedef struct BOOL bShowWarning; BOOL bIsEnhancedKeyboard; BOOL bSoundClick; + BOOL bAlwaysOnTop; INT PosX; INT PosY; } OSK_GLOBALS; diff --git a/base/applications/osk/settings.c b/base/applications/osk/settings.c index d7dab32eaf7..5d403e89d6d 100644 --- a/base/applications/osk/settings.c +++ b/base/applications/osk/settings.c @@ -16,13 +16,14 @@ BOOL LoadDataFromRegistry() { HKEY hKey; LONG lResult; - DWORD dwShowWarningData, dwLayout, dwSoundOnClick, dwPositionLeft, dwPositionTop; + DWORD dwShowWarningData, dwLayout, dwSoundOnClick, dwPositionLeft, dwPositionTop, dwAlwaysOnTop; DWORD cbData = sizeof(DWORD); - /* Set the structure members to TRUE (and the bSoundClick member to FALSE) */ + /* Initialize the registry application settings */ Globals.bShowWarning = TRUE; Globals.bIsEnhancedKeyboard = TRUE; Globals.bSoundClick = FALSE; + Globals.bAlwaysOnTop = TRUE; /* Set the coordinate values to default */ Globals.PosX = CW_USEDEFAULT; @@ -129,6 +130,23 @@ BOOL LoadDataFromRegistry() /* Load the Y value data of the dialog's coordinate */ Globals.PosY = dwPositionTop; + + lResult = RegQueryValueExW(hKey, + L"AlwaysOnTop", + 0, + 0, + (BYTE *)&dwAlwaysOnTop, + &cbData); + + if (lResult != ERROR_SUCCESS) + { + /* Bail out and return FALSE if we fail */ + RegCloseKey(hKey); + return FALSE; + } + + /* Load the window state value data */ + Globals.bAlwaysOnTop = (dwAlwaysOnTop != 0); /* If we're here then we succeed, close the key and return TRUE */ RegCloseKey(hKey); @@ -139,7 +157,7 @@ BOOL SaveDataToRegistry() { HKEY hKey; LONG lResult; - DWORD dwShowWarningData, dwLayout, dwSoundOnClick, dwPositionLeft, dwPositionTop; + DWORD dwShowWarningData, dwLayout, dwSoundOnClick, dwPositionLeft, dwPositionTop, dwAlwaysOnTop; WINDOWPLACEMENT wp; /* Set the structure length and retrieve the dialog's placement */ @@ -253,6 +271,24 @@ BOOL SaveDataToRegistry() return FALSE; } + /* Window top state value */ + dwAlwaysOnTop = Globals.bAlwaysOnTop; + + /* "Always on Top" state value key */ + lResult = RegSetValueExW(hKey, + L"AlwaysOnTop", + 0, + REG_DWORD, + (BYTE *)&dwAlwaysOnTop, + sizeof(dwAlwaysOnTop)); + + if (lResult != ERROR_SUCCESS) + { + /* Bail out and return FALSE if we fail */ + RegCloseKey(hKey); + return FALSE; + } + /* If we're here then we succeed, close the key and return TRUE */ RegCloseKey(hKey); return TRUE;
5 years, 5 months
1
0
0
0
[reactos] 01/01: [SDK][INCLUDE] Add WM_INPUT_DEVICE_CHANGE and WM_INPUT (#1728)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d3cdbad206cd4ae672222…
commit d3cdbad206cd4ae6722229e2767f0742f5e88cb8 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Jul 15 20:32:53 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Jul 15 20:32:53 2019 +0900 [SDK][INCLUDE] Add WM_INPUT_DEVICE_CHANGE and WM_INPUT (#1728) - Add WM_INPUT_DEVICE_CHANGE and WM_INPUT messages. - Add the relevant constant values. --- sdk/include/psdk/winuser.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk/include/psdk/winuser.h b/sdk/include/psdk/winuser.h index 3f14ab7eb20..081783cf6b0 100644 --- a/sdk/include/psdk/winuser.h +++ b/sdk/include/psdk/winuser.h @@ -1687,6 +1687,12 @@ extern "C" { #define WM_NCXBUTTONDBLCLK 173 #endif /* (_WIN32_WINNT >= 0x0500) */ +#define GIDC_ARRIVAL 1 +#define GIDC_REMOVAL 2 + +#define WM_INPUT_DEVICE_CHANGE 254 +#define WM_INPUT 255 + #define WM_KEYFIRST 256 #define WM_KEYDOWN 256 #define WM_KEYUP 257
5 years, 5 months
1
0
0
0
[reactos] 01/01: [SDK][INCLUDE] Add MENUGETOBJECTINFO structure (#1727)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d46edf494dcdc51bd3f23…
commit d46edf494dcdc51bd3f237d85458e7e8f060927f Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Jul 15 19:59:38 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Jul 15 19:59:38 2019 +0900 [SDK][INCLUDE] Add MENUGETOBJECTINFO structure (#1727) - Add MENUGETOBJECTINFO structure to <winuser.h> header. - Add MNGOF_TOPGAP and MNGOF_BOTTOMGAP constant macros. --- sdk/include/psdk/winuser.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sdk/include/psdk/winuser.h b/sdk/include/psdk/winuser.h index f9ff766a2a5..3f14ab7eb20 100644 --- a/sdk/include/psdk/winuser.h +++ b/sdk/include/psdk/winuser.h @@ -3180,6 +3180,17 @@ typedef struct _WNDCLASSEXW { HICON hIconSm; } WNDCLASSEXW,*LPWNDCLASSEXW,*PWNDCLASSEXW; +#define MNGOF_TOPGAP 0x00000001 +#define MNGOF_BOTTOMGAP 0x00000002 + +typedef struct tagMENUGETOBJECTINFO { + DWORD dwFlags; + UINT uPos; + HMENU hmenu; + PVOID riid; + PVOID pvObj; +} MENUGETOBJECTINFO,*PMENUGETOBJECTINFO; + typedef struct tagMENUITEMINFOA { UINT cbSize; UINT fMask;
5 years, 5 months
1
0
0
0
[reactos] 01/01: [SDK][INCLUDE] Add HANDLE_WM_* macros to <windowsx.h> (#1726)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=47e183c521011ff4b6c08…
commit 47e183c521011ff4b6c08f8ef0bb79a99d1d9f88 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Jul 15 19:58:34 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Jul 15 19:58:34 2019 +0900 [SDK][INCLUDE] Add HANDLE_WM_* macros to <windowsx.h> (#1726) - Add the following macros into <windowsx.h> header: HANDLE_WM_COPYDATA, HANDLE_WM_DEVICECHANGE, HANDLE_WM_DISPLAYCHANGE, HANDLE_WM_HOTKEY, and HANDLE_WM_MOUSEWHEEL. - Fix HANDLE_WM_CONTEXTMENU macro. --- sdk/include/psdk/windowsx.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sdk/include/psdk/windowsx.h b/sdk/include/psdk/windowsx.h index 7a879e67dec..2064c00eafa 100644 --- a/sdk/include/psdk/windowsx.h +++ b/sdk/include/psdk/windowsx.h @@ -309,8 +309,9 @@ #define HANDLE_WM_COMMNOTIFY(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(wParam),(UINT)LOWORD(lParam)),0) #define HANDLE_WM_COMPACTING(hwnd,wParam,lParam,fn) ((fn)((hwnd),(UINT)(wParam)),0) #define HANDLE_WM_COMPAREITEM(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(int)(fn)((hwnd),(const COMPAREITEMSTRUCT*)(lParam)) -#define HANDLE_WM_CONTEXTMENU(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(wParam),(UINT)GET_X_LPARAM(lParam),(UINT)GET_Y_LPARAM(lParam))) +#define HANDLE_WM_CONTEXTMENU(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(wParam),(UINT)GET_X_LPARAM(lParam),(UINT)GET_Y_LPARAM(lParam)),0) #define HANDLE_WM_COPY(hwnd,wParam,lParam,fn) ((fn)(hwnd),0) +#define HANDLE_WM_COPYDATA(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(wParam),(PCOPYDATASTRUCT)(lParam)),0) #define HANDLE_WM_CREATE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(LPCREATESTRUCT)(lParam)) ? 0 : (LRESULT)-1L) #define HANDLE_WM_CTLCOLORBTN(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(HBRUSH)(fn)((hwnd),(HDC)(wParam),(HWND)(lParam),CTLCOLOR_BTN) #define HANDLE_WM_CTLCOLORDLG(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(HBRUSH)(fn)((hwnd),(HDC)(wParam),(HWND)(lParam),CTLCOLOR_DLG) @@ -324,7 +325,9 @@ #define HANDLE_WM_DELETEITEM(hwnd,wParam,lParam,fn) ((fn)((hwnd),(const DELETEITEMSTRUCT*)(lParam)),0) #define HANDLE_WM_DESTROY(hwnd,wParam,lParam,fn) ((fn)(hwnd),0) #define HANDLE_WM_DESTROYCLIPBOARD(hwnd,wParam,lParam,fn) ((fn)(hwnd),0) +#define HANDLE_WM_DEVICECHANGE(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(BOOL)(fn)((hwnd),(UINT)(wParam),(DWORD)(wParam)) #define HANDLE_WM_DEVMODECHANGE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(LPCTSTR)(lParam)),0) +#define HANDLE_WM_DISPLAYCHANGE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(UINT)(wParam),(UINT)LOWORD(lParam),(UINT)HIWORD(wParam)),0) #define HANDLE_WM_DRAWCLIPBOARD(hwnd,wParam,lParam,fn) ((fn)(hwnd),0) #define HANDLE_WM_DRAWITEM(hwnd,wParam,lParam,fn) ((fn)((hwnd),(const DRAWITEMSTRUCT*)(lParam)),0) #define HANDLE_WM_DROPFILES(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HDROP)(wParam)),0) @@ -338,6 +341,7 @@ #define HANDLE_WM_GETMINMAXINFO(hwnd,wParam,lParam,fn) ((fn)((hwnd),(LPMINMAXINFO)(lParam)),0) #define HANDLE_WM_GETTEXT(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(int)(fn)((hwnd),(int)(wParam),(LPTSTR)(lParam)) #define HANDLE_WM_GETTEXTLENGTH(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(int)(fn)(hwnd) +#define HANDLE_WM_HOTKEY(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(wParam),(UINT)LOWORD(lParam),(UINT)HIWORD(lParam)),0) #define HANDLE_WM_HSCROLL(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(lParam),(UINT)(LOWORD(wParam)),(int)(short)HIWORD(wParam)),0) #define HANDLE_WM_HSCROLLCLIPBOARD(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(wParam),(UINT)LOWORD(lParam),(int)(short)HIWORD(lParam)),0) #define HANDLE_WM_ICONERASEBKGND(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(BOOL)(fn)((hwnd),(HDC)(wParam)) @@ -369,6 +373,7 @@ #define HANDLE_WM_MENUSELECT(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HMENU)(lParam),(int)(LOWORD(wParam)),(HIWORD(wParam) & MF_POPUP) ? GetSubMenu((HMENU)lParam,LOWORD(wParam)) : 0,(UINT)(((short)HIWORD(wParam) == -1) ? 0xFFFFFFFF : HIWORD(wParam))),0) #define HANDLE_WM_MOUSEACTIVATE(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(int)(fn)((hwnd),(HWND)(wParam),(UINT)LOWORD(lParam),(UINT)HIWORD(lParam)) #define HANDLE_WM_MOUSEMOVE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0) +#define HANDLE_WM_MOUSEWHEEL(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(int)(short)HIWORD(wParam),(UINT)(short)LOWORD(wParam)),0) #define HANDLE_WM_MOVE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam)),0) #define HANDLE_WM_NCACTIVATE(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(BOOL)(fn)((hwnd),(BOOL)(wParam),0,0) #define HANDLE_WM_NCCALCSIZE(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(fn)((hwnd),(BOOL)(0),(NCCALCSIZE_PARAMS*)(lParam))
5 years, 5 months
1
0
0
0
[reactos] 05/05: [NTOS:INBV] Fix the bitmaps' palette and recompress them in RLE. (#1649)
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e2d6f61085653ec084a4d…
commit e2d6f61085653ec084a4dc7e22d8bcc54df1320f Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Jul 14 20:07:09 2019 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Jul 14 22:23:52 2019 +0200 [NTOS:INBV] Fix the bitmaps' palette and recompress them in RLE. (#1649) They don't need to have a zeroed-out palette now that we can automatically reset it from within the code. Co-authored-by: Yaroslav Kibysh <yanet.prod(a)gmail.com> --- ntoskrnl/inbv/logo/1.bmp | Bin 21652 -> 20498 bytes ntoskrnl/inbv/logo/15.bmp | Bin 416 -> 386 bytes ntoskrnl/inbv/logo/4.bmp | Bin 228 -> 226 bytes ntoskrnl/inbv/logo/6.bmp | Bin 2896 -> 2896 bytes ntoskrnl/inbv/logo/7.bmp | Bin 1078 -> 490 bytes ntoskrnl/inbv/logo/8.bmp | Bin 228 -> 226 bytes ntoskrnl/inbv/logo/line.bmp | Bin 2038 -> 848 bytes 7 files changed, 0 insertions(+), 0 deletions(-) diff --git a/ntoskrnl/inbv/logo/1.bmp b/ntoskrnl/inbv/logo/1.bmp index 9c4e503872f..dcc0ae71a55 100644 Binary files a/ntoskrnl/inbv/logo/1.bmp and b/ntoskrnl/inbv/logo/1.bmp differ diff --git a/ntoskrnl/inbv/logo/15.bmp b/ntoskrnl/inbv/logo/15.bmp index 88481b9284d..bc6cebb0467 100644 Binary files a/ntoskrnl/inbv/logo/15.bmp and b/ntoskrnl/inbv/logo/15.bmp differ diff --git a/ntoskrnl/inbv/logo/4.bmp b/ntoskrnl/inbv/logo/4.bmp index 7aabbbfeb6e..8d443e6e99e 100644 Binary files a/ntoskrnl/inbv/logo/4.bmp and b/ntoskrnl/inbv/logo/4.bmp differ diff --git a/ntoskrnl/inbv/logo/6.bmp b/ntoskrnl/inbv/logo/6.bmp index 08344117cb2..41dece0474d 100644 Binary files a/ntoskrnl/inbv/logo/6.bmp and b/ntoskrnl/inbv/logo/6.bmp differ diff --git a/ntoskrnl/inbv/logo/7.bmp b/ntoskrnl/inbv/logo/7.bmp index 24ea2137758..34d69651f03 100644 Binary files a/ntoskrnl/inbv/logo/7.bmp and b/ntoskrnl/inbv/logo/7.bmp differ diff --git a/ntoskrnl/inbv/logo/8.bmp b/ntoskrnl/inbv/logo/8.bmp index 344e0b23c44..de040cf9286 100644 Binary files a/ntoskrnl/inbv/logo/8.bmp and b/ntoskrnl/inbv/logo/8.bmp differ diff --git a/ntoskrnl/inbv/logo/line.bmp b/ntoskrnl/inbv/logo/line.bmp index c5d214e3946..7ea595bf9f6 100644 Binary files a/ntoskrnl/inbv/logo/line.bmp and b/ntoskrnl/inbv/logo/line.bmp differ
5 years, 5 months
1
0
0
0
[reactos] 04/05: [NTOS:INBV] Express some coordinates in terms of screen size. (#1649)
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=64a53b304e5edf1606bbb…
commit 64a53b304e5edf1606bbb0ed89b69bce2973f354 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Jul 7 23:15:53 2019 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Jul 14 22:23:51 2019 +0200 [NTOS:INBV] Express some coordinates in terms of screen size. (#1649) --- ntoskrnl/inbv/inbv.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ntoskrnl/inbv/inbv.c b/ntoskrnl/inbv/inbv.c index d0d382e8e68..5e96c978c2b 100644 --- a/ntoskrnl/inbv/inbv.c +++ b/ntoskrnl/inbv/inbv.c @@ -99,7 +99,7 @@ static BOOLEAN RotBarThreadActive = FALSE; static ROT_BAR_TYPE RotBarSelection = RB_UNSPECIFIED; static ROT_BAR_STATUS PltRotBarStatus = 0; static UCHAR RotBarBuffer[24 * 9]; -static UCHAR RotLineBuffer[640 * 6]; +static UCHAR RotLineBuffer[SCREEN_WIDTH * 6]; #endif @@ -193,7 +193,7 @@ BootLogoFadeIn(VOID) ULONG Iteration, Index, ClrUsed; LARGE_INTEGER Delay; - Delay.QuadPart = - (PALETTE_FADE_TIME * 10); + Delay.QuadPart = -(PALETTE_FADE_TIME * 10); /* Check if we are installed and we own the display */ if (!InbvBootDriverInstalled || @@ -1028,15 +1028,15 @@ InbvRotationThread( else if (RotBarSelection == RB_PROGRESS_BAR) { Delay.QuadPart = -600000; // 60 ms - Total = 640; + Total = SCREEN_WIDTH; Index %= Total; /* Right part */ - VidBufferToScreenBlt(RotLineBuffer, Index, 474, 640 - Index, 6, 640); + VidBufferToScreenBlt(RotLineBuffer, Index, SCREEN_HEIGHT-6, SCREEN_WIDTH - Index, 6, SCREEN_WIDTH); if (Index > 0) { /* Left part */ - VidBufferToScreenBlt(RotLineBuffer + (640 - Index) / 2, 0, 474, Index - 2, 6, 640); + VidBufferToScreenBlt(RotLineBuffer + (SCREEN_WIDTH - Index) / 2, 0, SCREEN_HEIGHT-6, Index - 2, 6, SCREEN_WIDTH); } Index += 32; } @@ -1103,8 +1103,8 @@ DisplayBootBitmap(IN BOOLEAN TextMode) { /* Workstation; set colors */ InbvSetTextColor(15); - InbvSolidColorFill(0, 0, 639, 479, 7); - InbvSolidColorFill(0, 421, 639, 479, 1); + InbvSolidColorFill(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1, 7); + InbvSolidColorFill(0, 421, SCREEN_WIDTH-1, SCREEN_HEIGHT-1, 1); /* Get resources */ Header = InbvGetResourceAddress(IDB_WKSTA_HEADER); @@ -1114,8 +1114,8 @@ DisplayBootBitmap(IN BOOLEAN TextMode) { /* Server; set colors */ InbvSetTextColor(14); - InbvSolidColorFill(0, 0, 639, 479, 6); - InbvSolidColorFill(0, 421, 639, 479, 1); + InbvSolidColorFill(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1, 6); + InbvSolidColorFill(0, 421, SCREEN_WIDTH-1, SCREEN_HEIGHT-1, 1); /* Get resources */ Header = InbvGetResourceAddress(IDB_SERVER_HEADER); @@ -1259,8 +1259,8 @@ DisplayBootBitmap(IN BOOLEAN TextMode) if (LineBmp) { /* Draw the line and store it in global buffer */ - BitBltPalette(LineBmp, TRUE, 0, 474); - InbvScreenToBufferBlt(RotLineBuffer, 0, 474, 640, 6, 640); + BitBltPalette(LineBmp, TRUE, 0, SCREEN_HEIGHT-6); + InbvScreenToBufferBlt(RotLineBuffer, 0, SCREEN_HEIGHT-6, SCREEN_WIDTH, 6, SCREEN_WIDTH); } } else @@ -1355,7 +1355,7 @@ FinalizeBootLogo(VOID) if (InbvGetDisplayState() == INBV_DISPLAY_STATE_OWNED) { /* Clear the screen */ - VidSolidColorFill(0, 0, 639, 479, 0); + VidSolidColorFill(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1, 0); } /* Reset progress bar and lock */
5 years, 5 months
1
0
0
0
[reactos] 03/05: [NTOS:INBV] Implement BitBltPalette() and BitBltAligned() and use them for aligning bitmaps. (#1649)
by Yaroslav Kibysh
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=dc2eb409c1d838733abcf…
commit dc2eb409c1d838733abcfcb22bbaa90dda434795 Author: Yaroslav Kibysh <yanet.prod(a)gmail.com> AuthorDate: Tue Jun 11 22:27:25 2019 +0300 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Jul 14 22:23:50 2019 +0200 [NTOS:INBV] Implement BitBltPalette() and BitBltAligned() and use them for aligning bitmaps. (#1649) Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> --- ntoskrnl/inbv/inbv.c | 170 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 153 insertions(+), 17 deletions(-) diff --git a/ntoskrnl/inbv/inbv.c b/ntoskrnl/inbv/inbv.c index 295ffac0142..d0d382e8e68 100644 --- a/ntoskrnl/inbv/inbv.c +++ b/ntoskrnl/inbv/inbv.c @@ -5,6 +5,10 @@ #include <debug.h> #include "bootvid/bootvid.h" +/* See also mm/ARM3/miarm.h */ +#define MM_READONLY 1 // PAGE_READONLY +#define MM_READWRITE 4 // PAGE_WRITECOPY + #ifndef TAG_OSTR #define TAG_OSTR 'RTSO' #endif @@ -28,6 +32,29 @@ */ // #define REACTOS_SKUS +/* + * Screen resolution (for default VGA) + */ +#define SCREEN_WIDTH 640 +#define SCREEN_HEIGHT 480 + +/* + * BitBltAligned() alignments + */ +typedef enum _BBLT_VERT_ALIGNMENT +{ + AL_VERTICAL_TOP = 0, + AL_VERTICAL_CENTER, + AL_VERTICAL_BOTTOM +} BBLT_VERT_ALIGNMENT; + +typedef enum _BBLT_HORZ_ALIGNMENT +{ + AL_HORIZONTAL_LEFT = 0, + AL_HORIZONTAL_CENTER, + AL_HORIZONTAL_RIGHT +} BBLT_HORZ_ALIGNMENT; + /* * Enable this define when Inbv will support rotating progress bar. */ @@ -210,6 +237,96 @@ BootLogoFadeIn(VOID) } } +static VOID +BitBltPalette( + IN PVOID Image, + IN BOOLEAN NoPalette, + IN ULONG X, + IN ULONG Y) +{ + LPRGBQUAD Palette; + RGBQUAD OrigPalette[RTL_NUMBER_OF(MainPalette)]; + + /* If requested, remove the palette from the image */ + if (NoPalette) + { + /* Get bitmap header and palette */ + PBITMAPINFOHEADER BitmapInfoHeader = Image; + Palette = (LPRGBQUAD)((PUCHAR)Image + BitmapInfoHeader->biSize); + + /* Save the image original palette and remove palette information */ + RtlCopyMemory(OrigPalette, Palette, sizeof(OrigPalette)); + RtlZeroMemory(Palette, sizeof(OrigPalette)); + } + + /* Draw the image */ + InbvBitBlt(Image, X, Y); + + /* Restore the image original palette */ + if (NoPalette) + { + RtlCopyMemory(Palette, OrigPalette, sizeof(OrigPalette)); + } +} + +static VOID +BitBltAligned( + IN PVOID Image, + IN BOOLEAN NoPalette, + IN BBLT_HORZ_ALIGNMENT HorizontalAlignment, + IN BBLT_VERT_ALIGNMENT VerticalAlignment, + IN ULONG MarginLeft, + IN ULONG MarginTop, + IN ULONG MarginRight, + IN ULONG MarginBottom) +{ + PBITMAPINFOHEADER BitmapInfoHeader = Image; + ULONG X, Y; + + /* Calculate X */ + switch (HorizontalAlignment) + { + case AL_HORIZONTAL_LEFT: + X = MarginLeft - MarginRight; + break; + + case AL_HORIZONTAL_CENTER: + X = MarginLeft - MarginRight + (SCREEN_WIDTH - BitmapInfoHeader->biWidth + 1) / 2; + break; + + case AL_HORIZONTAL_RIGHT: + X = MarginLeft - MarginRight + SCREEN_WIDTH - BitmapInfoHeader->biWidth; + break; + + default: + /* Unknown */ + return; + } + + /* Calculate Y */ + switch (VerticalAlignment) + { + case AL_VERTICAL_TOP: + Y = MarginTop - MarginBottom; + break; + + case AL_VERTICAL_CENTER: + Y = MarginTop - MarginBottom + (SCREEN_HEIGHT - BitmapInfoHeader->biHeight + 1) / 2; + break; + + case AL_VERTICAL_BOTTOM: + Y = MarginTop - MarginBottom + SCREEN_HEIGHT - BitmapInfoHeader->biHeight; + break; + + default: + /* Unknown */ + return; + } + + /* Finally draw the image */ + BitBltPalette(Image, NoPalette, X, Y); +} + /* FUNCTIONS *****************************************************************/ INIT_FUNCTION @@ -975,6 +1092,12 @@ DisplayBootBitmap(IN BOOLEAN TextMode) /* Check if this is text mode */ if (TextMode) { + /* + * Make the kernel resource section temporarily writable, + * as we are going to change the bitmaps' palette in place. + */ + MmChangeKernelResourceSectionProtection(MM_READWRITE); + /* Check the type of the OS: workstation or server */ if (SharedUserData->NtProductType == NtProductWinNt) { @@ -1006,15 +1129,32 @@ DisplayBootBitmap(IN BOOLEAN TextMode) if (Header && Footer) { /* BitBlt them on the screen */ - InbvBitBlt(Footer, 0, 419); - InbvBitBlt(Header, 0, 0); + BitBltAligned(Footer, + TRUE, + AL_HORIZONTAL_CENTER, + AL_VERTICAL_BOTTOM, + 0, 0, 0, 59); + BitBltAligned(Header, + FALSE, + AL_HORIZONTAL_CENTER, + AL_VERTICAL_TOP, + 0, 0, 0, 0); } + + /* Restore the kernel resource section protection to be read-only */ + MmChangeKernelResourceSectionProtection(MM_READONLY); } else { /* Is the boot driver installed? */ if (!InbvBootDriverInstalled) return; + /* + * Make the kernel resource section temporarily writable, + * as we are going to change the bitmaps' palette in place. + */ + MmChangeKernelResourceSectionProtection(MM_READWRITE); + /* Load the standard boot screen */ Screen = InbvGetResourceAddress(IDB_BOOT_SCREEN); @@ -1059,20 +1199,13 @@ DisplayBootBitmap(IN BOOLEAN TextMode) /* Make sure we have a logo */ if (Screen) { - PBITMAPINFOHEADER BitmapInfoHeader; - LPRGBQUAD Palette; - - /* - * Save the main image palette and replace it with black palette, - * so that we can do fade-in effect later. - */ - BitmapInfoHeader = (PBITMAPINFOHEADER)Screen; - Palette = (LPRGBQUAD)((PUCHAR)Screen + BitmapInfoHeader->biSize); + /* Save the main image palette for implementing the fade-in effect */ + PBITMAPINFOHEADER BitmapInfoHeader = Screen; + LPRGBQUAD Palette = (LPRGBQUAD)((PUCHAR)Screen + BitmapInfoHeader->biSize); RtlCopyMemory(MainPalette, Palette, sizeof(MainPalette)); - RtlZeroMemory(Palette, sizeof(MainPalette)); /* Blit the background */ - InbvBitBlt(Screen, 0, 0); + BitBltPalette(Screen, TRUE, 0, 0); #ifdef INBV_ROTBAR_IMPLEMENTED /* Choose progress bar */ @@ -1099,7 +1232,7 @@ DisplayBootBitmap(IN BOOLEAN TextMode) #ifdef REACTOS_SKUS /* Draw the SKU text if it exits */ - if (Text) InbvBitBlt(Text, 180, 121); + if (Text) BitBltPalette(Text, TRUE, 180, 121); #endif #ifdef INBV_ROTBAR_IMPLEMENTED @@ -1126,7 +1259,7 @@ DisplayBootBitmap(IN BOOLEAN TextMode) if (LineBmp) { /* Draw the line and store it in global buffer */ - InbvBitBlt(LineBmp, 0, 474); + BitBltPalette(LineBmp, TRUE, 0, 474); InbvScreenToBufferBlt(RotLineBuffer, 0, 474, 640, 6, 640); } } @@ -1137,6 +1270,9 @@ DisplayBootBitmap(IN BOOLEAN TextMode) } #endif + /* Restore the kernel resource section protection to be read-only */ + MmChangeKernelResourceSectionProtection(MM_READONLY); + /* Display the boot logo and fade it in */ BootLogoFadeIn(); @@ -1194,10 +1330,10 @@ DisplayFilter(PCHAR *String) static BOOLEAN DotHack = TRUE; /* If "." is given set *String to empty string */ - if(DotHack && strcmp(*String, ".") == 0) + if (DotHack && strcmp(*String, ".") == 0) *String = ""; - if(**String) + if (**String) { /* Remove the filter */ InbvInstallDisplayStringFilter(NULL);
5 years, 5 months
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
14
15
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Results per page:
10
25
50
100
200