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
2025
January
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
November 2007
----- 2025 -----
January 2025
----- 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
20 participants
888 discussions
Start a n
N
ew thread
[cfinck] 30479: Brazilian Portuguese translation for msconfig by Mateus de Lima (mateusloliveira AT hotmail DOT com) See issue #2771 for more details.
by cfinck@svn.reactos.org
Author: cfinck Date: Fri Nov 16 01:26:15 2007 New Revision: 30479 URL:
http://svn.reactos.org/svn/reactos?rev=30479&view=rev
Log: Brazilian Portuguese translation for msconfig by Mateus de Lima (mateusloliveira AT hotmail DOT com) See issue #2771 for more details. Added: trunk/reactos/base/applications/msconfig/lang/pt-BR.rc (with props) Modified: trunk/reactos/base/applications/msconfig/rsrc.rc Added: trunk/reactos/base/applications/msconfig/lang/pt-BR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
============================================================================== --- trunk/reactos/base/applications/msconfig/lang/pt-BR.rc (added) +++ trunk/reactos/base/applications/msconfig/lang/pt-BR.rc Fri Nov 16 01:26:15 2007 @@ -1,0 +1,180 @@ + +/* + Translated by: + Mateus de Lima (aka wavemaster) <mateusloliveira [@]
hotmail.com
> +*/ + +LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL + +IDD_MSCONFIG_DIALOG DIALOG DISCARDABLE 0, 0, 378, 220 +STYLE DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | + WS_THICKFRAME +CAPTION "Programa de configuração do sistema" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,2,2,374,195 + DEFPUSHBUTTON "OK", IDOK, 211, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Ajuda", IDC_BTN_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Cancelar", IDCANCEL, 267, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Aplicar", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END + +IDD_STARTUP_PAGE DIALOG DISCARDABLE 0, 0, 362, 175 +STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "List3",IDC_STARTUP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 148 + PUSHBUTTON "A&tivar tudo",IDC_BTN_STARTUP_ACTIVATE,223,155,66,14 + PUSHBUTTON "De&sativar tudo",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 +END + +IDD_SYSTEM_PAGE DIALOG DISCARDABLE 0, 0, 362, 175 +STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", 237, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_EDITLABELS | TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 2, 1, 280, 148 + PUSHBUTTON "&Mover p/ cima", IDC_BTN_SYSTEM_UP, 290, 5, 66, 14 + PUSHBUTTON "M&over p/ baixo", IDC_BTN_SYSTEM_DOWN, 290, 25, 66, 14 + + PUSHBUTTON "Ati&var", IDC_BTN_SYSTEM_ENABLE, 290, 50, 66, 14 + PUSHBUTTON "&Desativar", IDC_BTN_SYSTEM_DISABLE, 290, 70, 66, 14 + + PUSHBUTTON "Locali&zar", IDC_BTN_SYSTEM_FIND, 290, 95, 66, 14 + PUSHBUTTON "&Novo", IDC_BTN_SYSTEM_NEW, 290, 115, 66, 14 + PUSHBUTTON "&Editar", IDC_BTN_SYSTEM_EDIT, 290, 135, 66, 14 + + PUSHBUTTON "Ativar t&udo", IDC_BTN_SYSTEM_ACTIVATE, 123, 155, 66, 14 + PUSHBUTTON "Desa&tivar tudo",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 +END + +IDD_TOOLS_PAGE DIALOG DISCARDABLE 0, 0, 362, 175 +STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "List2",IDC_TOOLS_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 134 + EDITTEXT IDC_TOOLS_CMDLINE, 1, 139, 360, 12, ES_READONLY + PUSHBUTTON "&Executar", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END + +IDD_SERVICES_PAGE DIALOG DISCARDABLE 0, 0, 362, 175 +STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "List1",IDC_SERVICES_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,2,1,360,148 + PUSHBUTTON "A&tivar tudo",IDC_BTN_SERVICES_ACTIVATE,223,155,66,14 + PUSHBUTTON "D&esativar tudo",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 +END + +IDD_GENERAL_PAGE DIALOG DISCARDABLE 0, 0, 362, 175 +STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Seleção de inicialização", -1, 10, 10, 340, 150,0,WS_EX_TRANSPARENT + CONTROL "&Inicialização normal - carregar todos os drivers de dispositivo e serviços", IDC_CBX_NORMAL_START, "Button", 0x50010009, 20, 30, 180, 10 + CONTROL "I&nicialização de diagnóstico - carregar apenas dispositivos e serviços básicos", IDC_CBX_DIAGNOSTIC_START, "Button", 0x50010009, 20, 45, 195, 10 + CONTROL "Ini&cialização seletiva", IDC_CBX_SELECTIVE_STARTUP, "Button", 0x50010009, 20, 60, 70, 10 + CHECKBOX "&Processar o arquivo SYSTEM.INI", IDC_CBX_SYSTEM_INI, 30, 80, 95, 10 + CHECKBOX "Carr&egar serviços do sistema", IDC_CBX_SYSTEM_SERVICE, 30, 95, 90, 10 + CHECKBOX "Carregar i&tens de inicialização", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 +END + +IDD_FREELDR_PAGE DIALOG DISCARDABLE 0, 0, 362, 175 +STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + PUSHBUTTON "Verificar camin&hos de inicialização", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 + PUSHBUTTON "&Definir como padrão", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 + PUSHBUTTON "Mo&ver para cima", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 + PUSHBUTTON "Mover para bai&xo", IDC_BTN_MOVE_DOWN_BOOT_OPTION, 280, 65, 70, 12 + GROUPBOX "Opções de inicialização", -1, 10, 80, 250, 90,0,WS_EX_TRANSPARENT + CHECKBOX "/SA&FEBOOT", IDC_CBX_SAFE_BOOT, 15, 90, 55, 10 + CHECKBOX "/&NOGUIBOOT", IDC_CBX_NO_GUI_BOOT, 15, 105, 60, 10 + CHECKBOX "/&BOOTLOG", IDC_CBX_BOOT_LOG, 15, 120, 50, 10 + CHECKBOX "/BAS&EVIDEO", IDC_CBX_BASE_VIDEO, 15, 135, 55, 10 + CHECKBOX "/S&OS", IDC_CBX_SOS, 15, 150, 50, 10 + PUSHBUTTON "Opçõe&s avançadas...", IDC_BTN_ADVANCED_OPTIONS, 100, 150, 70, 12 + LTEXT "&Tempo limite:", -1, 280, 91, 30, 10 + EDITTEXT IDC_TXT_BOOT_TIMEOUT, 310, 90, 25, 12, ES_LEFT + LTEXT "segundos", -1, 340, 91, 15, 10 +END + +IDD_FREELDR_ADVANCED_PAGE DIALOG DISCARDABLE 0, 0, 175, 175 +STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Shell Dlg" +BEGIN + CHECKBOX "/&MAXMEM=", IDC_CBX_MAX_MEM, 10, 10, 50, 10 + EDITTEXT IDC_TXT_MAX_MEM, 80, 10, 60, 12 + CONTROL "",IDC_SCR_MAX_MEM, "msctls_updown32", 0x50000000, 140, 10, 11, 11 + CHECKBOX "/&NUMPROC=", IDC_CBX_NUM_PROC, 10, 25, 50, 10 + COMBOBOX IDC_DRP_NUM_PROC, 80, 25, 60, 10, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP + CHECKBOX "/&PCILOCK", IDC_CBX_PCI_LOCK, 10, 40, 50, 10 + CHECKBOX "/P&ROFILE", IDC_CBX_PROFILE, 10, 55, 50, 10 + CHECKBOX "/&IRQ", IDC_CBX_IRQ, 10, 70, 40, 12 + EDITTEXT IDC_TXT_IRQ, 80, 70, 60, 12, ES_LEFT + CHECKBOX "/&DEBUG", IDC_CBX_DEBUG, 10, 85, 40, 10 + CHECKBOX "/D&EBUGPORT", IDC_CBX_DEBUG_PORT, 20, 100, 60, 10 + COMBOBOX IDC_DRP_DEBUG_PORT, 80, 100, 60, 10, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP + CHECKBOX "/&BAUDRATE", IDC_CBX_BAUD_RATE, 20, 115, 50, 10 + COMBOBOX IDC_DRP_DRP_BAUD_RATE, 80, 115, 60, 10, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP + CHECKBOX "/&CHANNEL", IDC_CBX_CHANNEL, 20, 130, 50, 10 + EDITTEXT IDC_TXT_CHANNEL, 80, 130, 60, 12, ES_LEFT + CONTROL "",IDC_SCR_CHANNEL, "msctls_updown32", 0x50000000, 140, 130, 11, 11 + PUSHBUTTON "OK", IDC_OK, 20, 160, 50, 12 + PUSHBUTTON "Cancelar", IDC_CANCEL, 100, 160, 50, 12 +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_MSCONFIG "Programa de configuração do sistema" + IDS_TAB_GENERAL "Geral" + IDS_TAB_SYSTEM "SYSTEM.INI" + IDS_TAB_FREELDR "FREELDR.INI" + IDS_TAB_SERVICES "Serviços" + IDS_TAB_STARTUP "Inicializar" + IDS_TAB_TOOLS "Ferramentas" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_SERVICES_COLUMN_SERVICE "Serviço" + IDS_SERVICES_COLUMN_REQ "Essencial" + IDS_SERVICES_COLUMN_VENDOR "Fabricante" + IDS_SERVICES_COLUMN_STATUS "Status" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_TOOLS_COLUMN_NAME "Nome" + IDS_TOOLS_COLUMN_DESCR "Descrição" + + IDS_TOOLS_CMD_NAME "Console" + IDS_TOOLS_CMD_DESCR "" + IDS_TOOLS_CMD_CMD "cmd.exe" + + IDS_TOOLS_INFO_NAME "Versão" + IDS_TOOLS_INFO_DESCR "Mostra informação sobre a versão." + IDS_TOOLS_INFO_CMD "winver.exe" + + IDS_TOOLS_REGEDIT_NAME "Editor do Registro" + IDS_TOOLS_REGEDIT_DESCR "Abre o Editor do Registro." + IDS_TOOLS_REGEDIT_CMD "regedit.exe" + + IDS_TOOLS_SYSDM_NAME "Propriedades do sistema" + IDS_TOOLS_SYSDM_DESCR "Mostra informações sobre este computador." + IDS_TOOLS_SYSDM_CMD "control" + IDS_TOOLS_SYSDM_PARAM "sysdm.cpl" + + IDS_STARTUP_COLUMN_ELEMENT "Item de inicialização" + IDS_STARTUP_COLUMN_CMD "Comando" + IDS_STARTUP_COLUMN_PATH "Local" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_SERVICES_STATUS_RUNNING "Em execução" + IDS_SERVICES_STATUS_STOPPED "Parado" + IDS_SERVICES_YES "Sim" + IDS_SERVICES_UNKNOWN "Desconhecido" +END Propchange: trunk/reactos/base/applications/msconfig/lang/pt-BR.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/base/applications/msconfig/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
============================================================================== --- trunk/reactos/base/applications/msconfig/rsrc.rc (original) +++ trunk/reactos/base/applications/msconfig/rsrc.rc Fri Nov 16 01:26:15 2007 @@ -19,6 +19,7 @@ #include "lang/id-ID.rc" #include "lang/it-IT.rc" #include "lang/pl-PL.rc" +#include "lang/pt-BR.rc" #include "lang/ru-RU.rc" #include "lang/nl-NL.rc" #include "lang/nb-NO.rc"
17 years, 1 month
1
0
0
0
[cfinck] 30478: Ukrainian translation for WinHelp by Rostislav Zabolotny (rstzab AT yandex DOT ru) See issue #2765 for more details.
by cfinck@svn.reactos.org
Author: cfinck Date: Fri Nov 16 01:11:27 2007 New Revision: 30478 URL:
http://svn.reactos.org/svn/reactos?rev=30478&view=rev
Log: Ukrainian translation for WinHelp by Rostislav Zabolotny (rstzab AT yandex DOT ru) See issue #2765 for more details. Added: trunk/reactos/base/applications/winhelp/lang/uk-UA.rc (with props) Modified: trunk/reactos/base/applications/winhelp/rsrc.rc Added: trunk/reactos/base/applications/winhelp/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhelp/…
============================================================================== --- trunk/reactos/base/applications/winhelp/lang/uk-UA.rc (added) +++ trunk/reactos/base/applications/winhelp/lang/uk-UA.rc Fri Nov 16 01:11:27 2007 @@ -1,0 +1,60 @@ +/* + * PROJECT: ReactOS Help Viewer + * LICENSE: GPL - See COPYING in the top level directory + * FILE: applications/winhelp/lang/uk-UA.rc + * PURPOSE: Ukraianian Language File for ReactOS Help Viewer + * PROGRAMMERS: Rostislav Zabolotny + */ + +LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT + +/* Menu */ + +MAIN_MENU MENU +{ + POPUP "&Ôàéë" { + MENUITEM "&³äêðèòè", MNID_FILE_OPEN + MENUITEM SEPARATOR + MENUITEM "&Äðóê", MNID_FILE_PRINT + MENUITEM "Íàëàøòóâàííÿ &ïð³íòåðà...", MNID_FILE_SETUP + MENUITEM SEPARATOR + MENUITEM "Â&èõ³ä", MNID_FILE_EXIT + } + POPUP "&Ïðàâêà" { + MENUITEM "&Êîï³þâàòè...", MNID_EDIT_COPYDLG + MENUITEM SEPARATOR + MENUITEM "&Îïèñ...", MNID_EDIT_ANNOTATE + } + POPUP "&Çàêëàäêà" { + MENUITEM "&Âèçíà÷èòè...", MNID_BKMK_DEFINE + } + POPUP "&Äîïîìîãà" { + MENUITEM "Äîïîìîãà &ïî äîïîìîç³", MNID_HELP_HELPON + MENUITEM "&Íàä óñ³ìà â³êíàìè", MNID_HELP_HELPTOP + MENUITEM SEPARATOR + MENUITEM "&²íôîðìàö³ÿ...", MNID_HELP_ABOUT +#ifdef WINELIB + MENUITEM "&Ïðî WINE", MNID_HELP_WINE +#endif + } +} + +/* Strings */ + +STRINGTABLE DISCARDABLE +{ +STID_WINE_HELP, "Äîïîìîãà WINE" +STID_WHERROR, "ÏÎÌÈËÊÀ" +STID_WARNING, "ÏÎÏÅÐÅÄÆÅÍÍß" +STID_INFO, "²íôîðìàö³ÿ" +STID_NOT_IMPLEMENTED, "Íå ðåàë³çîâàíî" +STID_HLPFILE_ERROR_s, "Ïîìèëêà ï³ä ÷àñ ÷èòàííÿ ôàéëó äîïîìîãè `%s'" +STID_CONTENTS, "&Çì³ñò" +STID_SEARCH, "&Ïîøóê" +STID_BACK, "&Íàçàä" +STID_HISTORY, "&²ñòîð³ÿ" +STID_TOPICS, "&Ðîçä³ëè" +STID_ALL_FILES, "Âñ³ ôàéëè (*.*)" +STID_HELP_FILES_HLP, "Ôàéëè äîïîìîãè (*.hlp)" +STID_FILE_NOT_FOUND_s "Íå ìîæó çíàéòè '%s'. ×è íå áàæàºòå âêàçàòè ðîçòàøóâàííÿ ñàìîñò³éíî?" +} Propchange: trunk/reactos/base/applications/winhelp/lang/uk-UA.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/base/applications/winhelp/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhelp/…
============================================================================== --- trunk/reactos/base/applications/winhelp/rsrc.rc (original) +++ trunk/reactos/base/applications/winhelp/rsrc.rc Fri Nov 16 01:11:27 2007 @@ -45,5 +45,6 @@ #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" #include "lang/tr-TR.rc" +#include "lang/uk-UA.rc" //#include "lang/wa-WA.rc" #include "lang/zh-CN.rc"
17 years, 1 month
1
0
0
0
[weiden] 30477: Implement GetWindowLongA/W without having to call win32k for most cases
by weiden@svn.reactos.org
Author: weiden Date: Fri Nov 16 01:08:13 2007 New Revision: 30477 URL:
http://svn.reactos.org/svn/reactos?rev=30477&view=rev
Log: Implement GetWindowLongA/W without having to call win32k for most cases Modified: trunk/reactos/dll/win32/user32/windows/class.c trunk/reactos/dll/win32/user32/windows/window.c trunk/reactos/include/reactos/win32k/ntuser.h trunk/reactos/subsystems/win32/win32k/include/window.h trunk/reactos/subsystems/win32/win32k/include/winpos.h trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c trunk/reactos/subsystems/win32/win32k/ntuser/focus.c trunk/reactos/subsystems/win32/win32k/ntuser/menu.c trunk/reactos/subsystems/win32/win32k/ntuser/misc.c trunk/reactos/subsystems/win32/win32k/ntuser/painting.c trunk/reactos/subsystems/win32/win32k/ntuser/scrollbar.c trunk/reactos/subsystems/win32/win32k/ntuser/vis.c trunk/reactos/subsystems/win32/win32k/ntuser/windc.c trunk/reactos/subsystems/win32/win32k/ntuser/window.c trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c Modified: trunk/reactos/dll/win32/user32/windows/class.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/c…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/class.c (original) +++ trunk/reactos/dll/win32/user32/windows/class.c Fri Nov 16 01:08:13 2007 @@ -329,7 +329,49 @@ STDCALL GetWindowLongA ( HWND hWnd, int nIndex ) { - return NtUserGetWindowLong(hWnd, nIndex, TRUE); + PWINDOW Wnd; + + Wnd = ValidateHwnd(hWnd); + if (Wnd == NULL) + return 0; + + if (nIndex >= 0) + { + if ((DWORD)nIndex + sizeof(LONG) > Wnd->ExtraDataSize) + { + SetLastError(ERROR_INVALID_PARAMETER); + return 0; + } + + return *((LONG *)((PCHAR)(Wnd + 1) + nIndex)); + } + else + { + switch (nIndex) + { + case GWL_EXSTYLE: + return Wnd->ExStyle; + case GWL_STYLE: + return Wnd->Style; + case GWL_HINSTANCE: + return (LONG)Wnd->Instance; + case GWL_ID: + return Wnd->IDMenu; + case GWL_USERDATA: + return Wnd->UserData; + + case GWL_HWNDPARENT: + /* FIXME: Implement in user32 */ + case GWL_WNDPROC: + /* Call win32k for this as a callproc handle may need + to be created */ + return NtUserGetWindowLong(hWnd, nIndex, TRUE); + + default: + SetLastError(ERROR_INVALID_PARAMETER); + return 0; + } + } } @@ -340,7 +382,49 @@ STDCALL GetWindowLongW(HWND hWnd, int nIndex) { - return NtUserGetWindowLong(hWnd, nIndex, FALSE); + PWINDOW Wnd; + + Wnd = ValidateHwnd(hWnd); + if (Wnd == NULL) + return 0; + + if (nIndex >= 0) + { + if ((DWORD)nIndex + sizeof(LONG) > Wnd->ExtraDataSize) + { + SetLastError(ERROR_INVALID_PARAMETER); + return 0; + } + + return *((LONG *)((PCHAR)(Wnd + 1) + nIndex)); + } + else + { + switch (nIndex) + { + case GWL_EXSTYLE: + return Wnd->ExStyle; + case GWL_STYLE: + return Wnd->Style; + case GWL_HINSTANCE: + return (LONG)Wnd->Instance; + case GWL_ID: + return Wnd->IDMenu; + case GWL_USERDATA: + return Wnd->UserData; + + case GWL_HWNDPARENT: + /* FIXME: Implement in user32 */ + case GWL_WNDPROC: + /* Call win32k for this as a callproc handle may need + to be created */ + return NtUserGetWindowLong(hWnd, nIndex, FALSE); + + default: + SetLastError(ERROR_INVALID_PARAMETER); + return 0; + } + } } /* @@ -350,7 +434,7 @@ STDCALL GetWindowWord(HWND hWnd, int nIndex) { - return (WORD)NtUserGetWindowLong(hWnd, nIndex, TRUE); + return (WORD)GetWindowLongW(hWnd, nIndex); } /* Modified: trunk/reactos/dll/win32/user32/windows/window.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/w…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/window.c (original) +++ trunk/reactos/dll/win32/user32/windows/window.c Fri Nov 16 01:08:13 2007 @@ -1168,7 +1168,14 @@ BOOL STDCALL IsIconic(HWND hWnd) { - return (NtUserGetWindowLong( hWnd, GWL_STYLE, FALSE) & WS_MINIMIZE) != 0; + PWINDOW Wnd = ValidateHwnd(hWnd); + + if (Wnd != NULL) + { + return (Wnd->Style & WS_MINIMIZE) != 0; + } + + return FALSE; } @@ -1199,15 +1206,17 @@ BOOL STDCALL IsWindowVisible(HWND hWnd) { - while (NtUserGetWindowLong(hWnd, GWL_STYLE, FALSE) & WS_CHILD) - { - if (!(NtUserGetWindowLong(hWnd, GWL_STYLE, FALSE) & WS_VISIBLE)) - { - return(FALSE); - } - hWnd = GetAncestor(hWnd, GA_PARENT); - } - return(NtUserGetWindowLong(hWnd, GWL_STYLE, FALSE) & WS_VISIBLE); + DWORD Style; + + while ((Style = GetWindowLongW(hWnd, GWL_STYLE)) & WS_CHILD) + { + if (!(Style & WS_VISIBLE)) + return FALSE; + + hWnd = GetAncestor(hWnd, GA_PARENT); + } + + return (GetWindowLongW(hWnd, GWL_STYLE) & WS_VISIBLE) != 0; } @@ -1223,7 +1232,7 @@ // disabled. I think they stop processing messages but stay appearing // as enabled. - return (! (NtUserGetWindowLong(hWnd, GWL_STYLE, FALSE) & WS_DISABLED)); + return !(GetWindowLongW(hWnd, GWL_STYLE) & WS_DISABLED); } @@ -1233,7 +1242,7 @@ BOOL STDCALL IsZoomed(HWND hWnd) { - return NtUserGetWindowLong(hWnd, GWL_STYLE, FALSE) & WS_MAXIMIZE; + return (GetWindowLongW(hWnd, GWL_STYLE) & WS_MAXIMIZE) != 0; } @@ -1299,10 +1308,8 @@ BOOL STDCALL OpenIcon(HWND hWnd) { - if (!(NtUserGetWindowLong(hWnd, GWL_STYLE, FALSE) & WS_MINIMIZE)) - { + if (!(GetWindowLongW(hWnd, GWL_STYLE) & WS_MINIMIZE)) return FALSE; - } ShowWindow(hWnd,SW_RESTORE); return TRUE; Modified: trunk/reactos/include/reactos/win32k/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntuser.h (original) +++ trunk/reactos/include/reactos/win32k/ntuser.h Fri Nov 16 01:08:13 2007 @@ -66,6 +66,17 @@ struct _W32THREADINFO *ti; RECT WindowRect; RECT ClientRect; + /* Size of the extra data associated with the window. */ + ULONG ExtraDataSize; + /* Style. */ + DWORD Style; + /* Extended style. */ + DWORD ExStyle; + /* Handle of the module that created the window. */ + HINSTANCE Instance; + /* Window menu handle or window id */ + UINT IDMenu; + LONG UserData; } WINDOW, *PWINDOW; typedef struct _W32PROCESSINFO Modified: trunk/reactos/subsystems/win32/win32k/include/window.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/window.h (original) +++ trunk/reactos/subsystems/win32/win32k/include/window.h Fri Nov 16 01:08:13 2007 @@ -47,30 +47,18 @@ BOOL IsSystem; /* Pointer to the window class. */ PWINDOWCLASS Class; - /* Extended style. */ - DWORD ExStyle; /* Window name. */ UNICODE_STRING WindowName; - /* Style. */ - DWORD Style; /* Context help id */ DWORD ContextHelpId; /* system menu handle. */ HMENU SystemMenu; - /* Handle of the module that created the window. */ - HINSTANCE Instance; /* Entry in the thread's list of windows. */ LIST_ENTRY ListEntry; - /* Pointer to the extra data associated with the window. */ - PCHAR ExtraData; - /* Size of the extra data associated with the window. */ - ULONG ExtraDataSize; /* Handle for the window. */ HWND hSelf; /* Window flags. */ ULONG Flags; - /* Window menu handle or window id */ - UINT IDMenu; /* Handle of region of the window to be updated. */ HANDLE UpdateRegion; /* Handle of the window region. */ @@ -94,7 +82,6 @@ ULONG PropListItems; /* Scrollbar info */ PWINDOW_SCROLLINFO Scroll; - LONG UserData; BOOL Unicode; WNDPROC WndProc; PETHREAD OwnerThread; Modified: trunk/reactos/subsystems/win32/win32k/include/winpos.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/winpos.h (original) +++ trunk/reactos/subsystems/win32/win32k/include/winpos.h Fri Nov 16 01:08:13 2007 @@ -10,7 +10,7 @@ (x) < (WndObject)->Wnd->WindowRect.right && \ (y) >= (WndObject)->Wnd->WindowRect.top && \ (y) < (WndObject)->Wnd->WindowRect.bottom && \ - (!(WndObject)->WindowRegion || ((WndObject)->Style & WS_MINIMIZE) || \ + (!(WndObject)->WindowRegion || ((WndObject)->Wnd->Style & WS_MINIMIZE) || \ NtGdiPtInRegion((WndObject)->WindowRegion, (INT)((x) - (WndObject)->Wnd->WindowRect.left), \ (INT)((y) - (WndObject)->Wnd->WindowRect.top)))) Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c Fri Nov 16 01:08:13 2007 @@ -653,13 +653,15 @@ #else PWINDOW_OBJECT DesktopWindow; + PWINDOW DesktopWnd; DesktopWindow = IntGetWindowObject(Desktop->DesktopWindow); if (! DesktopWindow) { return ERROR_INVALID_WINDOW_HANDLE; } - DesktopWindow->Style &= ~WS_VISIBLE; + DesktopWnd = DesktopWindow->Wnd; + DesktopWnd->Style &= ~WS_VISIBLE; return STATUS_SUCCESS; #endif Modified: trunk/reactos/subsystems/win32/win32k/ntuser/focus.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/focus.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/focus.c Fri Nov 16 01:08:13 2007 @@ -147,19 +147,22 @@ HWND hWndFocus = FocusWindow->hSelf; HWND hWndFocusPrev = NULL; PUSER_MESSAGE_QUEUE PrevForegroundQueue; + PWINDOW Wnd; ASSERT_REFS_CO(Window); DPRINT("IntSetForegroundAndFocusWindow(%x, %x, %s)\n", hWnd, hWndFocus, MouseActivate ? "TRUE" : "FALSE"); DPRINT("(%wZ)\n", &Window->WindowName); - if ((Window->Style & (WS_CHILD | WS_POPUP)) == WS_CHILD) + Wnd = Window->Wnd; + + if ((Wnd->Style & (WS_CHILD | WS_POPUP)) == WS_CHILD) { DPRINT("Failed - Child\n"); return FALSE; } - if (0 == (Window->Style & WS_VISIBLE) && + if (0 == (Wnd->Style & WS_VISIBLE) && Window->OwnerThread->ThreadsProcess != CsrProcess) { DPRINT("Failed - Invisible\n"); @@ -223,10 +226,12 @@ HWND Top; PWINDOW_OBJECT TopWindow; USER_REFERENCE_ENTRY Ref; + PWINDOW Wnd; ASSERT_REFS_CO(Window); - if(Window->Style & WS_DISABLED) + Wnd = Window->Wnd; + if(Wnd->Style & WS_DISABLED) { BOOL Ret; PWINDOW_OBJECT TopWnd; @@ -266,6 +271,7 @@ PUSER_MESSAGE_QUEUE ThreadQueue; HWND hWndPrev; HWND hWnd = 0; + PWINDOW Wnd; if (Window) ASSERT_REFS_CO(Window); @@ -275,9 +281,10 @@ if (Window != 0) { - if ((!(Window->Style & WS_VISIBLE) && + Wnd = Window->Wnd; + if ((!(Wnd->Style & WS_VISIBLE) && Window->OwnerThread->ThreadsProcess != CsrProcess) || - (Window->Style & (WS_POPUP | WS_CHILD)) == WS_CHILD) + (Wnd->Style & (WS_POPUP | WS_CHILD)) == WS_CHILD) { return ThreadQueue ? 0 : ThreadQueue->ActiveWindow; } @@ -521,12 +528,14 @@ HWND hWndPrev; PWINDOW_OBJECT TopWnd; USER_REFERENCE_ENTRY Ref; + PWINDOW Wnd; ASSERT_REFS_CO(Window); ThreadQueue = (PUSER_MESSAGE_QUEUE)PsGetCurrentThreadWin32Thread()->MessageQueue; - if (Window->Style & (WS_MINIMIZE | WS_DISABLED)) + Wnd = Window->Wnd; + if (Wnd->Style & (WS_MINIMIZE | WS_DISABLED)) { return( (ThreadQueue ? ThreadQueue->FocusWindow : 0)); } Modified: trunk/reactos/subsystems/win32/win32k/ntuser/menu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/menu.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/menu.c Fri Nov 16 01:08:13 2007 @@ -314,7 +314,7 @@ Window = UserGetWindowObject(Menu->MenuInfo.Wnd); if (Window) { - Window->IDMenu = 0; + Window->Wnd->IDMenu = 0; } } ObmDeleteObject(Menu->MenuInfo.Self, otMenu); @@ -1735,7 +1735,7 @@ RETURN(FALSE); } - hMenu = (HMENU)WindowObject->IDMenu; + hMenu = (HMENU)WindowObject->Wnd->IDMenu; if (!(MenuObject = UserGetMenuObject(hMenu))) { @@ -2023,7 +2023,7 @@ RETURN(FALSE); } - if(Window->IDMenu == (UINT)hMenu) + if(Window->Wnd->IDMenu == (UINT)hMenu) { RETURN( IntHiliteMenuItem(Window, Menu, uItemHilite, uHilite)); } Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c Fri Nov 16 01:08:13 2007 @@ -268,7 +268,7 @@ RETURN( FALSE); } - Result = (DWORD)Window->IDMenu; + Result = (DWORD)Window->Wnd->IDMenu; RETURN( Result); } @@ -346,7 +346,7 @@ RETURN( FALSE); } - Result = (DWORD)Window->Instance; + Result = (DWORD)Window->Wnd->Instance; RETURN( Result); } @@ -789,6 +789,7 @@ { BOOL Ret = 0; PWINDOW_OBJECT Window; + PWINDOW Wnd; USER_REFERENCE_ENTRY Ref; DECLARE_RETURN(BOOLEAN); @@ -800,6 +801,8 @@ RETURN( FALSE); } UserRefObjectCo(Window, &Ref); + + Wnd = Window->Wnd; /* FIXME: Routine can be 0x53 - 0x5E */ switch (Routine) @@ -813,10 +816,10 @@ PMENU_OBJECT Menu; DPRINT("HWNDLOCK_ROUTINE_DRAWMENUBAR\n"); Ret = FALSE; - if (!((Window->Style & (WS_CHILD | WS_POPUP)) != WS_CHILD)) + if (!((Wnd->Style & (WS_CHILD | WS_POPUP)) != WS_CHILD)) break; - if(!(Menu = UserGetMenuObject((HMENU) Window->IDMenu))) + if(!(Menu = UserGetMenuObject((HMENU) Wnd->IDMenu))) break; Menu->MenuInfo.WndOwner = hWnd; Modified: trunk/reactos/subsystems/win32/win32k/ntuser/painting.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/painting.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/painting.c Fri Nov 16 01:08:13 2007 @@ -58,17 +58,19 @@ IntIntersectWithParents(PWINDOW_OBJECT Child, PRECT WindowRect) { PWINDOW_OBJECT ParentWindow; + PWINDOW ParentWnd; ParentWindow = Child->Parent; while (ParentWindow != NULL) { - if (!(ParentWindow->Style & WS_VISIBLE) || - (ParentWindow->Style & WS_MINIMIZE)) + ParentWnd = ParentWindow->Wnd; + if (!(ParentWnd->Style & WS_VISIBLE) || + (ParentWnd->Style & WS_MINIMIZE)) { return FALSE; } - if (!IntGdiIntersectRect(WindowRect, WindowRect, &ParentWindow->Wnd->ClientRect)) + if (!IntGdiIntersectRect(WindowRect, WindowRect, &ParentWnd->ClientRect)) { return FALSE; } @@ -85,10 +87,12 @@ IntValidateParent(PWINDOW_OBJECT Child, HRGN hValidateRgn, BOOL Recurse) { PWINDOW_OBJECT ParentWindow = Child->Parent; + PWINDOW ParentWnd; while (ParentWindow) { - if (ParentWindow->Style & WS_CLIPCHILDREN) + ParentWnd = ParentWindow->Wnd; + if (ParentWnd->Style & WS_CLIPCHILDREN) break; if (ParentWindow->UpdateRegion != 0) @@ -115,23 +119,25 @@ HRGN FASTCALL IntCalcWindowRgn(PWINDOW_OBJECT Window, BOOL Client) { + PWINDOW Wnd; HRGN hRgnWindow; UINT RgnType; + Wnd = Window->Wnd; if (Client) - hRgnWindow = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->ClientRect); + hRgnWindow = UnsafeIntCreateRectRgnIndirect(&Wnd->ClientRect); else - hRgnWindow = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->WindowRect); - - if (Window->WindowRegion != NULL && !(Window->Style & WS_MINIMIZE)) + hRgnWindow = UnsafeIntCreateRectRgnIndirect(&Wnd->WindowRect); + + if (Window->WindowRegion != NULL && !(Wnd->Style & WS_MINIMIZE)) { NtGdiOffsetRgn(hRgnWindow, - -Window->Wnd->WindowRect.left, - -Window->Wnd->WindowRect.top); + -Wnd->WindowRect.left, + -Wnd->WindowRect.top); RgnType = NtGdiCombineRgn(hRgnWindow, hRgnWindow, Window->WindowRegion, RGN_AND); NtGdiOffsetRgn(hRgnWindow, - Window->Wnd->WindowRect.left, - Window->Wnd->WindowRect.top); + Wnd->WindowRect.left, + Wnd->WindowRect.top); } return hRgnWindow; @@ -235,6 +241,9 @@ HDC hDC; HWND hWnd = Window->hSelf; HRGN TempRegion; + PWINDOW Wnd; + + Wnd = Window->Wnd; if (Flags & (RDW_ERASENOW | RDW_UPDATENOW)) { @@ -295,8 +304,8 @@ /* * Paint child windows. */ - if (!(Flags & RDW_NOCHILDREN) && !(Window->Style & WS_MINIMIZE) && - ((Flags & RDW_ALLCHILDREN) || !(Window->Style & WS_CLIPCHILDREN))) + if (!(Flags & RDW_NOCHILDREN) && !(Wnd->Style & WS_MINIMIZE) && + ((Flags & RDW_ALLCHILDREN) || !(Wnd->Style & WS_CLIPCHILDREN))) { HWND *List, *phWnd; @@ -306,7 +315,8 @@ for (phWnd = List; *phWnd; ++phWnd) { Window = UserGetWindowObject(*phWnd); - if (Window && (Window->Style & WS_VISIBLE)) + Wnd = Window->Wnd; + if (Window && (Wnd->Style & WS_VISIBLE)) { USER_REFERENCE_ENTRY Ref; UserRefObjectCo(Window, &Ref); @@ -329,8 +339,11 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags) { INT RgnType; + PWINDOW Wnd; BOOL HadPaintMessage, HadNCPaintMessage; BOOL HasPaintMessage, HasNCPaintMessage; + + Wnd = Window->Wnd; /* * If the nonclient is not to be redrawn, clip the region to the client @@ -349,7 +362,7 @@ * Clip the given region with window rectangle (or region) */ - if (!Window->WindowRegion || (Window->Style & WS_MINIMIZE)) + if (!Window->WindowRegion || (Wnd->Style & WS_MINIMIZE)) { HRGN hRgnWindow; @@ -360,12 +373,12 @@ else { NtGdiOffsetRgn(hRgn, - -Window->Wnd->WindowRect.left, - -Window->Wnd->WindowRect.top); + -Wnd->WindowRect.left, + -Wnd->WindowRect.top); RgnType = NtGdiCombineRgn(hRgn, hRgn, Window->WindowRegion, RGN_AND); NtGdiOffsetRgn(hRgn, - Window->Wnd->WindowRect.left, - Window->Wnd->WindowRect.top); + Wnd->WindowRect.left, + Wnd->WindowRect.top); } /* @@ -439,14 +452,14 @@ * Process children if needed */ - if (!(Flags & RDW_NOCHILDREN) && !(Window->Style & WS_MINIMIZE) && - ((Flags & RDW_ALLCHILDREN) || !(Window->Style & WS_CLIPCHILDREN))) + if (!(Flags & RDW_NOCHILDREN) && !(Wnd->Style & WS_MINIMIZE) && + ((Flags & RDW_ALLCHILDREN) || !(Wnd->Style & WS_CLIPCHILDREN))) { PWINDOW_OBJECT Child; for (Child = Window->FirstChild; Child; Child = Child->NextSibling) { - if (Child->Style & WS_VISIBLE) + if (Child->Wnd->Style & WS_VISIBLE) { /* * Recursive call to update children UpdateRegion @@ -497,12 +510,14 @@ BOOL FASTCALL IntIsWindowDrawable(PWINDOW_OBJECT Window) { - PWINDOW_OBJECT Wnd; - - for (Wnd = Window; Wnd != NULL; Wnd = Wnd->Parent) - { + PWINDOW_OBJECT WndObject; + PWINDOW Wnd; + + for (WndObject = Window; WndObject != NULL; WndObject = WndObject->Parent) + { + Wnd = WndObject->Wnd; if (!(Wnd->Style & WS_VISIBLE) || - ((Wnd->Style & WS_MINIMIZE) && (Wnd != Window))) + ((Wnd->Style & WS_MINIMIZE) && (WndObject != Window))) { return FALSE; } @@ -613,7 +628,8 @@ BOOL FASTCALL IntIsWindowDirty(PWINDOW_OBJECT Window) { - return (Window->Style & WS_VISIBLE) && + PWINDOW Wnd = Window->Wnd; + return (Wnd->Style & WS_VISIBLE) && ((Window->UpdateRegion != NULL) || (Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT) || (Window->Flags & WINDOWOBJECT_NEED_NCPAINT)); @@ -624,19 +640,22 @@ { HWND hChild; PWINDOW_OBJECT TempWindow; + PWINDOW Wnd, TempWnd; for (; Window != NULL; Window = Window->NextSibling) { + Wnd = Window->Wnd; if (IntWndBelongsToThread(Window, Thread) && IntIsWindowDirty(Window)) { /* Make sure all non-transparent siblings are already drawn. */ - if (Window->ExStyle & WS_EX_TRANSPARENT) + if (Wnd->ExStyle & WS_EX_TRANSPARENT) { for (TempWindow = Window->NextSibling; TempWindow != NULL; TempWindow = TempWindow->NextSibling) { - if (!(TempWindow->ExStyle & WS_EX_TRANSPARENT) && + TempWnd = TempWindow->Wnd; + if (!(TempWnd->ExStyle & WS_EX_TRANSPARENT) && IntWndBelongsToThread(TempWindow, Thread) && IntIsWindowDirty(TempWindow)) { @@ -753,6 +772,7 @@ NTSTATUS Status; DECLARE_RETURN(HDC); USER_REFERENCE_ENTRY Ref; + PWINDOW Wnd; DPRINT("Enter NtUserBeginPaint\n"); UserEnterExclusive(); @@ -763,6 +783,8 @@ } UserRefObjectCo(Window, &Ref); + + Wnd = Window->Wnd; co_UserHideCaret(Window); @@ -834,7 +856,7 @@ } if (Window->UpdateRegion) { - if (!(Window->Style & WS_CLIPCHILDREN)) + if (!(Wnd->Style & WS_CLIPCHILDREN)) { PWINDOW_OBJECT Child; for (Child = Window->FirstChild; Child; Child = Child->NextSibling) @@ -1616,8 +1638,12 @@ RECT r = *lpRc; LONG ButtonWidth, IconWidth; BOOL HasIcon; + PWINDOW Wnd = NULL; //ASSERT(pWnd != NULL); + + if (pWnd) + Wnd = pWnd->Wnd; hMemBmp = NtGdiCreateCompatibleBitmap(hDc, lpRc->right - lpRc->left, @@ -1647,11 +1673,11 @@ VCenter = (lpRc->bottom - lpRc->top) / 2; Padding = VCenter - (Height / 2); - if ((!hIcon) && (pWnd != NULL)) - { - HasIcon = (uFlags & DC_ICON) && (pWnd->Style & WS_SYSMENU) - && !(uFlags & DC_SMALLCAP) && !(pWnd->ExStyle & WS_EX_DLGMODALFRAME) - && !(pWnd->ExStyle & WS_EX_TOOLWINDOW); + if ((!hIcon) && (Wnd != NULL)) + { + HasIcon = (uFlags & DC_ICON) && (Wnd->Style & WS_SYSMENU) + && !(uFlags & DC_SMALLCAP) && !(Wnd->ExStyle & WS_EX_DLGMODALFRAME) + && !(Wnd->ExStyle & WS_EX_TOOLWINDOW); } else HasIcon = (BOOL) hIcon; @@ -1727,14 +1753,14 @@ COLORREF Colors[2]; PDC pMemDc; - if (pWnd != NULL) + if (Wnd != NULL) { - if(pWnd->Style & WS_SYSMENU) + if(Wnd->Style & WS_SYSMENU) { r.right -= 3 + ButtonWidth; if(!(uFlags & DC_SMALLCAP)) { - if(pWnd->Style & (WS_MAXIMIZEBOX | WS_MINIMIZEBOX)) + if(Wnd->Style & (WS_MAXIMIZEBOX | WS_MINIMIZEBOX)) r.right -= 2 + 2 * ButtonWidth; else r.right -= 2; r.right -= 2; @@ -1821,12 +1847,12 @@ ButtonWidth = UserGetSystemMetrics(SM_CXSMSIZE) - 2; else ButtonWidth = UserGetSystemMetrics(SM_CXSIZE) - 2; - if ((pWnd != NULL) && (pWnd->Style & WS_SYSMENU)) + if ((Wnd != NULL) && (Wnd->Style & WS_SYSMENU)) { r.right -= 3 + ButtonWidth; if(! (uFlags & DC_SMALLCAP)) { - if(pWnd->Style & (WS_MAXIMIZEBOX | WS_MINIMIZEBOX)) + if(Wnd->Style & (WS_MAXIMIZEBOX | WS_MINIMIZEBOX)) r.right -= 2 + 2 * ButtonWidth; else r.right -= 2; r.right -= 2; Modified: trunk/reactos/subsystems/win32/win32k/ntuser/scrollbar.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/scrollbar.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/scrollbar.c Fri Nov 16 01:08:13 2007 @@ -60,6 +60,7 @@ IntGetScrollBarRect (PWINDOW_OBJECT Window, INT nBar, PRECT lprect) { BOOL vertical; + PWINDOW Wnd = Window->Wnd; RECT ClientRect = Window->Wnd->ClientRect; RECT WindowRect = Window->Wnd->WindowRect; @@ -74,7 +75,7 @@ break; case SB_VERT: - if(Window->ExStyle & WS_EX_LEFTSCROLLBAR) + if(Wnd->ExStyle & WS_EX_LEFTSCROLLBAR) { lprect->right = ClientRect.left - WindowRect.left; lprect->left = lprect->right - UserGetSystemMetrics(SM_CXVSCROLL); @@ -91,7 +92,7 @@ case SB_CTL: IntGetClientRect (Window, lprect); - vertical = ((Window->Style & SBS_VERT) != 0); + vertical = ((Wnd->Style & SBS_VERT) != 0); break; default: @@ -104,6 +105,7 @@ BOOL FASTCALL IntCalculateThumb(PWINDOW_OBJECT Window, LONG idObject, PSCROLLBARINFO psbi, LPSCROLLINFO psi) { + PWINDOW Wnd = Window->Wnd; INT Thumb, ThumbBox, ThumbPos, cxy, mx; RECT ClientRect; @@ -119,7 +121,7 @@ break; case SB_CTL: IntGetClientRect (Window, &ClientRect); - if(Window->Style & SBS_VERT) + if(Wnd->Style & SBS_VERT) { Thumb = UserGetSystemMetrics(SM_CYVSCROLL); cxy = ClientRect.bottom - ClientRect.top; @@ -831,8 +833,11 @@ co_UserShowScrollBar(PWINDOW_OBJECT Window, int wBar, DWORD bShow) { DWORD Style, OldStyle; + PWINDOW Wnd; ASSERT_REFS_CO(Window); + + Wnd = Window->Wnd; switch(wBar) { @@ -866,20 +871,20 @@ return( TRUE); } - OldStyle = Window->Style; + OldStyle = Wnd->Style; if(bShow) - Window->Style |= Style; + Wnd->Style |= Style; else - Window->Style &= ~Style; - - if(Window->Style != OldStyle) - { - if(Window->Style & WS_HSCROLL) + Wnd->Style &= ~Style; + + if(Wnd->Style != OldStyle) + { + if(Wnd->Style & WS_HSCROLL) IntUpdateSBInfo(Window, SB_HORZ); - if(Window->Style & WS_VSCROLL) + if(Wnd->Style & WS_VSCROLL) IntUpdateSBInfo(Window, SB_VERT); - if(Window->Style & WS_VISIBLE) + if(Wnd->Style & WS_VISIBLE) { /* Frame has been changed, let the window redraw itself */ co_WinPosSetWindowPos(Window, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | Modified: trunk/reactos/subsystems/win32/win32k/ntuser/vis.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/vis.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/vis.c Fri Nov 16 01:08:13 2007 @@ -39,8 +39,11 @@ { HRGN VisRgn, ClipRgn; PWINDOW_OBJECT PreviousWindow, CurrentWindow, CurrentSibling; + PWINDOW Wnd, CurrentWnd, PreviousWnd, CurrentSiblingWnd; - if (!(Window->Style & WS_VISIBLE)) + Wnd = Window->Wnd; + + if (!(Wnd->Style & WS_VISIBLE)) { return NULL; } @@ -61,35 +64,38 @@ */ PreviousWindow = Window; + PreviousWnd = PreviousWindow->Wnd; CurrentWindow = Window->Parent; while (CurrentWindow) { - if (!(CurrentWindow->Style & WS_VISIBLE)) + CurrentWnd = CurrentWindow->Wnd; + if (!(CurrentWnd->Style & WS_VISIBLE)) { NtGdiDeleteObject(VisRgn); return NULL; } - ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentWindow->Wnd->ClientRect); + ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentWnd->ClientRect); NtGdiCombineRgn(VisRgn, VisRgn, ClipRgn, RGN_AND); NtGdiDeleteObject(ClipRgn); - if ((PreviousWindow->Style & WS_CLIPSIBLINGS) || - (PreviousWindow == Window && ClipSiblings)) + if ((PreviousWnd->Style & WS_CLIPSIBLINGS) || + (PreviousWnd == Wnd && ClipSiblings)) { CurrentSibling = CurrentWindow->FirstChild; while (CurrentSibling != NULL && CurrentSibling != PreviousWindow) { - if ((CurrentSibling->Style & WS_VISIBLE) && - !(CurrentSibling->ExStyle & WS_EX_TRANSPARENT)) + CurrentSiblingWnd = CurrentSibling->Wnd; + if ((CurrentSiblingWnd->Style & WS_VISIBLE) && + !(CurrentSiblingWnd->ExStyle & WS_EX_TRANSPARENT)) { - ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentSibling->Wnd->WindowRect); + ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentSiblingWnd->WindowRect); /* Combine it with the window region if available */ - if (CurrentSibling->WindowRegion && !(CurrentSibling->Style & WS_MINIMIZE)) + if (CurrentSibling->WindowRegion && !(CurrentSiblingWnd->Style & WS_MINIMIZE)) { - NtGdiOffsetRgn(ClipRgn, -CurrentSibling->Wnd->WindowRect.left, -CurrentSibling->Wnd->WindowRect.top); + NtGdiOffsetRgn(ClipRgn, -CurrentSiblingWnd->WindowRect.left, -CurrentSiblingWnd->WindowRect.top); NtGdiCombineRgn(ClipRgn, ClipRgn, CurrentSibling->WindowRegion, RGN_AND); - NtGdiOffsetRgn(ClipRgn, CurrentSibling->Wnd->WindowRect.left, CurrentSibling->Wnd->WindowRect.top); + NtGdiOffsetRgn(ClipRgn, CurrentSiblingWnd->WindowRect.left, CurrentSiblingWnd->WindowRect.top); } NtGdiCombineRgn(VisRgn, VisRgn, ClipRgn, RGN_DIFF); NtGdiDeleteObject(ClipRgn); @@ -99,6 +105,7 @@ } PreviousWindow = CurrentWindow; + PreviousWnd = PreviousWindow->Wnd; CurrentWindow = CurrentWindow->Parent; } @@ -107,16 +114,17 @@ CurrentWindow = Window->FirstChild; while (CurrentWindow) { - if ((CurrentWindow->Style & WS_VISIBLE) && - !(CurrentWindow->ExStyle & WS_EX_TRANSPARENT)) + CurrentWnd = CurrentWindow->Wnd; + if ((CurrentWnd->Style & WS_VISIBLE) && + !(CurrentWnd->ExStyle & WS_EX_TRANSPARENT)) { - ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentWindow->Wnd->WindowRect); + ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentWnd->WindowRect); /* Combine it with the window region if available */ - if (CurrentWindow->WindowRegion && !(CurrentWindow->Style & WS_MINIMIZE)) + if (CurrentWindow->WindowRegion && !(CurrentWnd->Style & WS_MINIMIZE)) { - NtGdiOffsetRgn(ClipRgn, -CurrentWindow->Wnd->WindowRect.left, -CurrentWindow->Wnd->WindowRect.top); + NtGdiOffsetRgn(ClipRgn, -CurrentWnd->WindowRect.left, -CurrentWnd->WindowRect.top); NtGdiCombineRgn(ClipRgn, ClipRgn, CurrentWindow->WindowRegion, RGN_AND); - NtGdiOffsetRgn(ClipRgn, CurrentWindow->Wnd->WindowRect.left, CurrentWindow->Wnd->WindowRect.top); + NtGdiOffsetRgn(ClipRgn, CurrentWnd->WindowRect.left, CurrentWnd->WindowRect.top); } NtGdiCombineRgn(VisRgn, VisRgn, ClipRgn, RGN_DIFF); NtGdiDeleteObject(ClipRgn); @@ -125,11 +133,11 @@ } } - if (Window->WindowRegion && !(Window->Style & WS_MINIMIZE)) + if (Window->WindowRegion && !(Wnd->Style & WS_MINIMIZE)) { - NtGdiOffsetRgn(VisRgn, -Window->Wnd->WindowRect.left, -Window->Wnd->WindowRect.top); + NtGdiOffsetRgn(VisRgn, -Wnd->WindowRect.left, -Wnd->WindowRect.top); NtGdiCombineRgn(VisRgn, VisRgn, Window->WindowRegion, RGN_AND); - NtGdiOffsetRgn(VisRgn, Window->Wnd->WindowRect.left, Window->Wnd->WindowRect.top); + NtGdiOffsetRgn(VisRgn, Wnd->WindowRect.left, Wnd->WindowRect.top); } return VisRgn; @@ -143,8 +151,11 @@ HRGN Temp; PWINDOW_OBJECT Parent; USER_REFERENCE_ENTRY Ref; + PWINDOW Wnd, ParentWnd; ASSERT_REFS_CO(Window); + + Wnd = Window->Wnd; Temp = NtGdiCreateRectRgn(0, 0, 0, 0); NtGdiCombineRgn(Temp, NewlyExposed, NULL, RGN_COPY); @@ -152,9 +163,10 @@ Parent = Window->Parent; if(Parent) { + ParentWnd = Parent->Wnd; NtGdiOffsetRgn(Temp, - Window->Wnd->WindowRect.left - Parent->Wnd->ClientRect.left, - Window->Wnd->WindowRect.top - Parent->Wnd->ClientRect.top); + Wnd->WindowRect.left - ParentWnd->ClientRect.left, + Wnd->WindowRect.top - ParentWnd->ClientRect.top); UserRefObjectCo(Parent, &Ref); co_UserRedrawWindow(Parent, NULL, Temp, Modified: trunk/reactos/subsystems/win32/win32k/ntuser/windc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/windc.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/windc.c Fri Nov 16 01:08:13 2007 @@ -115,6 +115,10 @@ DceAllocDCE(PWINDOW_OBJECT Window OPTIONAL, DCE_TYPE Type) { PDCE pDce; + PWINDOW Wnd = NULL; + + if (Window) + Wnd = Window->Wnd; pDce = ExAllocatePoolWithTag(PagedPool, sizeof(DCE), TAG_PDCE); if(!pDce) @@ -162,13 +166,13 @@ { pDce->DCXFlags = DCX_DCEBUSY; - if (Window) + if (Wnd) { - if (Window->Style & WS_CLIPCHILDREN) + if (Wnd->Style & WS_CLIPCHILDREN) { pDce->DCXFlags |= DCX_CLIPCHILDREN; } - if (Window->Style & WS_CLIPSIBLINGS) + if (Wnd->Style & WS_CLIPSIBLINGS) { pDce->DCXFlags |= DCX_CLIPSIBLINGS; } @@ -186,6 +190,7 @@ DceSetDrawable(PWINDOW_OBJECT Window OPTIONAL, HDC hDC, ULONG Flags, BOOL SetClipOrigin) { + PWINDOW Wnd; DC *dc = DC_LockDc(hDC); if(!dc) return; @@ -197,15 +202,16 @@ } else { + Wnd = Window->Wnd; if (Flags & DCX_WINDOW) { - dc->w.DCOrgX = Window->Wnd->WindowRect.left; - dc->w.DCOrgY = Window->Wnd->WindowRect.top; + dc->w.DCOrgX = Wnd->WindowRect.left; + dc->w.DCOrgY = Wnd->WindowRect.top; } else { - dc->w.DCOrgX = Window->Wnd->ClientRect.left; - dc->w.DCOrgY = Window->Wnd->ClientRect.top; + dc->w.DCOrgX = Wnd->ClientRect.left; + dc->w.DCOrgY = Wnd->ClientRect.top; } } DC_UnlockDc(dc); @@ -287,6 +293,7 @@ if (Flags & DCX_PARENTCLIP) { PWINDOW_OBJECT Parent; + PWINDOW ParentWnd; Parent = Window->Parent; if(!Parent) @@ -295,7 +302,9 @@ goto noparent; } - if (Parent->Style & WS_CLIPSIBLINGS) + ParentWnd = Parent->Wnd; + + if (ParentWnd->Style & WS_CLIPSIBLINGS) { DcxFlags = DCX_CLIPSIBLINGS | (Flags & ~(DCX_CLIPCHILDREN | DCX_WINDOW)); @@ -367,11 +376,14 @@ DCE* Dce; BOOL UpdateVisRgn = TRUE; BOOL UpdateClipOrigin = FALSE; + PWINDOW Wnd = NULL; if (NULL == Window) { Flags &= ~DCX_USESTYLE; } + else + Wnd = Window->Wnd; if (NULL == Window || NULL == Window->Dce) { @@ -382,7 +394,7 @@ { Flags &= ~(DCX_CLIPCHILDREN | DCX_CLIPSIBLINGS | DCX_PARENTCLIP); - if (Window->Style & WS_CLIPSIBLINGS) + if (Wnd->Style & WS_CLIPSIBLINGS) { Flags |= DCX_CLIPSIBLINGS; } @@ -394,8 +406,8 @@ Flags |= DCX_PARENTCLIP; } - if (Window->Style & WS_CLIPCHILDREN && - !(Window->Style & WS_MINIMIZE)) + if (Wnd->Style & WS_CLIPCHILDREN && + !(Wnd->Style & WS_MINIMIZE)) { Flags |= DCX_CLIPCHILDREN; } @@ -419,18 +431,18 @@ Parent = (Window ? Window->Parent : NULL); - if (NULL == Window || !(Window->Style & WS_CHILD) || NULL == Parent) + if (NULL == Window || !(Wnd->Style & WS_CHILD) || NULL == Parent) { Flags &= ~DCX_PARENTCLIP; } else if (Flags & DCX_PARENTCLIP) { Flags |= DCX_CACHE; - if ((Window->Style & WS_VISIBLE) && - (Parent->Style & WS_VISIBLE)) + if ((Wnd->Style & WS_VISIBLE) && + (Parent->Wnd->Style & WS_VISIBLE)) { Flags &= ~DCX_CLIPCHILDREN; - if (Parent->Style & WS_CLIPSIBLINGS) + if (Parent->Wnd->Style & WS_CLIPSIBLINGS) { Flags |= DCX_CLIPSIBLINGS; } Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/window.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c Fri Nov 16 01:08:13 2007 @@ -155,11 +155,11 @@ PWINDOW_OBJECT FASTCALL IntGetParent(PWINDOW_OBJECT Wnd) { - if (Wnd->Style & WS_POPUP) + if (Wnd->Wnd->Style & WS_POPUP) { return UserGetWindowObject(Wnd->hOwner); } - else if (Wnd->Style & WS_CHILD) + else if (Wnd->Wnd->Style & WS_CHILD) { return Wnd->Parent; } @@ -326,8 +326,11 @@ PWINDOW_OBJECT Child; PMENU_OBJECT Menu; BOOLEAN BelongsToThreadData; + PWINDOW Wnd; ASSERT(Window); + + Wnd = Window->Wnd; if(Window->Status & WINDOWSTATUS_DESTROYING) { @@ -335,7 +338,7 @@ return 0; } Window->Status |= WINDOWSTATUS_DESTROYING; - Window->Style &= ~WS_VISIBLE; + Wnd->Style &= ~WS_VISIBLE; /* remove the window already at this point from the thread window list so we don't get into trouble when destroying the thread windows while we're still in IntDestroyWindow() */ @@ -421,11 +424,11 @@ TIMER_RemoveWindowTimers(Window->hSelf); #endif - if (!(Window->Style & WS_CHILD) && Window->IDMenu - && (Menu = UserGetMenuObject((HMENU)Window->IDMenu))) + if (!(Wnd->Style & WS_CHILD) && Wnd->IDMenu + && (Menu = UserGetMenuObject((HMENU)Wnd->IDMenu))) { IntDestroyMenuObject(Menu, TRUE, TRUE); - Window->IDMenu = 0; + Wnd->IDMenu = 0; } if(Window->SystemMenu @@ -475,19 +478,20 @@ VOID FASTCALL IntGetWindowBorderMeasures(PWINDOW_OBJECT Window, UINT *cx, UINT *cy) { - if(HAS_DLGFRAME(Window->Style, Window->ExStyle) && !(Window->Style & WS_MINIMIZE)) + PWINDOW Wnd = Window->Wnd; + if(HAS_DLGFRAME(Wnd->Style, Wnd->ExStyle) && !(Wnd->Style & WS_MINIMIZE)) { *cx = UserGetSystemMetrics(SM_CXDLGFRAME); *cy = UserGetSystemMetrics(SM_CYDLGFRAME); } else { - if(HAS_THICKFRAME(Window->Style, Window->ExStyle)&& !(Window->Style & WS_MINIMIZE)) + if(HAS_THICKFRAME(Wnd->Style, Wnd->ExStyle)&& !(Wnd->Style & WS_MINIMIZE)) { *cx = UserGetSystemMetrics(SM_CXFRAME); *cy = UserGetSystemMetrics(SM_CYFRAME); } - else if(HAS_THINFRAME(Window->Style, Window->ExStyle)) + else if(HAS_THINFRAME(Wnd->Style, Wnd->ExStyle)) { *cx = UserGetSystemMetrics(SM_CXBORDER); *cy = UserGetSystemMetrics(SM_CYBORDER); @@ -556,11 +560,13 @@ BOOL FASTCALL IntGetWindowInfo(PWINDOW_OBJECT Window, PWINDOWINFO pwi) { + PWINDOW Wnd = Window->Wnd; + pwi->cbSize = sizeof(WINDOWINFO); pwi->rcWindow = Window->Wnd->WindowRect; pwi->rcClient = Window->Wnd->ClientRect; - pwi->dwStyle = Window->Style; - pwi->dwExStyle = Window->ExStyle; + pwi->dwStyle = Wnd->Style; + pwi->dwExStyle = Wnd->ExStyle; pwi->dwWindowStatus = (UserGetForegroundWindow() == Window->hSelf); /* WS_ACTIVECAPTION */ IntGetWindowBorderMeasures(Window, &pwi->cxWindowBorders, &pwi->cyWindowBorders); pwi->atomWindowType = (Window->Class ? Window->Class->Atom : 0); @@ -575,22 +581,23 @@ BOOL *Changed) { PMENU_OBJECT OldMenu, NewMenu = NULL; - - if ((Window->Style & (WS_CHILD | WS_POPUP)) == WS_CHILD) + PWINDOW Wnd = Window->Wnd; + + if ((Wnd->Style & (WS_CHILD | WS_POPUP)) == WS_CHILD) { SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE); return FALSE; } - *Changed = (Window->IDMenu != (UINT) Menu); + *Changed = (Wnd->IDMenu != (UINT) Menu); if (! *Changed) { return TRUE; } - if (Window->IDMenu) - { - OldMenu = IntGetMenuObject((HMENU) Window->IDMenu); + if (Wnd->IDMenu) + { + OldMenu = IntGetMenuObject((HMENU) Wnd->IDMenu); ASSERT(NULL == OldMenu || OldMenu->MenuInfo.Wnd == Window->hSelf); } else @@ -623,7 +630,7 @@ } - Window->IDMenu = (UINT) Menu; + Wnd->IDMenu = (UINT) Menu; if (NULL != NewMenu) { NewMenu->MenuInfo.Wnd = Window->hSelf; @@ -828,15 +835,17 @@ IntIsChildWindow(PWINDOW_OBJECT Parent, PWINDOW_OBJECT BaseWindow) { PWINDOW_OBJECT Window; + PWINDOW Wnd; Window = BaseWindow; while (Window) { + Wnd = Window->Wnd; if (Window == Parent) { return(TRUE); } - if(!(Window->Style & WS_CHILD)) + if(!(Wnd->Style & WS_CHILD)) { break; } @@ -851,15 +860,17 @@ IntIsWindowVisible(PWINDOW_OBJECT BaseWindow) { PWINDOW_OBJECT Window; + PWINDOW Wnd; Window = BaseWindow; while(Window) { - if(!(Window->Style & WS_CHILD)) + Wnd = Window->Wnd; + if(!(Wnd->Style & WS_CHILD)) { break; } - if(!(Window->Style & WS_VISIBLE)) + if(!(Wnd->Style & WS_VISIBLE)) { return FALSE; } @@ -867,7 +878,7 @@ Window = Window->Parent; } - if(Window && Window->Style & WS_VISIBLE) + if(Window && Wnd->Style & WS_VISIBLE) { return TRUE; } @@ -988,11 +999,11 @@ { IntUnlinkWindow(Wnd); InsertAfter = NULL; - if (0 == (Wnd->ExStyle & WS_EX_TOPMOST)) + if (0 == (Wnd->Wnd->ExStyle & WS_EX_TOPMOST)) { /* Not a TOPMOST window, put after TOPMOSTs of new parent */ Sibling = WndNewParent->FirstChild; - while (NULL != Sibling && 0 != (Sibling->ExStyle & WS_EX_TOPMOST)) + while (NULL != Sibling && 0 != (Sibling->Wnd->ExStyle & WS_EX_TOPMOST)) { InsertAfter = Sibling; Sibling = Sibling->NextSibling; @@ -1015,7 +1026,7 @@ * in the z-order and send the expected WM_WINDOWPOSCHANGING and * WM_WINDOWPOSCHANGED notification messages. */ - co_WinPosSetWindowPos(Wnd, (0 == (Wnd->ExStyle & WS_EX_TOPMOST) ? HWND_TOP : HWND_TOPMOST), + co_WinPosSetWindowPos(Wnd, (0 == (Wnd->Wnd->ExStyle & WS_EX_TOPMOST) ? HWND_TOP : HWND_TOPMOST), 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | (WasVisible ? SWP_SHOWWINDOW : 0)); @@ -1102,7 +1113,7 @@ for(Child = Window->FirstChild; Child; Child = Child->NextSibling) { - if(Child->hOwner && Child->Style & WS_VISIBLE) + if(Child->hOwner && Child->Wnd->Style & WS_VISIBLE) { /* * The desktop has a popup window if one of them has @@ -1334,17 +1345,19 @@ for(phWnd = List; *phWnd; phWnd++) { PWINDOW_OBJECT Child; + PWINDOW ChildWnd; if((Child = UserGetWindowObject(*phWnd))) { - if(!(Child->Style & WS_VISIBLE) && (uiFlags & CWP_SKIPINVISIBLE)) + ChildWnd = Child->Wnd; + if(!(ChildWnd->Style & WS_VISIBLE) && (uiFlags & CWP_SKIPINVISIBLE)) { continue; } - if((Child->Style & WS_DISABLED) && (uiFlags & CWP_SKIPDISABLED)) + if((ChildWnd->Style & WS_DISABLED) && (uiFlags & CWP_SKIPDISABLED)) { continue; } - if((Child->ExStyle & WS_EX_TRANSPARENT) && (uiFlags & CWP_SKIPTRANSPARENT)) + if((ChildWnd->ExStyle & WS_EX_TRANSPARENT) && (uiFlags & CWP_SKIPTRANSPARENT)) { continue; } @@ -1429,6 +1442,7 @@ BOOL bUnicodeWindow) { PWINSTATION_OBJECT WinSta; + PWINDOW Wnd = NULL; PWINDOWCLASS *ClassLink, Class = NULL; RTL_ATOM ClassAtom; PWINDOW_OBJECT Window = NULL; @@ -1544,17 +1558,19 @@ /* Create the window object. */ Window = (PWINDOW_OBJECT) ObmCreateObject(gHandleTable, (PHANDLE)&hWnd, - otWindow, sizeof(WINDOW_OBJECT) + Class->WndExtra - ); + otWindow, sizeof(WINDOW_OBJECT)); if (Window) { Window->Wnd = DesktopHeapAlloc(ti->Desktop, - sizeof(WINDOW)); + sizeof(WINDOW) + Class->WndExtra); if (!Window->Wnd) goto AllocErr; - - Window->Wnd->ti = ti; - Window->Wnd->pi = ti->kpi; + Wnd = Window->Wnd; + + RtlZeroMemory(Window->Wnd, + sizeof(WINDOW) + Class->WndExtra); + Wnd->ti = ti; + Wnd->pi = ti->kpi; } DPRINT("Created object with handle %X\n", hWnd); @@ -1585,8 +1601,8 @@ Window->SystemMenu = (HMENU)0; Window->ContextHelpId = 0; - Window->IDMenu = 0; - Window->Instance = hInstance; + Wnd->IDMenu = 0; + Wnd->Instance = hInstance; Window->hSelf = hWnd; if (!hMenu) @@ -1594,7 +1610,7 @@ if (0 != (dwStyle & WS_CHILD)) { - Window->IDMenu = (UINT) hMenu; + Wnd->IDMenu = (UINT) hMenu; } else { @@ -1616,7 +1632,7 @@ HasOwner = FALSE; } - Window->UserData = 0; + Wnd->UserData = 0; Window->IsSystem = Window->Class->System; if (Window->Class->System) @@ -1638,11 +1654,7 @@ Window->LastChild = NULL; Window->PrevSibling = NULL; Window->NextSibling = NULL; - Window->ExtraDataSize = Window->Class->WndExtra; - - /* extra window data */ - if (Window->Class->WndExtra) - Window->ExtraData = (PCHAR)(Window + 1); + Wnd->ExtraDataSize = Window->Class->WndExtra; InitializeListHead(&Window->PropListHead); InitializeListHead(&Window->WndObjListHead); @@ -1717,8 +1729,8 @@ Size.cx = nWidth; Size.cy = nHeight; - Window->ExStyle = dwExStyle; - Window->Style = dwStyle & ~WS_VISIBLE; + Wnd->ExStyle = dwExStyle; + Wnd->Style = dwStyle & ~WS_VISIBLE; /* call hook */ Cs.lpCreateParams = lpParam; @@ -1729,7 +1741,7 @@ Cs.cy = Size.cy; Cs.x = Pos.x; Cs.y = Pos.y; - Cs.style = Window->Style; + Cs.style = Wnd->Style; Cs.lpszName = (LPCWSTR) WindowName; Cs.lpszClass = (LPCWSTR) ClassName; Cs.dwExStyle = dwExStyle; @@ -1749,7 +1761,7 @@ nHeight = Cs.cy; /* default positioning for overlapped windows */ - if(!(Window->Style & (WS_POPUP | WS_CHILD))) + if(!(Wnd->Style & (WS_POPUP | WS_CHILD))) { RECT rc, WorkArea; PRTL_USER_PROCESS_PARAMETERS ProcessParams; @@ -1843,16 +1855,16 @@ } /* Initialize the window dimensions. */ - Window->Wnd->WindowRect.left = Pos.x; - Window->Wnd->WindowRect.top = Pos.y; - Window->Wnd->WindowRect.right = Pos.x + Size.cx; - Window->Wnd->WindowRect.bottom = Pos.y + Size.cy; - if (0 != (Window->Style & WS_CHILD) && ParentWindow) - { - IntGdiOffsetRect(&(Window->Wnd->WindowRect), ParentWindow->Wnd->ClientRect.left, + Wnd->WindowRect.left = Pos.x; + Wnd->WindowRect.top = Pos.y; + Wnd->WindowRect.right = Pos.x + Size.cx; + Wnd->WindowRect.bottom = Pos.y + Size.cy; + if (0 != (Wnd->Style & WS_CHILD) && ParentWindow) + { + IntGdiOffsetRect(&(Wnd->WindowRect), ParentWindow->Wnd->ClientRect.left, ParentWindow->Wnd->ClientRect.top); } - Window->Wnd->ClientRect = Window->Wnd->WindowRect; + Wnd->ClientRect = Wnd->WindowRect; /* * Get the size and position of the window. @@ -1878,16 +1890,16 @@ Size.cy = 0; } - Window->Wnd->WindowRect.left = Pos.x; - Window->Wnd->WindowRect.top = Pos.y; - Window->Wnd->WindowRect.right = Pos.x + Size.cx; - Window->Wnd->WindowRect.bottom = Pos.y + Size.cy; - if (0 != (Window->Style & WS_CHILD) && ParentWindow) - { - IntGdiOffsetRect(&(Window->Wnd->WindowRect), ParentWindow->Wnd->ClientRect.left, + Wnd->WindowRect.left = Pos.x; + Wnd->WindowRect.top = Pos.y; + Wnd->WindowRect.right = Pos.x + Size.cx; + Wnd->WindowRect.bottom = Pos.y + Size.cy; + if (0 != (Wnd->Style & WS_CHILD) && ParentWindow) + { + IntGdiOffsetRect(&(Wnd->WindowRect), ParentWindow->Wnd->ClientRect.left, ParentWindow->Wnd->ClientRect.top); } - Window->Wnd->ClientRect = Window->Wnd->WindowRect; + Wnd->ClientRect = Wnd->WindowRect; /* FIXME: Initialize the window menu. */ @@ -1944,7 +1956,7 @@ { InsertAfter = NULL; Sibling = ParentWindow->FirstChild; - while (Sibling && (Sibling->ExStyle & WS_EX_TOPMOST)) + while (Sibling && (Sibling->Wnd->ExStyle & WS_EX_TOPMOST)) { InsertAfter = Sibling; Sibling = Sibling->NextSibling; @@ -1997,15 +2009,15 @@ DPRINT("IntCreateWindow(): About to send WM_MOVE\n"); - if (0 != (Window->Style & WS_CHILD) && ParentWindow) - { - lParam = MAKE_LONG(Window->Wnd->ClientRect.left - ParentWindow->Wnd->ClientRect.left, - Window->Wnd->ClientRect.top - ParentWindow->Wnd->ClientRect.top); + if (0 != (Wnd->Style & WS_CHILD) && ParentWindow) + { + lParam = MAKE_LONG(Wnd->ClientRect.left - ParentWindow->Wnd->ClientRect.left, + Wnd->ClientRect.top - ParentWindow->Wnd->ClientRect.top); } else { - lParam = MAKE_LONG(Window->Wnd->ClientRect.left, - Window->Wnd->ClientRect.top); + lParam = MAKE_LONG(Wnd->ClientRect.left, + Wnd->ClientRect.top); } @@ -2019,16 +2031,16 @@ } /* Show or maybe minimize or maximize the window. */ - if (Window->Style & (WS_MINIMIZE | WS_MAXIMIZE)) + if (Wnd->Style & (WS_MINIMIZE | WS_MAXIMIZE)) { RECT NewPos; UINT16 SwFlag; - SwFlag = (Window->Style & WS_MINIMIZE) ? SW_MINIMIZE : + SwFlag = (Wnd->Style & WS_MINIMIZE) ? SW_MINIMIZE : SW_MAXIMIZE; co_WinPosMinMaximize(Window, SwFlag, &NewPos); SwFlag = - ((Window->Style & WS_CHILD) || UserGetActiveWindow()) ? + ((Wnd->Style & WS_CHILD) || UserGetActiveWindow()) ? SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED : SWP_NOZORDER | SWP_FRAMECHANGED; DPRINT("IntCreateWindow(): About to minimize/maximize\n"); @@ -2038,13 +2050,13 @@ } /* Notify the parent window of a new child. */ - if ((Window->Style & WS_CHILD) && - (!(Window->ExStyle & WS_EX_NOPARENTNOTIFY)) && ParentWindow) + if ((Wnd->Style & WS_CHILD) && + (!(Wnd->ExStyle & WS_EX_NOPARENTNOTIFY)) && ParentWindow) { DPRINT("IntCreateWindow(): About to notify parent\n"); co_IntSendMessage(ParentWindow->hSelf, WM_PARENTNOTIFY, - MAKEWPARAM(WM_CREATE, Window->IDMenu), + MAKEWPARAM(WM_CREATE, Wnd->IDMenu), (LPARAM)Window->hSelf); } @@ -2059,11 +2071,11 @@ } /* Initialize and show the window's scrollbars */ - if (Window->Style & WS_VSCROLL) + if (Wnd->Style & WS_VSCROLL) { co_UserShowScrollBar(Window, SB_VERT, TRUE); } - if (Window->Style & WS_HSCROLL) + if (Wnd->Style & WS_HSCROLL) { co_UserShowScrollBar(Window, SB_HORZ, TRUE); } @@ -2201,8 +2213,11 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWINDOW_OBJECT Window) { BOOLEAN isChild; + PWINDOW Wnd; ASSERT_REFS_CO(Window); //fixme: temp hack? + + Wnd = Window->Wnd; /* Check for owner thread */ if ((Window->OwnerThread != PsGetCurrentThread())) @@ -2240,7 +2255,7 @@ #endif IntEngWindowChanged(Window, WOC_DELETE); - isChild = (0 != (Window->Style & WS_CHILD)); + isChild = (0 != (Wnd->Style & WS_CHILD)); #if 0 /* FIXME */ @@ -3440,6 +3455,7 @@ UserGetWindowLong(HWND hWnd, DWORD Index, BOOL Ansi) { PWINDOW_OBJECT Window, Parent; + PWINDOW Wnd; LONG Result = 0; DPRINT("NtUserGetWindowLong(%x,%d,%d)\n", hWnd, (INT)Index, Ansi); @@ -3448,6 +3464,8 @@ { return 0; } + + Wnd = Window->Wnd; /* * WndProc is only available to the owner process @@ -3461,23 +3479,23 @@ if ((INT)Index >= 0) { - if ((Index + sizeof(LONG)) > Window->ExtraDataSize) + if ((Index + sizeof(LONG)) > Window->Wnd->ExtraDataSize) { SetLastWin32Error(ERROR_INVALID_PARAMETER); return 0; } - Result = *((LONG *)(Window->ExtraData + Index)); + Result = *((LONG *)((PCHAR)(Window->Wnd + 1) + Index)); } else { switch (Index) { case GWL_EXSTYLE: - Result = Window->ExStyle; + Result = Wnd->ExStyle; break; case GWL_STYLE: - Result = Window->Style; + Result = Wnd->Style; break; case GWL_WNDPROC: @@ -3486,7 +3504,7 @@ break; case GWL_HINSTANCE: - Result = (LONG) Window->Instance; + Result = (LONG) Wnd->Instance; break; case GWL_HWNDPARENT: @@ -3501,11 +3519,11 @@ break; case GWL_ID: - Result = (LONG) Window->IDMenu; + Result = (LONG) Wnd->IDMenu; break; case GWL_USERDATA: - Result = Window->UserData; + Result = Wnd->UserData; break; default: @@ -3638,6 +3656,7 @@ co_UserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi) { PWINDOW_OBJECT Window, Parent; + PWINDOW Wnd; PWINSTATION_OBJECT WindowStation; LONG OldValue; STYLESTRUCT Style; @@ -3653,22 +3672,24 @@ return( 0); } + Wnd = Window->Wnd; + if ((INT)Index >= 0) { - if ((Index + sizeof(LONG)) > Window->ExtraDataSize) + if ((Index + sizeof(LONG)) > Wnd->ExtraDataSize) { SetLastWin32Error(ERROR_INVALID_PARAMETER); return( 0); } - OldValue = *((LONG *)(Window->ExtraData + Index)); - *((LONG *)(Window->ExtraData + Index)) = NewValue; + OldValue = *((LONG *)((PCHAR)(Wnd + 1) + Index)); + *((LONG *)((PCHAR)(Wnd + 1) + Index)) = NewValue; } else { switch (Index) { case GWL_EXSTYLE: - OldValue = (LONG) Window->ExStyle; + OldValue = (LONG) Wnd->ExStyle; Style.styleOld = OldValue; Style.styleNew = NewValue; @@ -3683,16 +3704,16 @@ } co_IntSendMessage(hWnd, WM_STYLECHANGING, GWL_EXSTYLE, (LPARAM) &Style); - Window->ExStyle = (DWORD)Style.styleNew; + Wnd->ExStyle = (DWORD)Style.styleNew; co_IntSendMessage(hWnd, WM_STYLECHANGED, GWL_EXSTYLE, (LPARAM) &Style); break; case GWL_STYLE: - OldValue = (LONG) Window->Style; + OldValue = (LONG) Wnd->Style; Style.styleOld = OldValue; Style.styleNew = NewValue; co_IntSendMessage(hWnd, WM_STYLECHANGING, GWL_STYLE, (LPARAM) &Style); - Window->Style = (DWORD)Style.styleNew; + Wnd->Style = (DWORD)Style.styleNew; co_IntSendMessage(hWnd, WM_STYLECHANGED, GWL_STYLE, (LPARAM) &Style); break; @@ -3706,8 +3727,8 @@ } case GWL_HINSTANCE: - OldValue = (LONG) Window->Instance; - Window->Instance = (HINSTANCE) NewValue; + OldValue = (LONG) Wnd->Instance; + Wnd->Instance = (HINSTANCE) NewValue; break; case GWL_HWNDPARENT: @@ -3719,13 +3740,13 @@ break; case GWL_ID: - OldValue = (LONG) Window->IDMenu; - Window->IDMenu = (UINT) NewValue; + OldValue = (LONG) Wnd->IDMenu; + Wnd->IDMenu = (UINT) NewValue; break; case GWL_USERDATA: - OldValue = Window->UserData; - Window->UserData = NewValue; + OldValue = Wnd->UserData; + Wnd->UserData = NewValue; break; default: @@ -3806,14 +3827,14 @@ } } - if (Index > Window->ExtraDataSize - sizeof(WORD)) + if (Index > Window->Wnd->ExtraDataSize - sizeof(WORD)) { SetLastWin32Error(ERROR_INVALID_PARAMETER); RETURN( 0); } - OldValue = *((WORD *)(Window->ExtraData + Index)); - *((WORD *)(Window->ExtraData + Index)) = NewValue; + OldValue = *((WORD *)((PCHAR)(Window->Wnd + 1) + Index)); + *((WORD *)((PCHAR)(Window->Wnd + 1) + Index)) = NewValue; RETURN( OldValue); @@ -3831,6 +3852,7 @@ WINDOWPLACEMENT *lpwndpl) { PWINDOW_OBJECT Window; + PWINDOW Wnd; PINTERNALPOS InternalPos; POINT Size; WINDOWPLACEMENT Safepl; @@ -3844,6 +3866,7 @@ { RETURN( FALSE); } + Wnd = Window->Wnd; Status = MmCopyFromCaller(&Safepl, lpwndpl, sizeof(WINDOWPLACEMENT)); if(!NT_SUCCESS(Status)) @@ -3857,28 +3880,28 @@ } Safepl.flags = 0; - if (0 == (Window->Style & WS_VISIBLE)) + if (0 == (Wnd->Style & WS_VISIBLE)) { Safepl.showCmd = SW_HIDE; } else if (0 != (Window->Flags & WINDOWOBJECT_RESTOREMAX) || - 0 != (Window->Style & WS_MAXIMIZE)) + 0 != (Wnd->Style & WS_MAXIMIZE)) { Safepl.showCmd = SW_MAXIMIZE; } - else if (0 != (Window->Style & WS_MINIMIZE)) + else if (0 != (Wnd->Style & WS_MINIMIZE)) { Safepl.showCmd = SW_MINIMIZE; } - else if (0 != (Window->Style & WS_VISIBLE)) + else if (0 != (Wnd->Style & WS_VISIBLE)) { Safepl.showCmd = SW_SHOWNORMAL; } - Size.x = Window->Wnd->WindowRect.left; - Size.y = Window->Wnd->WindowRect.top; + Size.x = Wnd->WindowRect.left; + Size.y = Wnd->WindowRect.top; InternalPos = WinPosInitInternalPos(Window, &Size, - &Window->Wnd->WindowRect); + &Wnd->WindowRect); if (InternalPos) { Safepl.rcNormalPosition = InternalPos->NormalRect; @@ -4241,6 +4264,7 @@ WINDOWPLACEMENT *lpwndpl) { PWINDOW_OBJECT Window; + PWINDOW Wnd; WINDOWPLACEMENT Safepl; NTSTATUS Status; DECLARE_RETURN(BOOL); @@ -4253,6 +4277,8 @@ { RETURN( FALSE); } + Wnd = Window->Wnd; + Status = MmCopyFromCaller(&Safepl, lpwndpl, sizeof(WINDOWPLACEMENT)); if(!NT_SUCCESS(Status)) { @@ -4266,7 +4292,7 @@ UserRefObjectCo(Window, &Ref); - if ((Window->Style & (WS_MAXIMIZE | WS_MINIMIZE)) == 0) + if ((Wnd->Style & (WS_MAXIMIZE | WS_MINIMIZE)) == 0) { co_WinPosSetWindowPos(Window, NULL, Safepl.rcNormalPosition.left, Safepl.rcNormalPosition.top, @@ -4339,6 +4365,7 @@ INT Ret; HRGN VisRgn; ROSRGNDATA *pRgn; + PWINDOW Wnd; if(!Window) { @@ -4348,12 +4375,14 @@ { return ERROR; } + + Wnd = Window->Wnd; /* Create a new window region using the window rectangle */ VisRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->WindowRect); NtGdiOffsetRgn(VisRgn, -Window->Wnd->WindowRect.left, -Window->Wnd->WindowRect.top); /* if there's a region assigned to the window, combine them both */ - if(Window->WindowRegion && !(Window->Style & WS_MINIMIZE)) + if(Window->WindowRegion && !(Wnd->Style & WS_MINIMIZE)) NtGdiCombineRgn(VisRgn, VisRgn, Window->WindowRegion, RGN_AND); /* Copy the region into hRgn */ NtGdiCombineRgn(hRgn, VisRgn, NULL, RGN_COPY); @@ -4377,6 +4406,7 @@ INT Ret; HRGN VisRgn; ROSRGNDATA *pRgn; + PWINDOW Wnd; if(!Window) { @@ -4386,12 +4416,14 @@ { return ERROR; } + + Wnd = Window->Wnd; /* Create a new window region using the window rectangle */ VisRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->WindowRect); NtGdiOffsetRgn(VisRgn, -Window->Wnd->WindowRect.left, -Window->Wnd->WindowRect.top); /* if there's a region assigned to the window, combine them both */ - if(Window->WindowRegion && !(Window->Style & WS_MINIMIZE)) + if(Window->WindowRegion && !(Wnd->Style & WS_MINIMIZE)) NtGdiCombineRgn(VisRgn, VisRgn, Window->WindowRegion, RGN_AND); if((pRgn = RGNDATA_LockRgn(VisRgn))) @@ -4743,7 +4775,7 @@ } else { - if (pWnd->Style & WS_VISIBLE) + if (pWnd->Wnd->Style & WS_VISIBLE) { /* In Windows, ShowOwnedPopups(FALSE) generates * WM_SHOWWINDOW messages with SW_PARENTCLOSING, Modified: trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c Fri Nov 16 01:08:13 2007 @@ -138,7 +138,7 @@ LONG style; if (!Wnd) return FALSE; - style = Wnd->Style; + style = Wnd->Wnd->Style; if (!(style & WS_VISIBLE) && Wnd->OwnerThread->ThreadsProcess != CsrProcess) return FALSE; if ((style & (WS_POPUP|WS_CHILD)) == WS_CHILD) return FALSE; @@ -157,8 +157,11 @@ PWINDOW_OBJECT WndTo = NULL; HWND Fg; USER_REFERENCE_ENTRY Ref; + PWINDOW Wnd; ASSERT_REFS_CO(Window); + + Wnd = Window->Wnd; if (IntIsDesktopWindow(Window)) { @@ -167,7 +170,7 @@ } /* If this is popup window, try to activate the owner first. */ - if ((Window->Style & WS_POPUP) && (WndTo = IntGetOwner(Window))) + if ((Wnd->Style & WS_POPUP) && (WndTo = IntGetOwner(Window))) { WndTo = UserGetAncestor( WndTo, GA_ROOT ); if (can_activate_window(WndTo)) goto done; @@ -226,11 +229,14 @@ for( i = 0; List[i]; i++) { PWINDOW_OBJECT WndChild; + PWINDOW ChildWnd; if (!(WndChild = UserGetWindowObject(List[i]))) continue; - if((WndChild->Style & WS_MINIMIZE) != 0 ) + ChildWnd = WndChild->Wnd; + + if((ChildWnd->Style & WS_MINIMIZE) != 0 ) { USER_REFERENCE_ENTRY Ref; UserRefObjectCo(WndChild, &Ref); @@ -266,6 +272,7 @@ { PWINDOW_OBJECT Parent; UINT XInc, YInc; + PWINDOW Wnd = Window->Wnd; if (Window->InternalPos == NULL) { @@ -296,11 +303,11 @@ Window->InternalPos->IconPos.x = WorkArea.left; Window->InternalPos->IconPos.y = WorkArea.bottom - UserGetSystemMetrics(SM_CYMINIMIZED); } - if (Window->Style & WS_MINIMIZE) + if (Wnd->Style & WS_MINIMIZE) { Window->InternalPos->IconPos = *pt; } - else if (Window->Style & WS_MAXIMIZE) + else if (Wnd->Style & WS_MAXIMIZE) { Window->InternalPos->MaxPos = *pt; } @@ -317,8 +324,10 @@ POINT Size; PINTERNALPOS InternalPos; UINT SwpFlags = 0; + PWINDOW Wnd; ASSERT_REFS_CO(Window); + Wnd = Window->Wnd; Size.x = Window->Wnd->WindowRect.left; Size.y = Window->Wnd->WindowRect.top; @@ -326,7 +335,7 @@ if (InternalPos) { - if (Window->Style & WS_MINIMIZE) + if (Wnd->Style & WS_MINIMIZE) { if (!co_IntSendMessage(Window->hSelf, WM_QUERYOPEN, 0, 0)) { @@ -338,10 +347,10 @@ { case SW_MINIMIZE: { - if (Window->Style & WS_MAXIMIZE) + if (Wnd->Style & WS_MAXIMIZE) { Window->Flags |= WINDOWOBJECT_RESTOREMAX; - Window->Style &= ~WS_MAXIMIZE; + Wnd->Style &= ~WS_MAXIMIZE; } else { @@ -349,7 +358,7 @@ } co_UserRedrawWindow(Window, NULL, 0, RDW_VALIDATE | RDW_NOERASE | RDW_NOINTERNALPAINT); - Window->Style |= WS_MINIMIZE; + Wnd->Style |= WS_MINIMIZE; WinPosFindIconPos(Window, &InternalPos->IconPos); IntGdiSetRect(NewPos, InternalPos->IconPos.x, InternalPos->IconPos.y, UserGetSystemMetrics(SM_CXMINIMIZED), @@ -364,11 +373,11 @@ NULL, NULL); DPRINT("Maximize: %d,%d %dx%d\n", InternalPos->MaxPos.x, InternalPos->MaxPos.y, Size.x, Size.y); - if (Window->Style & WS_MINIMIZE) + if (Wnd->Style & WS_MINIMIZE) { - Window->Style &= ~WS_MINIMIZE; + Wnd->Style &= ~WS_MINIMIZE; } - Window->Style |= WS_MAXIMIZE; + Wnd->Style |= WS_MAXIMIZE; IntGdiSetRect(NewPos, InternalPos->MaxPos.x, InternalPos->MaxPos.y, Size.x, Size.y); break; @@ -376,14 +385,14 @@ case SW_RESTORE: { - if (Window->Style & WS_MINIMIZE) + if (Wnd->Style & WS_MINIMIZE) { - Window->Style &= ~WS_MINIMIZE; + Wnd->Style &= ~WS_MINIMIZE; if (Window->Flags & WINDOWOBJECT_RESTOREMAX) { co_WinPosGetMinMaxInfo(Window, &Size, &InternalPos->MaxPos, NULL, NULL); - Window->Style |= WS_MAXIMIZE; + Wnd->Style |= WS_MAXIMIZE; IntGdiSetRect(NewPos, InternalPos->MaxPos.x, InternalPos->MaxPos.y, Size.x, Size.y); break; @@ -398,11 +407,11 @@ } else { - if (!(Window->Style & WS_MAXIMIZE)) + if (!(Wnd->Style & WS_MAXIMIZE)) { return 0; } - Window->Style &= ~WS_MAXIMIZE; + Wnd->Style &= ~WS_MAXIMIZE; *NewPos = InternalPos->NormalRect; NewPos->right -= NewPos->left; NewPos->bottom -= NewPos->top; @@ -523,8 +532,10 @@ { PWINDOW_OBJECT Parent; UINT wvrFlags = 0; + PWINDOW Wnd; ASSERT_REFS_CO(Window); + Wnd = Window->Wnd; /* Send WM_NCCALCSIZE message to get new client area */ if ((WinPos->flags & (SWP_FRAMECHANGED | SWP_NOSIZE)) != SWP_NOSIZE) @@ -536,7 +547,7 @@ params.rgrc[1] = Window->Wnd->WindowRect; params.rgrc[2] = Window->Wnd->ClientRect; Parent = Window->Parent; - if (0 != (Window->Style & WS_CHILD) && Parent) + if (0 != (Wnd->Style & WS_CHILD) && Parent) { IntGdiOffsetRect(&(params.rgrc[0]), - Parent->Wnd->ClientRect.left, - Parent->Wnd->ClientRect.top); @@ -552,10 +563,10 @@ /* If the application send back garbage, ignore it */ if (params.rgrc[0].left <= params.rgrc[0].right && - params.rgrc[0].top <= params.rgrc[0].bottom) + params.rgrc[0].top <= params.rgrc[0].bottom) { *ClientRect = params.rgrc[0]; - if ((Window->Style & WS_CHILD) && Parent) + if ((Wnd->Style & WS_CHILD) && Parent) { IntGdiOffsetRect(ClientRect, Parent->Wnd->ClientRect.left, Parent->Wnd->ClientRect.top); @@ -565,16 +576,16 @@ /* FIXME: WVR_ALIGNxxx */ - if (ClientRect->left != Window->Wnd->ClientRect.left || - ClientRect->top != Window->Wnd->ClientRect.top) + if (ClientRect->left != Wnd->ClientRect.left || + ClientRect->top != Wnd->ClientRect.top) { WinPos->flags &= ~SWP_NOCLIENTMOVE; } if ((ClientRect->right - ClientRect->left != - Window->Wnd->ClientRect.right - Window->Wnd->ClientRect.left) || + Wnd->ClientRect.right - Wnd->ClientRect.left) || (ClientRect->bottom - ClientRect->top != - Window->Wnd->ClientRect.bottom - Window->Wnd->ClientRect.top)) + Wnd->ClientRect.bottom - Wnd->ClientRect.top)) { WinPos->flags &= ~SWP_NOCLIENTSIZE; } @@ -582,8 +593,8 @@ else { if (! (WinPos->flags & SWP_NOMOVE) - && (ClientRect->left != Window->Wnd->ClientRect.left || - ClientRect->top != Window->Wnd->ClientRect.top)) + && (ClientRect->left != Wnd->ClientRect.left || + ClientRect->top != Wnd->ClientRect.top)) { WinPos->flags &= ~SWP_NOCLIENTMOVE; } @@ -600,16 +611,18 @@ PRECT ClientRect) { INT X, Y; + PWINDOW Wnd; ASSERT_REFS_CO(Window); + Wnd = Window->Wnd; if (!(WinPos->flags & SWP_NOSENDCHANGING)) { co_IntPostOrSendMessage(Window->hSelf, WM_WINDOWPOSCHANGING, 0, (LPARAM) WinPos); } - *WindowRect = Window->Wnd->WindowRect; - *ClientRect = Window->Wnd->ClientRect; + *WindowRect = Wnd->WindowRect; + *ClientRect = Wnd->ClientRect; if (!(WinPos->flags & SWP_NOSIZE)) { @@ -623,7 +636,7 @@ X = WinPos->x; Y = WinPos->y; Parent = Window->Parent; - if ((0 != (Window->Style & WS_CHILD)) && Parent) + if ((0 != (Wnd->Style & WS_CHILD)) && Parent) { X += Parent->Wnd->ClientRect.left; Y += Parent->Wnd->ClientRect.top; @@ -631,11 +644,11 @@ WindowRect->left = X; WindowRect->top = Y; - WindowRect->right += X - Window->Wnd->WindowRect.left; - WindowRect->bottom += Y - Window->Wnd->WindowRect.top; + WindowRect->right += X - Wnd->WindowRect.left; + WindowRect->bottom += Y - Wnd->WindowRect.top; IntGdiOffsetRect(ClientRect, - X - Window->Wnd->WindowRect.left, - Y - Window->Wnd->WindowRect.top); + X - Wnd->WindowRect.left, + Y - Wnd->WindowRect.top); } WinPos->flags |= SWP_NOCLIENTMOVE | SWP_NOCLIENTSIZE; @@ -678,7 +691,7 @@ ChildObject = UserGetWindowObject(List[i]); if (NULL != ChildObject) { - if (0 == (ChildObject->ExStyle & WS_EX_TOPMOST)) + if (0 == (ChildObject->Wnd->ExStyle & WS_EX_TOPMOST)) { break; } @@ -715,7 +728,7 @@ if (!(Wnd = UserGetWindowObject(List[i]))) continue; - if ((Wnd->Style & WS_POPUP) && + if ((Wnd->Wnd->Style & WS_POPUP) && UserGetWindow(List[i], GW_OWNER) == hWnd) { USER_REFERENCE_ENTRY Ref; @@ -772,7 +785,8 @@ BOOL FASTCALL WinPosFixupFlags(WINDOWPOS *WinPos, PWINDOW_OBJECT Window) { - if (Window->Style & WS_VISIBLE) + PWINDOW Wnd = Window->Wnd; + if (Wnd->Style & WS_VISIBLE) { WinPos->flags &= ~SWP_SHOWWINDOW; } @@ -787,15 +801,15 @@ WinPos->cy = max(WinPos->cy, 0); /* Check for right size */ - if (Window->Wnd->WindowRect.right - Window->Wnd->WindowRect.left == WinPos->cx && - Window->Wnd->WindowRect.bottom - Window->Wnd->WindowRect.top == WinPos->cy) + if (Wnd->WindowRect.right - Wnd->WindowRect.left == WinPos->cx && + Wnd->WindowRect.bottom - Wnd->WindowRect.top == WinPos->cy) { WinPos->flags |= SWP_NOSIZE; } /* Check for right position */ - if (Window->Wnd->WindowRect.left == WinPos->x && - Window->Wnd->WindowRect.top == WinPos->y) + if (Wnd->WindowRect.left == WinPos->x && + Wnd->WindowRect.top == WinPos->y) { WinPos->flags |= SWP_NOMOVE; } @@ -805,13 +819,13 @@ WinPos->flags |= SWP_NOACTIVATE; /* Already active */ } else - if ((Window->Style & (WS_POPUP | WS_CHILD)) != WS_CHILD) + if ((Wnd->Style & (WS_POPUP | WS_CHILD)) != WS_CHILD) { /* Bring to the top when activating */ if (!(WinPos->flags & SWP_NOACTIVATE)) { WinPos->flags &= ~SWP_NOZORDER; - WinPos->hwndInsertAfter = (0 != (Window->ExStyle & WS_EX_TOPMOST) ? + WinPos->hwndInsertAfter = (0 != (Wnd->ExStyle & WS_EX_TOPMOST) ? HWND_TOPMOST : HWND_TOP); return TRUE; } @@ -835,7 +849,7 @@ WinPos->hwndInsertAfter = HWND_TOP; } else if (HWND_TOP == WinPos->hwndInsertAfter - && 0 != (Window->ExStyle & WS_EX_TOPMOST)) + && 0 != (Wnd->ExStyle & WS_EX_TOPMOST)) { /* Keep it topmost when it's already topmost */ WinPos->hwndInsertAfter = HWND_TOPMOST; @@ -996,7 +1010,7 @@ { InsertAfterWindow = NULL; Sibling = ParentWindow->FirstChild; - while (NULL != Sibling && 0 != (Sibling->ExStyle & WS_EX_TOPMOST)) + while (NULL != Sibling && 0 != (Sibling->Wnd->ExStyle & WS_EX_TOPMOST)) { InsertAfterWindow = Sibling; Sibling = Sibling->NextSibling; @@ -1028,17 +1042,17 @@ if (InsertAfterWindow != NULL) UserDerefObject(InsertAfterWindow); if ((HWND_TOPMOST == WinPos.hwndInsertAfter) - || (0 != (Window->ExStyle & WS_EX_TOPMOST) + || (0 != (Window->Wnd->ExStyle & WS_EX_TOPMOST) && NULL != Window->PrevSibling - && 0 != (Window->PrevSibling->ExStyle & WS_EX_TOPMOST)) + && 0 != (Window->PrevSibling->Wnd->ExStyle & WS_EX_TOPMOST)) || (NULL != Window->NextSibling - && 0 != (Window->NextSibling->ExStyle & WS_EX_TOPMOST))) - { - Window->ExStyle |= WS_EX_TOPMOST; + && 0 != (Window->NextSibling->Wnd->ExStyle & WS_EX_TOPMOST))) + { + Window->Wnd->ExStyle |= WS_EX_TOPMOST; } else { - Window->ExStyle &= ~ WS_EX_TOPMOST; + Window->Wnd->ExStyle &= ~ WS_EX_TOPMOST; } } @@ -1077,21 +1091,21 @@ /* Clear the update region */ co_UserRedrawWindow(Window, NULL, 0, RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE | RDW_NOINTERNALPAINT | RDW_ALLCHILDREN); - if ((Window->Style & WS_VISIBLE) && + if ((Window->Wnd->Style & WS_VISIBLE) && Window->Parent == UserGetDesktopWindow()) { co_IntShellHookNotify(HSHELL_WINDOWDESTROYED, (LPARAM)Window->hSelf); } - Window->Style &= ~WS_VISIBLE; + Window->Wnd->Style &= ~WS_VISIBLE; } else if (WinPos.flags & SWP_SHOWWINDOW) { - if (!(Window->Style & WS_VISIBLE) && + if (!(Window->Wnd->Style & WS_VISIBLE) && Window->Parent == UserGetDesktopWindow()) { co_IntShellHookNotify(HSHELL_WINDOWCREATED, (LPARAM)Window->hSelf); } - Window->Style |= WS_VISIBLE; + Window->Wnd->Style |= WS_VISIBLE; } if (Window->UpdateRegion != NULL && Window->UpdateRegion != (HRGN)1) @@ -1131,7 +1145,7 @@ */ if (VisBefore != NULL && VisAfter != NULL && !(WinPos.flags & SWP_NOCOPYBITS) && ((WinPos.flags & SWP_NOSIZE) || !(WvrFlags & WVR_REDRAW)) && - !(Window->ExStyle & WS_EX_TRANSPARENT)) + !(Window->Wnd->ExStyle & WS_EX_TRANSPARENT)) { CopyRgn = NtGdiCreateRectRgn(0, 0, 0, 0); RgnType = NtGdiCombineRgn(CopyRgn, VisAfter, VisBefore, RGN_AND); @@ -1243,9 +1257,9 @@ NtGdiOffsetRgn(DirtyRgn, Window->Wnd->WindowRect.left, Window->Wnd->WindowRect.top); - if ((Window->Style & WS_CHILD) && + if ((Window->Wnd->Style & WS_CHILD) && (Parent) && - !(Parent->Style & WS_CLIPCHILDREN)) + !(Parent->Wnd->Style & WS_CLIPCHILDREN)) { IntInvalidateWindows(Parent, DirtyRgn, RDW_ERASE | RDW_INVALIDATE); @@ -1292,7 +1306,7 @@ if (!(WinPos.flags & SWP_NOACTIVATE)) { - if ((Window->Style & (WS_CHILD | WS_POPUP)) == WS_CHILD) + if ((Window->Wnd->Style & (WS_CHILD | WS_POPUP)) == WS_CHILD) { co_IntSendMessage(WinPos.hwnd, WM_CHILDACTIVATE, 0, 0); } @@ -1332,10 +1346,12 @@ RECT NewPos; BOOLEAN ShowFlag; // HRGN VisibleRgn; + PWINDOW Wnd; ASSERT_REFS_CO(Window); - - WasVisible = (Window->Style & WS_VISIBLE) != 0; + Wnd = Window->Wnd; + + WasVisible = (Wnd->Style & WS_VISIBLE) != 0; switch (Cmd) { @@ -1360,7 +1376,7 @@ case SW_MINIMIZE: { Swp |= SWP_NOACTIVATE; - if (!(Window->Style & WS_MINIMIZE)) + if (!(Wnd->Style & WS_MINIMIZE)) { Swp |= co_WinPosMinMaximize(Window, SW_MINIMIZE, &NewPos) | SWP_FRAMECHANGED; @@ -1379,7 +1395,7 @@ case SW_SHOWMAXIMIZED: { Swp |= SWP_SHOWWINDOW; - if (!(Window->Style & WS_MAXIMIZE)) + if (!(Wnd->Style & WS_MAXIMIZE)) { Swp |= co_WinPosMinMaximize(Window, SW_MAXIMIZE, &NewPos) | SWP_FRAMECHANGED; @@ -1411,7 +1427,7 @@ case SW_SHOWDEFAULT: case SW_RESTORE: Swp |= SWP_SHOWWINDOW; - if (Window->Style & (WS_MINIMIZE | WS_MAXIMIZE)) + if (Wnd->Style & (WS_MINIMIZE | WS_MAXIMIZE)) { Swp |= co_WinPosMinMaximize(Window, SW_RESTORE, &NewPos) | SWP_FRAMECHANGED; @@ -1435,13 +1451,13 @@ } /* We can't activate a child window */ - if ((Window->Style & WS_CHILD) && - !(Window->ExStyle & WS_EX_MDICHILD)) + if ((Wnd->Style & WS_CHILD) && + !(Wnd->ExStyle & WS_EX_MDICHILD)) { Swp |= SWP_NOACTIVATE | SWP_NOZORDER; } - co_WinPosSetWindowPos(Window, 0 != (Window->ExStyle & WS_EX_TOPMOST) + co_WinPosSetWindowPos(Window, 0 != (Wnd->ExStyle & WS_EX_TOPMOST) ? HWND_TOPMOST : HWND_TOP, NewPos.left, NewPos.top, NewPos.right, NewPos.bottom, LOWORD(Swp)); @@ -1475,28 +1491,28 @@ /* FIXME: Check for window destruction. */ if ((Window->Flags & WINDOWOBJECT_NEED_SIZE) && - !(Window->Status & WINDOWSTATUS_DESTROYING)) + !(Window->Status & WINDOWSTATUS_DESTROYING)) { WPARAM wParam = SIZE_RESTORED; Window->Flags &= ~WINDOWOBJECT_NEED_SIZE; - if (Window->Style & WS_MAXIMIZE) + if (Wnd->Style & WS_MAXIMIZE) { wParam = SIZE_MAXIMIZED; } - else if (Window->Style & WS_MINIMIZE) + else if (Wnd->Style & WS_MINIMIZE) { wParam = SIZE_MINIMIZED; } co_IntSendMessage(Window->hSelf, WM_SIZE, wParam, - MAKELONG(Window->Wnd->ClientRect.right - - Window->Wnd->ClientRect.left, - Window->Wnd->ClientRect.bottom - - Window->Wnd->ClientRect.top)); + MAKELONG(Wnd->ClientRect.right - + Wnd->ClientRect.left, + Wnd->ClientRect.bottom - + Wnd->ClientRect.top)); co_IntSendMessage(Window->hSelf, WM_MOVE, 0, - MAKELONG(Window->Wnd->ClientRect.left, - Window->Wnd->ClientRect.top)); + MAKELONG(Wnd->ClientRect.left, + Wnd->ClientRect.top)); IntEngWindowChanged(Window, WOC_RGN_CLIENT); } @@ -1553,6 +1569,7 @@ ) { PWINDOW_OBJECT Current; + PWINDOW CurrentWnd; HWND *List, *phWnd; USER_REFERENCE_ENTRY Ref; @@ -1564,13 +1581,14 @@ { if (!(Current = UserGetWindowObject(*phWnd))) continue; - - if (!(Current->Style & WS_VISIBLE)) + CurrentWnd = Current->Wnd; + + if (!(CurrentWnd->Style & WS_VISIBLE)) { continue; } - if ((Current->Style & (WS_POPUP | WS_CHILD | WS_DISABLED)) == + if ((CurrentWnd->Style & (WS_POPUP | WS_CHILD | WS_DISABLED)) == (WS_CHILD | WS_DISABLED)) { continue; @@ -1585,13 +1603,13 @@ *Window = Current; UserRefObject(*Window); - if (Current->Style & WS_MINIMIZE) + if (CurrentWnd->Style & WS_MINIMIZE) { *HitTest = HTCAPTION; break; } - if (Current->Style & WS_DISABLED) + if (CurrentWnd->Style & WS_DISABLED) { *HitTest = HTERROR; break; @@ -1612,10 +1630,10 @@ else *HitTest = HTCLIENT; - if (Point->x >= Current->Wnd->ClientRect.left && - Point->x < Current->Wnd->ClientRect.right && - Point->y >= Current->Wnd->ClientRect.top && - Point->y < Current->Wnd->ClientRect.bottom) + if (Point->x >= CurrentWnd->ClientRect.left && + Point->x < CurrentWnd->ClientRect.right && + Point->y >= CurrentWnd->ClientRect.top && + Point->y < CurrentWnd->ClientRect.bottom) { co_WinPosSearchChildren(Current, OnlyHitTests, Point, Window, HitTest); } @@ -1648,7 +1666,7 @@ return(HTERROR); } - if (ScopeWin->Style & WS_DISABLED) + if (ScopeWin->Wnd->Style & WS_DISABLED) { return(HTERROR); }
17 years, 1 month
1
0
0
0
[cfinck] 30476: Attempt to fix the build...
by cfinck@svn.reactos.org
Author: cfinck Date: Fri Nov 16 01:05:15 2007 New Revision: 30476 URL:
http://svn.reactos.org/svn/reactos?rev=30476&view=rev
Log: Attempt to fix the build... Modified: trunk/reactos/include/reactos/win32k/ntuser.h Modified: trunk/reactos/include/reactos/win32k/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntuser.h (original) +++ trunk/reactos/include/reactos/win32k/ntuser.h Fri Nov 16 01:05:15 2007 @@ -113,7 +113,7 @@ HWND hWND; // Well be replaced with CALLBACKWND. PVOID pvWND; // " " DWORD dwHookCurrent; - ULONG Win32ClientInfo1 + ULONG Win32ClientInfo1; PVOID pClientThreadInfo; DWORD dwHookData; ULONG Win32ClientInfo2[8];
17 years, 1 month
1
0
0
0
[cfinck] 30475: - Add new spectrum bitmaps for 4bpp, 8bpp and 16-32bpp. The 8bpp one can probably be done better, but at least it's suitable ; -) As we use StretchBlt in the code, the bitmaps are very small, so they are stretched to the full size at runtime. - Change the current spectrum bitmap, when the user selects another color depth - Enable support for 4bpp color depth - Fix a bug in "monslctl.c", which broke building under MSVC
by cfinck@svn.reactos.org
Author: cfinck Date: Fri Nov 16 00:38:36 2007 New Revision: 30475 URL:
http://svn.reactos.org/svn/reactos?rev=30475&view=rev
Log: - Add new spectrum bitmaps for 4bpp, 8bpp and 16-32bpp. The 8bpp one can probably be done better, but at least it's suitable ;-) As we use StretchBlt in the code, the bitmaps are very small, so they are stretched to the full size at runtime. - Change the current spectrum bitmap, when the user selects another color depth - Enable support for 4bpp color depth - Fix a bug in "monslctl.c", which broke building under MSVC Added: trunk/reactos/dll/cpl/desk/resources/spectrum_16.bmp (with props) trunk/reactos/dll/cpl/desk/resources/spectrum_4.bmp (with props) trunk/reactos/dll/cpl/desk/resources/spectrum_8.bmp (with props) Removed: trunk/reactos/dll/cpl/desk/resources/spectrum.bmp Modified: trunk/reactos/dll/cpl/desk/desk.h trunk/reactos/dll/cpl/desk/desk.rc trunk/reactos/dll/cpl/desk/monslctl.c trunk/reactos/dll/cpl/desk/resource.h trunk/reactos/dll/cpl/desk/settings.c Modified: trunk/reactos/dll/cpl/desk/desk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/desk.h?rev=30…
============================================================================== --- trunk/reactos/dll/cpl/desk/desk.h (original) +++ trunk/reactos/dll/cpl/desk/desk.h Fri Nov 16 00:38:36 2007 @@ -48,7 +48,8 @@ ULONG __cdecl DbgPrint(PCCH Format,...); -#define MAX_DESK_PAGES 32 +#define MAX_DESK_PAGES 32 +#define NUM_SPECTRUM_BITMAPS 3 /* As slider control can't contain user data, we have to keep an * array of RESOLUTION_INFO to have our own associated data. Modified: trunk/reactos/dll/cpl/desk/desk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/desk.rc?rev=3…
============================================================================== --- trunk/reactos/dll/cpl/desk/desk.rc (original) +++ trunk/reactos/dll/cpl/desk/desk.rc Fri Nov 16 00:38:36 2007 @@ -15,6 +15,9 @@ IDC_DESK_ICON ICON "resources/applet.ico" IDC_DESK_ICON2 ICON "resources/applet.ico" IDC_MONITOR BITMAP "resources/monitor.bmp" -IDB_SPECTRUM BITMAP "resources/spectrum.bmp" + +IDB_SPECTRUM_4 BITMAP "resources/spectrum_4.bmp" +IDB_SPECTRUM_8 BITMAP "resources/spectrum_8.bmp" +IDB_SPECTRUM_16 BITMAP "resources/spectrum_16.bmp" #include "rsrc.rc" Modified: trunk/reactos/dll/cpl/desk/monslctl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/monslctl.c?re…
============================================================================== --- trunk/reactos/dll/cpl/desk/monslctl.c (original) +++ trunk/reactos/dll/cpl/desk/monslctl.c Fri Nov 16 00:38:36 2007 @@ -895,7 +895,7 @@ /* Paint the dragging monitor last */ if (infoPtr->IsDraggingMonitor && - (DWORD)infoPtr->DraggingMonitor >= 0) + infoPtr->DraggingMonitor >= 0) { MonSelRectToScreen(infoPtr, &infoPtr->rcDragging, Modified: trunk/reactos/dll/cpl/desk/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/resource.h?re…
============================================================================== --- trunk/reactos/dll/cpl/desk/resource.h (original) +++ trunk/reactos/dll/cpl/desk/resource.h Fri Nov 16 00:38:36 2007 @@ -66,7 +66,10 @@ #define IDC_SETTINGS_ADVANCED 205 #define IDC_SETTINGS_MONSEL 206 #define IDC_SETTINGS_SPECTRUM 207 -#define IDB_SPECTRUM 208 + +#define IDB_SPECTRUM_4 208 +#define IDB_SPECTRUM_8 209 +#define IDB_SPECTRUM_16 210 #define IDR_PREVIEW_MENU 2100 #define ID_MENU_NORMAL 2101 Removed: trunk/reactos/dll/cpl/desk/resources/spectrum.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/resources/spe…
============================================================================== Binary file - no diff available. Added: trunk/reactos/dll/cpl/desk/resources/spectrum_16.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/resources/spe…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/cpl/desk/resources/spectrum_16.bmp ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/dll/cpl/desk/resources/spectrum_4.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/resources/spe…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/cpl/desk/resources/spectrum_4.bmp ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/dll/cpl/desk/resources/spectrum_8.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/resources/spe…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/cpl/desk/resources/spectrum_8.bmp ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Modified: trunk/reactos/dll/cpl/desk/settings.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/settings.c?re…
============================================================================== --- trunk/reactos/dll/cpl/desk/settings.c (original) +++ trunk/reactos/dll/cpl/desk/settings.c Fri Nov 16 00:38:36 2007 @@ -15,9 +15,9 @@ { PDISPLAY_DEVICE_ENTRY DisplayDeviceList; PDISPLAY_DEVICE_ENTRY CurrentDisplayDevice; - HBITMAP hBitmap; - int cxSource; - int cySource; + HBITMAP hSpectrumBitmaps[NUM_SPECTRUM_BITMAPS]; + int cxSource[NUM_SPECTRUM_BITMAPS]; + int cySource[NUM_SPECTRUM_BITMAPS]; } GLOBAL_DATA, *PGLOBAL_DATA; @@ -80,7 +80,8 @@ while (EnumDisplaySettingsEx(DeviceName, iMode, &devmode, dwFlags)) { - if ((devmode.dmBitsPerPel==8 || + if ((devmode.dmBitsPerPel==4 || + devmode.dmBitsPerPel==8 || devmode.dmBitsPerPel==16 || devmode.dmBitsPerPel==24 || devmode.dmBitsPerPel==32) && @@ -285,6 +286,7 @@ BITMAP bitmap; DWORD Result = 0; DWORD iDevNum = 0; + INT i; DISPLAY_DEVICE displayDevice; PGLOBAL_DATA pGlobalData; @@ -362,15 +364,45 @@ } } - /* init the color spectrum*/ - pGlobalData->hBitmap = LoadImageW(hApplet, MAKEINTRESOURCEW(IDB_SPECTRUM), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); - if (pGlobalData->hBitmap != NULL) - { - GetObjectW(pGlobalData->hBitmap, sizeof(BITMAP), &bitmap); - - pGlobalData->cxSource = bitmap.bmWidth; - pGlobalData->cySource = bitmap.bmHeight; - } + /* Initialize the color spectrum bitmaps */ + for(i = 0; i < NUM_SPECTRUM_BITMAPS; i++) + { + pGlobalData->hSpectrumBitmaps[i] = LoadImageW(hApplet, MAKEINTRESOURCEW(IDB_SPECTRUM_4 + i), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); + + if (pGlobalData->hSpectrumBitmaps[i] != NULL) + { + GetObjectW(pGlobalData->hSpectrumBitmaps[i], sizeof(BITMAP), &bitmap); + + pGlobalData->cxSource[i] = bitmap.bmWidth; + pGlobalData->cySource[i] = bitmap.bmHeight; + } + } +} + +/* Get the ID for GLOBAL_DATA::hSpectrumBitmaps */ +static VOID +ShowColorSpectrum(IN HDC hDC, IN LPRECT client, IN DWORD BitsPerPel, IN PGLOBAL_DATA pGlobalData) +{ + HDC hdcMem; + hdcMem = CreateCompatibleDC(hDC); + + if (hdcMem) + { + INT iBitmap; + + switch(BitsPerPel) + { + case 4: iBitmap = 0; break; + case 8: iBitmap = 1; break; + default: iBitmap = 2; + } + + SelectObject(hdcMem, pGlobalData->hSpectrumBitmaps[iBitmap]); + StretchBlt(hDC, client->left, client->top, client->right - client->left, + client->bottom - client->top, hdcMem, 0, 0, + pGlobalData->cxSource[iBitmap], pGlobalData->cySource[iBitmap], SRCCOPY); + DeleteDC(hdcMem); + } } static VOID @@ -383,11 +415,18 @@ PSETTINGS_ENTRY Current; DWORD dmNewBitsPerPel; DWORD index; - TCHAR Buffer[64]; - - SendDlgItemMessage(hwndDlg, IDC_SETTINGS_BPP, WM_GETTEXT, (WPARAM)(sizeof(Buffer) / sizeof(TCHAR)), (LPARAM)Buffer); - index = (DWORD) SendDlgItemMessage(hwndDlg, IDC_SETTINGS_BPP, CB_FINDSTRINGEXACT, (WPARAM)-1, (LPARAM)Buffer); + HDC hSpectrumDC; + HWND hSpectrumControl; + RECT client; + + index = (DWORD) SendDlgItemMessage(hwndDlg, IDC_SETTINGS_BPP, CB_GETCURSEL, 0, 0); dmNewBitsPerPel = (DWORD) SendDlgItemMessage(hwndDlg, IDC_SETTINGS_BPP, CB_GETITEMDATA, index, 0); + + /* Show a new spectrum bitmap */ + hSpectrumControl = GetDlgItem(hwndDlg, IDC_SETTINGS_SPECTRUM); + hSpectrumDC = GetDC(hSpectrumControl); + GetClientRect(hSpectrumControl, &client); + ShowColorSpectrum(hSpectrumDC, &client, dmNewBitsPerPel, pGlobalData); /* find if new parameters are valid */ Current = pGlobalData->CurrentDisplayDevice->CurrentSettings; @@ -585,20 +624,10 @@ { LPDRAWITEMSTRUCT lpDrawItem; lpDrawItem = (LPDRAWITEMSTRUCT) lParam; + if(lpDrawItem->CtlID == IDC_SETTINGS_SPECTRUM) - { - HDC hdcMem; - hdcMem = CreateCompatibleDC(lpDrawItem->hDC); - if (hdcMem != NULL) - { - SelectObject(hdcMem, pGlobalData->hBitmap); - StretchBlt(lpDrawItem->hDC, lpDrawItem->rcItem.left, lpDrawItem->rcItem.top, - lpDrawItem->rcItem.right - lpDrawItem->rcItem.left, - lpDrawItem->rcItem.bottom - lpDrawItem->rcItem.top, - hdcMem, 0, 0, pGlobalData->cxSource, pGlobalData->cySource, SRCCOPY); - DeleteDC(hdcMem); - } - } + ShowColorSpectrum(lpDrawItem->hDC, &lpDrawItem->rcItem, pGlobalData->CurrentDisplayDevice->CurrentSettings->dmBitsPerPel, pGlobalData); + break; } case WM_COMMAND: @@ -784,6 +813,8 @@ case WM_DESTROY: { + INT i; + PDISPLAY_DEVICE_ENTRY Current = pGlobalData->DisplayDeviceList; while (Current != NULL) { @@ -801,8 +832,11 @@ HeapFree(GetProcessHeap(), 0, pGlobalData); - if (pGlobalData->hBitmap) - DeleteObject(pGlobalData->hBitmap); + for(i = 0; i < NUM_SPECTRUM_BITMAPS; i++) + { + if(pGlobalData->hSpectrumBitmaps[i]) + DeleteObject(pGlobalData->hSpectrumBitmaps[i]); + } } } return FALSE;
17 years, 1 month
1
0
0
0
[peterw] 30474: - Clarify component descriptions a bit.
by peterw@svn.reactos.org
Author: peterw Date: Fri Nov 16 00:11:51 2007 New Revision: 30474 URL:
http://svn.reactos.org/svn/reactos?rev=30474&view=rev
Log: - Clarify component descriptions a bit. Modified: trunk/tools/RosBE/RosBE-Windows/RosBE.nsi Modified: trunk/tools/RosBE/RosBE-Windows/RosBE.nsi URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/RosBE.ns…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/RosBE.nsi (original) +++ trunk/tools/RosBE/RosBE-Windows/RosBE.nsi Fri Nov 16 00:11:51 2007 @@ -148,7 +148,7 @@ !insertmacro MUI_STARTMENU_WRITE_END SectionEnd -Section "SVN Tools (ssvn)" SEC04 +Section "Subversion Tools (svn, ssvn)" SEC04 SetShellVarContext current SetOutPath "$INSTDIR" SetOverwrite try @@ -178,7 +178,7 @@ File /r Root\Tools\scut.exe SectionEnd -Section "CCache" SEC06 +Section "ccache - Compiler Cache" SEC06 SetShellVarContext current SetOutPath "$INSTDIR\4.1.3\bin" SetOverwrite try @@ -186,7 +186,7 @@ File /r Root\Tools\cygwin1.dll SectionEnd -Section "GDB" SEC07 +Section "GDB - The GNU Project Debugger" SEC07 SetShellVarContext current SetOutPath "$INSTDIR\4.1.3\bin" SetOverwrite try
17 years, 1 month
1
0
0
0
[fireball] 30473: - Thanks hpoussin for remind!
by fireball@svn.reactos.org
Author: fireball Date: Fri Nov 16 00:05:57 2007 New Revision: 30473 URL:
http://svn.reactos.org/svn/reactos?rev=30473&view=rev
Log: - Thanks hpoussin for remind! Modified: trunk/reactos/baseaddress.rbuild Modified: trunk/reactos/baseaddress.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/baseaddress.rbuild?rev=304…
============================================================================== --- trunk/reactos/baseaddress.rbuild (original) +++ trunk/reactos/baseaddress.rbuild Fri Nov 16 00:05:57 2007 @@ -121,6 +121,7 @@ <property name="BASEADDRESS_CLUSAPI" value="0x76d10000" /> <property name="BASEADDRESS_DHCPCSVC" value="0x76d80000" /> <property name="BASEADDRESS_FMIFS" value="0x76df0000" /> + <property name="BASEADDRESS_RASAPI32" value="0x76ee0000h" /> <property name="BASEADDRESS_WTSAPI32" value="0x76f50000" /> <property name="BASEADDRESS_MSVFW32" value="0x77400000" /> <property name="BASEADDRESS_MSACM32" value="0x77400000" />
17 years, 1 month
1
0
0
0
[mpiulachs] 30472: - Added a few more build families to buildfamilies.rbuild - Added a description field to the "buildfamily" element - Added a check to ensure only valid module types use the "family" element.
by mpiulachs@svn.reactos.org
Author: mpiulachs Date: Fri Nov 16 00:03:41 2007 New Revision: 30472 URL:
http://svn.reactos.org/svn/reactos?rev=30472&view=rev
Log: - Added a few more build families to buildfamilies.rbuild - Added a description field to the "buildfamily" element - Added a check to ensure only valid module types use the "family" element. Modified: branches/rbuild/reactos/buildfamilies.rbuild branches/rbuild/reactos/tools/rbuild/module.cpp branches/rbuild/reactos/tools/rbuild/rbuild.h Modified: branches/rbuild/reactos/buildfamilies.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/rbuild/reactos/buildfamilies.rb…
============================================================================== --- branches/rbuild/reactos/buildfamilies.rbuild (original) +++ branches/rbuild/reactos/buildfamilies.rbuild Fri Nov 16 00:03:41 2007 @@ -1,12 +1,29 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE group SYSTEM "tools/rbuild/project.dtd"> <group xmlns:xi="
http://www.w3.org/2001/XInclude
"> + + <!-- Core API and Components --> + <buildfamily name="core" description="Core aplications , drivers and dlls" /> + <buildfamily name="kernel" description="OS Kernel" /> + + <!-- User mode applications --> + <buildfamily name="applications" /> + <buildfamily name="guiapplications" description="Win32 GUI applications" /> + <buildfamily name="cuiapplications" description="Win32 console applications" /> + <buildfamily name="nativeapplications" description="Native console applications"/> + + <!-- By functionality --> + <buildfamily name="games" /> <buildfamily name="screensavers" /> - <buildfamily name="core" /> + <buildfamily name="services" /> + <buildfamily name="shells" /> + <buildfamily name="cpapplets" /> + + <!-- Drivers --> <buildfamily name="drivers" /> - <buildfamily name="kernel" /> - <buildfamily name="applications" /> - <buildfamily name="guiapplications" /> - <buildfamily name="cuiapplications" /> - <buildfamily name="games" /> + <buildfamily name="fsdrivers" description="File system drivers" /> + <buildfamily name="hardwaredrivers" description="Hardware drivers" /> + <buildfamily name="displaydrivers" description="Hardware display drivers" /> + <buildfamily name="inputdrivers" description="I/O device drivers" /> + </group> Modified: branches/rbuild/reactos/tools/rbuild/module.cpp URL:
http://svn.reactos.org/svn/reactos/branches/rbuild/reactos/tools/rbuild/mod…
============================================================================== --- branches/rbuild/reactos/tools/rbuild/module.cpp (original) +++ branches/rbuild/reactos/tools/rbuild/module.cpp Fri Nov 16 00:03:41 2007 @@ -1649,6 +1649,11 @@ const XMLAttribute* att = _node.GetAttribute ( "name", true ); assert(att); name = att->value; + att = _node.GetAttribute ( "description", false ); + if (att != NULL) + description = att->value; + else + description = ""; } void @@ -1674,6 +1679,13 @@ : node (_node), module (_module) { + if ( !IsSupportedModuleType ( module.type ) ) + { + throw XMLInvalidBuildFileException ( + node.location, + "<Family> is not applicable for this module type." ); + } + ProcessXML (); } @@ -1691,6 +1703,29 @@ } name = node.value; +} + +bool +Family::IsSupportedModuleType ( ModuleType type ) +{ + if (type == Win32DLL || + type == Win32OCX || + type == StaticLibrary || + type == ObjectLibrary || + type == Kernel || + type == KernelModeDLL || + type == KernelModeDriver || + type == NativeDLL || + type == NativeCUI || + type == Win32CUI || + type == Win32GUI || + type == Win32SCR || + type == EmbeddedTypeLib) + { + return true; + } + + return false; } Contributor::Contributor ( const XMLElement& _node) Modified: branches/rbuild/reactos/tools/rbuild/rbuild.h URL:
http://svn.reactos.org/svn/reactos/branches/rbuild/reactos/tools/rbuild/rbu…
============================================================================== --- branches/rbuild/reactos/tools/rbuild/rbuild.h (original) +++ branches/rbuild/reactos/tools/rbuild/rbuild.h Fri Nov 16 00:03:41 2007 @@ -620,6 +620,7 @@ public: const XMLElement& node; std::string name; + std::string description; BuildFamily ( const XMLElement& node ); @@ -632,7 +633,7 @@ const XMLElement& node; const Module& module; std::string name; - + bool IsSupportedModuleType ( ModuleType type ); Family ( const XMLElement& node , const Module& _module );
17 years, 1 month
1
0
0
0
[jimtabor] 30471: Add more data for ClientInfo, Callback and support per thread hooks.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Fri Nov 16 00:01:13 2007 New Revision: 30471 URL:
http://svn.reactos.org/svn/reactos?rev=30471&view=rev
Log: Add more data for ClientInfo, Callback and support per thread hooks. Modified: trunk/reactos/include/reactos/win32k/ntuser.h Modified: trunk/reactos/include/reactos/win32k/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntuser.h (original) +++ trunk/reactos/include/reactos/win32k/ntuser.h Fri Nov 16 00:01:13 2007 @@ -90,16 +90,37 @@ } W32THREADINFO, *PW32THREADINFO; /* Window Client Information structure */ + +typedef struct _CALLBACKWND +{ + HWND hWnd; + PVOID pvWnd; +} CALLBACKWND, *PCALLBACKWND; + + typedef struct _W32CLIENTINFO { - ULONG Win32ClientInfo0[2]; + ULONG CI_flags; + ULONG cSpins; ULONG ulWindowsVersion; ULONG ulAppCompatFlags; ULONG ulAppCompatFlags2; - ULONG Win32ClientInfo1[5]; - HWND hWND; - PVOID pvWND; - ULONG Win32ClientInfo2[50]; + DWORD dwTIFlags; + PVOID pDeskInfo; + ULONG_PTR ulClientDelta; + PVOID phkCurrent; + ULONG fsHooks; + HWND hWND; // Well be replaced with CALLBACKWND. + PVOID pvWND; // " " + DWORD dwHookCurrent; + ULONG Win32ClientInfo1 + PVOID pClientThreadInfo; + DWORD dwHookData; + ULONG Win32ClientInfo2[8]; + HANDLE hKL; + USHORT CodePage; + USHORT csCF; + ULONG Win32ClientInfo3[36]; } W32CLIENTINFO, *PW32CLIENTINFO; #define GetWin32ClientInfo() (PW32CLIENTINFO)(NtCurrentTeb()->Win32ClientInfo)
17 years, 1 month
1
0
0
0
[hpoussin] 30470: Reset mouse to detect its type See issue #2817 for more details.
by hpoussin@svn.reactos.org
Author: hpoussin Date: Thu Nov 15 23:13:49 2007 New Revision: 30470 URL:
http://svn.reactos.org/svn/reactos?rev=30470&view=rev
Log: Reset mouse to detect its type See issue #2817 for more details. Modified: trunk/reactos/drivers/input/i8042prt/i8042prt.c trunk/reactos/drivers/input/i8042prt/mouse.c trunk/reactos/drivers/input/i8042prt/pnp.c Modified: trunk/reactos/drivers/input/i8042prt/i8042prt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/i8042prt/i80…
============================================================================== --- trunk/reactos/drivers/input/i8042prt/i8042prt.c (original) +++ trunk/reactos/drivers/input/i8042prt/i8042prt.c Thu Nov 15 23:13:49 2007 @@ -202,22 +202,6 @@ } } } -#if 0 - else - { - /* Mouse doesn't have this, but we need to send a - * reset to start the detection. - */ - KIRQL Irql; - - Irql = KeAcquireInterruptSpinLock(PortDeviceExtension->HighestDIRQLInterrupt); - - i8042Write(PortDeviceExtension, PortDeviceExtension->ControlPort, CTRL_WRITE_MOUSE); - i8042Write(PortDeviceExtension, PortDeviceExtension->DataPort, MOU_CMD_RESET); - - KeReleaseInterruptSpinLock(PortDeviceExtension->HighestDIRQLInterrupt, Irql); - } -#endif WorkItemData->Irp->IoStatus.Status = STATUS_SUCCESS; Modified: trunk/reactos/drivers/input/i8042prt/mouse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/i8042prt/mou…
============================================================================== --- trunk/reactos/drivers/input/i8042prt/mouse.c (original) +++ trunk/reactos/drivers/input/i8042prt/mouse.c Thu Nov 15 23:13:49 2007 @@ -28,14 +28,14 @@ DeviceExtension = (PI8042_MOUSE_EXTENSION)Context; - if (DeviceExtension->MouseHook.IsrWritePort) + if (DeviceExtension->MouseHook.IsrWritePort != i8042MouIsrWritePort) { DeviceExtension->MouseHook.IsrWritePort( DeviceExtension->MouseHook.CallContext, Value); } else - i8042IsrWritePort(Context, Value, CTRL_WRITE_MOUSE); + i8042IsrWritePort(DeviceExtension->Common.PortDeviceExtension, Value, CTRL_WRITE_MOUSE); } static VOID NTAPI @@ -429,6 +429,8 @@ DeviceExtension->Common.PortDeviceExtension->Flags |= MOUSE_CONNECTED; IoMarkIrpPending(Irp); + DeviceExtension->MouseState = MouseResetting; + DeviceExtension->MouseResetState = 1100; DeviceExtension->MouseHook.IsrWritePort = i8042MouIsrWritePort; DeviceExtension->MouseHook.QueueMousePacket = i8042MouQueuePacket; DeviceExtension->MouseHook.CallContext = DeviceExtension; Modified: trunk/reactos/drivers/input/i8042prt/pnp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/i8042prt/pnp…
============================================================================== --- trunk/reactos/drivers/input/i8042prt/pnp.c (original) +++ trunk/reactos/drivers/input/i8042prt/pnp.c Thu Nov 15 23:13:49 2007 @@ -332,6 +332,19 @@ UCHAR FlagsToEnable = 0; i8042Flush(DeviceExtension); + + /* First, reset the mouse (if any) to start the detection */ + if (DeviceExtension->Flags & MOUSE_PRESENT) + { + KIRQL Irql; + + Irql = KeAcquireInterruptSpinLock(DeviceExtension->HighestDIRQLInterrupt); + + i8042Write(DeviceExtension, DeviceExtension->ControlPort, CTRL_WRITE_MOUSE); + i8042Write(DeviceExtension, DeviceExtension->DataPort, MOU_CMD_RESET); + + KeReleaseInterruptSpinLock(DeviceExtension->HighestDIRQLInterrupt, Irql); + } /* Select the devices we have */ if (DeviceExtension->Flags & KEYBOARD_PRESENT) @@ -533,7 +546,7 @@ else InterruptData.InterruptMode = LevelSensitive; InterruptData.ShareInterrupt = (ResourceDescriptorTranslated->ShareDisposition == CmResourceShareShared); - DPRINT("Found irq resource: %lu\n", ResourceDescriptor->u.Interrupt.Vector); + DPRINT("Found irq resource: %lu\n", ResourceDescriptor->u.Interrupt.Level); FoundIrq = TRUE; break; }
17 years, 1 month
1
0
0
0
← Newer
1
...
42
43
44
45
46
47
48
...
89
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
Results per page:
10
25
50
100
200