ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
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
March 2017
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
14 participants
251 discussions
Start a n
N
ew thread
[hbelusca] 74017: [USER32]: Fix formatting in User32CreateWindowEx, no code changes.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Mar 1 19:23:27 2017 New Revision: 74017 URL:
http://svn.reactos.org/svn/reactos?rev=74017&view=rev
Log: [USER32]: Fix formatting in User32CreateWindowEx, no code changes. Modified: trunk/reactos/win32ss/user/user32/windows/window.c Modified: trunk/reactos/win32ss/user/user32/windows/window.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/window.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/window.c [iso-8859-1] Wed Mar 1 19:23:27 2017 @@ -172,7 +172,7 @@ WNDCLASSEXA wceA; WNDCLASSEXW wceW; HMODULE hLibModule = NULL; - DWORD save_error; + DWORD dwLastError; BOOL Unicode, ClassFound = FALSE; HWND Handle = NULL; LPCWSTR lpszClsVersion; @@ -185,8 +185,8 @@ if (!RegisterDefaultClasses) { - TRACE("RegisterSystemControls\n"); - RegisterSystemControls(); + TRACE("RegisterSystemControls\n"); + RegisterSystemControls(); } Unicode = !(dwFlags & NUCWE_ANSI); @@ -197,14 +197,16 @@ } else { - if(Unicode) + if (Unicode) + { RtlInitUnicodeString(&ClassName, (PCWSTR)lpClassName); + } else { if (!RtlCreateUnicodeStringFromAsciiz(&ClassName, (PCSZ)lpClassName)) { SetLastError(ERROR_OUTOFMEMORY); - return (HWND)0; + return NULL; } } @@ -247,20 +249,20 @@ } } - if(!hMenu && (dwStyle & (WS_OVERLAPPEDWINDOW | WS_POPUP))) - { - if(Unicode) - { - wceW.cbSize = sizeof(WNDCLASSEXW); - if(GetClassInfoExW(hInstance, (LPCWSTR)lpClassName, &wceW) && wceW.lpszMenuName) + if (!hMenu && (dwStyle & (WS_OVERLAPPEDWINDOW | WS_POPUP))) + { + if (Unicode) + { + wceW.cbSize = sizeof(wceW); + if (GetClassInfoExW(hInstance, (LPCWSTR)lpClassName, &wceW) && wceW.lpszMenuName) { hMenu = LoadMenuW(hInstance, wceW.lpszMenuName); } } else { - wceA.cbSize = sizeof(WNDCLASSEXA); - if(GetClassInfoExA(hInstance, lpClassName, &wceA) && wceA.lpszMenuName) + wceA.cbSize = sizeof(wceA); + if (GetClassInfoExA(hInstance, lpClassName, &wceA) && wceA.lpszMenuName) { hMenu = LoadMenuA(hInstance, wceA.lpszMenuName); } @@ -283,54 +285,53 @@ plstrClassVersion = &lstrClassVersion; } - for(;;) - { - Handle = NtUserCreateWindowEx(dwExStyle, - plstrClassName, - plstrClassVersion, - &WindowName, - dwStyle, - x, - y, - nWidth, - nHeight, - hWndParent, - hMenu, - hInstance, - lpParam, - dwFlags, - NULL); - if (Handle) break; - if (!lpLibFileName) break; - if (!ClassFound) - { - save_error = GetLastError(); - if ( save_error == ERROR_CANNOT_FIND_WND_CLASS ) - { - ClassFound = VersionRegisterClass(ClassName.Buffer, lpLibFileName, pCtx, &hLibModule); - if (ClassFound) continue; - } - } - if (hLibModule) - { - save_error = GetLastError(); - FreeLibrary(hLibModule); - SetLastError(save_error); - hLibModule = 0; - } - break; + for (;;) + { + Handle = NtUserCreateWindowEx(dwExStyle, + plstrClassName, + plstrClassVersion, + &WindowName, + dwStyle, + x, + y, + nWidth, + nHeight, + hWndParent, + hMenu, + hInstance, + lpParam, + dwFlags, + NULL); + if (Handle) break; + if (!lpLibFileName) break; + if (!ClassFound) + { + dwLastError = GetLastError(); + if (dwLastError == ERROR_CANNOT_FIND_WND_CLASS) + { + ClassFound = VersionRegisterClass(ClassName.Buffer, lpLibFileName, pCtx, &hLibModule); + if (ClassFound) continue; + } + } + if (hLibModule) + { + dwLastError = GetLastError(); + FreeLibrary(hLibModule); + SetLastError(dwLastError); + hLibModule = NULL; + } + break; } #if 0 DbgPrint("[window] NtUserCreateWindowEx() == %d\n", Handle); #endif + cleanup: - if(!Unicode) + if (!Unicode) { if (!IS_ATOM(lpClassName)) - { RtlFreeUnicodeString(&ClassName); - } RtlFreeLargeString(&WindowName); } @@ -573,8 +574,8 @@ } hwnd = User32CreateWindowEx(dwExStyle, - (LPCSTR) lpClassName, - (LPCSTR) lpWindowName, + (LPCSTR)lpClassName, + (LPCSTR)lpWindowName, dwStyle, x, y,
7 years, 8 months
1
0
0
0
[tfaber] 74016: [NTOS:FORMATTING] - Fix spacing in IopActionInterrogateDeviceStack. No code changes.
by tfaber@svn.reactos.org
Author: tfaber Date: Wed Mar 1 19:07:13 2017 New Revision: 74016 URL:
http://svn.reactos.org/svn/reactos?rev=74016&view=rev
Log: [NTOS:FORMATTING] - Fix spacing in IopActionInterrogateDeviceStack. No code changes. Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Wed Mar 1 19:07:13 2017 @@ -1868,357 +1868,352 @@ IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode, PVOID Context) { - IO_STATUS_BLOCK IoStatusBlock; - PDEVICE_NODE ParentDeviceNode; - WCHAR InstancePath[MAX_PATH]; - IO_STACK_LOCATION Stack; - NTSTATUS Status; - ULONG RequiredLength; - LCID LocaleId; - HANDLE InstanceKey = NULL; - UNICODE_STRING ValueName; - UNICODE_STRING ParentIdPrefix = { 0, 0, NULL }; - UNICODE_STRING InstancePathU; - DEVICE_CAPABILITIES DeviceCapabilities; - PDEVICE_OBJECT OldDeviceObject; - - DPRINT("IopActionInterrogateDeviceStack(%p, %p)\n", DeviceNode, Context); - DPRINT("PDO 0x%p\n", DeviceNode->PhysicalDeviceObject); - - ParentDeviceNode = (PDEVICE_NODE)Context; - - /* - * We are called for the parent too, but we don't need to do special - * handling for this node - */ - - if (DeviceNode == ParentDeviceNode) - { - DPRINT("Success\n"); - return STATUS_SUCCESS; - } - - /* - * Make sure this device node is a direct child of the parent device node - * that is given as an argument - */ - - if (DeviceNode->Parent != ParentDeviceNode) - { - DPRINT("Skipping 2+ level child\n"); - return STATUS_SUCCESS; - } - - /* Skip processing if it was already completed before */ - if (DeviceNode->Flags & DNF_PROCESSED) - { - /* Nothing to do */ - return STATUS_SUCCESS; - } - - /* Get Locale ID */ - Status = ZwQueryDefaultLocale(FALSE, &LocaleId); - if (!NT_SUCCESS(Status)) - { - DPRINT1("ZwQueryDefaultLocale() failed with status 0x%lx\n", Status); - return Status; - } - - /* - * FIXME: For critical errors, cleanup and disable device, but always - * return STATUS_SUCCESS. - */ - - DPRINT("Sending IRP_MN_QUERY_ID.BusQueryDeviceID to device stack\n"); - - Stack.Parameters.QueryId.IdType = BusQueryDeviceID; - Status = IopInitiatePnpIrp(DeviceNode->PhysicalDeviceObject, - &IoStatusBlock, - IRP_MN_QUERY_ID, - &Stack); - if (NT_SUCCESS(Status)) - { - /* Copy the device id string */ - wcscpy(InstancePath, (PWSTR)IoStatusBlock.Information); - - /* - * FIXME: Check for valid characters, if there is invalid characters - * then bugcheck. - */ - } - else - { - DPRINT1("IopInitiatePnpIrp() failed (Status %x)\n", Status); - - /* We have to return success otherwise we abort the traverse operation */ - return STATUS_SUCCESS; - } - - DPRINT("Sending IRP_MN_QUERY_CAPABILITIES to device stack (after enumeration)\n"); - - Status = IopQueryDeviceCapabilities(DeviceNode, &DeviceCapabilities); - if (!NT_SUCCESS(Status)) - { - DPRINT1("IopInitiatePnpIrp() failed (Status 0x%08lx)\n", Status); - - /* We have to return success otherwise we abort the traverse operation */ - return STATUS_SUCCESS; - } - - /* This bit is only check after enumeration */ - if (DeviceCapabilities.HardwareDisabled) - { - /* FIXME: Cleanup device */ - DeviceNode->Flags |= DNF_DISABLED; - return STATUS_SUCCESS; - } - else - DeviceNode->Flags &= ~DNF_DISABLED; - - if (!DeviceCapabilities.UniqueID) - { - /* Device has not a unique ID. We need to prepend parent bus unique identifier */ - DPRINT("Instance ID is not unique\n"); - Status = IopGetParentIdPrefix(DeviceNode, &ParentIdPrefix); - if (!NT_SUCCESS(Status)) - { - DPRINT1("IopGetParentIdPrefix() failed (Status 0x%08lx)\n", Status); - - /* We have to return success otherwise we abort the traverse operation */ - return STATUS_SUCCESS; - } - } - - DPRINT("Sending IRP_MN_QUERY_ID.BusQueryInstanceID to device stack\n"); - - Stack.Parameters.QueryId.IdType = BusQueryInstanceID; - Status = IopInitiatePnpIrp(DeviceNode->PhysicalDeviceObject, - &IoStatusBlock, - IRP_MN_QUERY_ID, - &Stack); - if (NT_SUCCESS(Status)) - { - /* Append the instance id string */ - wcscat(InstancePath, L"\\"); - if (ParentIdPrefix.Length > 0) - { - /* Add information from parent bus device to InstancePath */ - wcscat(InstancePath, ParentIdPrefix.Buffer); - if (IoStatusBlock.Information && *(PWSTR)IoStatusBlock.Information) - wcscat(InstancePath, L"&"); - } - if (IoStatusBlock.Information) - wcscat(InstancePath, (PWSTR)IoStatusBlock.Information); - - /* - * FIXME: Check for valid characters, if there is invalid characters - * then bugcheck - */ - } - else - { - DPRINT("IopInitiatePnpIrp() failed (Status %x)\n", Status); - } - RtlFreeUnicodeString(&ParentIdPrefix); - - if (!RtlCreateUnicodeString(&InstancePathU, InstancePath)) - { - DPRINT("No resources\n"); - /* FIXME: Cleanup and disable device */ - } - - /* Verify that this is not a duplicate */ - OldDeviceObject = IopGetDeviceObjectFromDeviceInstance(&InstancePathU); - if (OldDeviceObject != NULL) - { - PDEVICE_NODE OldDeviceNode = IopGetDeviceNode(OldDeviceObject); - - DPRINT1("Duplicate device instance '%wZ'\n", &InstancePathU); - DPRINT1("Current instance parent: '%wZ'\n", &DeviceNode->Parent->InstancePath); - DPRINT1("Old instance parent: '%wZ'\n", &OldDeviceNode->Parent->InstancePath); - - KeBugCheckEx(PNP_DETECTED_FATAL_ERROR, - 0x01, - (ULONG_PTR)DeviceNode->PhysicalDeviceObject, - (ULONG_PTR)OldDeviceObject, - 0); - } - - DeviceNode->InstancePath = InstancePathU; - - DPRINT("InstancePath is %S\n", DeviceNode->InstancePath.Buffer); - - /* - * Create registry key for the instance id, if it doesn't exist yet - */ - Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath, 0, &InstanceKey); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to create the instance key! (Status %lx)\n", Status); - - /* We have to return success otherwise we abort the traverse operation */ - return STATUS_SUCCESS; - } - - IopQueryHardwareIds(DeviceNode, InstanceKey); - - IopQueryCompatibleIds(DeviceNode, InstanceKey); - - DPRINT("Sending IRP_MN_QUERY_DEVICE_TEXT.DeviceTextDescription to device stack\n"); - - Stack.Parameters.QueryDeviceText.DeviceTextType = DeviceTextDescription; - Stack.Parameters.QueryDeviceText.LocaleId = LocaleId; - Status = IopInitiatePnpIrp( - DeviceNode->PhysicalDeviceObject, - &IoStatusBlock, - IRP_MN_QUERY_DEVICE_TEXT, - &Stack); - /* This key is mandatory, so even if the Irp fails, we still write it */ - RtlInitUnicodeString(&ValueName, L"DeviceDesc"); - if (ZwQueryValueKey(InstanceKey, &ValueName, KeyValueBasicInformation, NULL, 0, &RequiredLength) == STATUS_OBJECT_NAME_NOT_FOUND) - { - if (NT_SUCCESS(Status) && - IoStatusBlock.Information && - (*(PWSTR)IoStatusBlock.Information != 0)) - { - /* This key is overriden when a driver is installed. Don't write the - * new description if another one already exists */ - Status = ZwSetValueKey(InstanceKey, - &ValueName, - 0, - REG_SZ, - (PVOID)IoStatusBlock.Information, - ((ULONG)wcslen((PWSTR)IoStatusBlock.Information) + 1) * sizeof(WCHAR)); - } - else - { - UNICODE_STRING DeviceDesc = RTL_CONSTANT_STRING(L"Unknown device"); - DPRINT("Driver didn't return DeviceDesc (Status 0x%08lx), so place unknown device there\n", Status); - - Status = ZwSetValueKey(InstanceKey, - &ValueName, - 0, - REG_SZ, - DeviceDesc.Buffer, - DeviceDesc.MaximumLength); - - if (!NT_SUCCESS(Status)) - { - DPRINT1("ZwSetValueKey() failed (Status 0x%lx)\n", Status); - } - - } - } - - DPRINT("Sending IRP_MN_QUERY_DEVICE_TEXT.DeviceTextLocation to device stack\n"); - - Stack.Parameters.QueryDeviceText.DeviceTextType = DeviceTextLocationInformation; - Stack.Parameters.QueryDeviceText.LocaleId = LocaleId; - Status = IopInitiatePnpIrp( - DeviceNode->PhysicalDeviceObject, - &IoStatusBlock, - IRP_MN_QUERY_DEVICE_TEXT, - &Stack); - if (NT_SUCCESS(Status) && IoStatusBlock.Information) - { - DPRINT("LocationInformation: %S\n", (PWSTR)IoStatusBlock.Information); - RtlInitUnicodeString(&ValueName, L"LocationInformation"); - Status = ZwSetValueKey(InstanceKey, - &ValueName, - 0, - REG_SZ, - (PVOID)IoStatusBlock.Information, - ((ULONG)wcslen((PWSTR)IoStatusBlock.Information) + 1) * sizeof(WCHAR)); - if (!NT_SUCCESS(Status)) - { - DPRINT1("ZwSetValueKey() failed (Status %lx)\n", Status); - } - } - else - { - DPRINT("IopInitiatePnpIrp() failed (Status %x) or IoStatusBlock.Information=NULL\n", Status); - } - - DPRINT("Sending IRP_MN_QUERY_BUS_INFORMATION to device stack\n"); - - Status = IopInitiatePnpIrp( - DeviceNode->PhysicalDeviceObject, - &IoStatusBlock, - IRP_MN_QUERY_BUS_INFORMATION, - NULL); - if (NT_SUCCESS(Status) && IoStatusBlock.Information) - { - PPNP_BUS_INFORMATION BusInformation = - (PPNP_BUS_INFORMATION)IoStatusBlock.Information; - - DeviceNode->ChildBusNumber = BusInformation->BusNumber; - DeviceNode->ChildInterfaceType = BusInformation->LegacyBusType; - DeviceNode->ChildBusTypeIndex = IopGetBusTypeGuidIndex(&BusInformation->BusTypeGuid); - ExFreePool(BusInformation); - } - else - { - DPRINT("IopInitiatePnpIrp() failed (Status %x) or IoStatusBlock.Information=NULL\n", Status); - - DeviceNode->ChildBusNumber = 0xFFFFFFF0; - DeviceNode->ChildInterfaceType = InterfaceTypeUndefined; - DeviceNode->ChildBusTypeIndex = -1; - } - - DPRINT("Sending IRP_MN_QUERY_RESOURCES to device stack\n"); - - Status = IopInitiatePnpIrp( - DeviceNode->PhysicalDeviceObject, - &IoStatusBlock, - IRP_MN_QUERY_RESOURCES, - NULL); - if (NT_SUCCESS(Status) && IoStatusBlock.Information) - { - DeviceNode->BootResources = - (PCM_RESOURCE_LIST)IoStatusBlock.Information; - IopDeviceNodeSetFlag(DeviceNode, DNF_HAS_BOOT_CONFIG); - } - else - { - DPRINT("IopInitiatePnpIrp() failed (Status %x) or IoStatusBlock.Information=NULL\n", Status); - DeviceNode->BootResources = NULL; - } - - DPRINT("Sending IRP_MN_QUERY_RESOURCE_REQUIREMENTS to device stack\n"); - - Status = IopInitiatePnpIrp( - DeviceNode->PhysicalDeviceObject, - &IoStatusBlock, - IRP_MN_QUERY_RESOURCE_REQUIREMENTS, - NULL); - if (NT_SUCCESS(Status)) - { - DeviceNode->ResourceRequirements = - (PIO_RESOURCE_REQUIREMENTS_LIST)IoStatusBlock.Information; - } - else - { - DPRINT("IopInitiatePnpIrp() failed (Status %08lx)\n", Status); - DeviceNode->ResourceRequirements = NULL; - } - - if (InstanceKey != NULL) - { - IopSetDeviceInstanceData(InstanceKey, DeviceNode); - } - - ZwClose(InstanceKey); - - IopDeviceNodeSetFlag(DeviceNode, DNF_PROCESSED); - - if (!IopDeviceNodeHasFlag(DeviceNode, DNF_LEGACY_DRIVER)) - { - /* Report the device to the user-mode pnp manager */ - IopQueueTargetDeviceEvent(&GUID_DEVICE_ENUMERATED, - &DeviceNode->InstancePath); - } - - return STATUS_SUCCESS; + IO_STATUS_BLOCK IoStatusBlock; + PDEVICE_NODE ParentDeviceNode; + WCHAR InstancePath[MAX_PATH]; + IO_STACK_LOCATION Stack; + NTSTATUS Status; + ULONG RequiredLength; + LCID LocaleId; + HANDLE InstanceKey = NULL; + UNICODE_STRING ValueName; + UNICODE_STRING ParentIdPrefix = { 0, 0, NULL }; + UNICODE_STRING InstancePathU; + DEVICE_CAPABILITIES DeviceCapabilities; + PDEVICE_OBJECT OldDeviceObject; + + DPRINT("IopActionInterrogateDeviceStack(%p, %p)\n", DeviceNode, Context); + DPRINT("PDO 0x%p\n", DeviceNode->PhysicalDeviceObject); + + ParentDeviceNode = (PDEVICE_NODE)Context; + + /* + * We are called for the parent too, but we don't need to do special + * handling for this node + */ + if (DeviceNode == ParentDeviceNode) + { + DPRINT("Success\n"); + return STATUS_SUCCESS; + } + + /* + * Make sure this device node is a direct child of the parent device node + * that is given as an argument + */ + if (DeviceNode->Parent != ParentDeviceNode) + { + DPRINT("Skipping 2+ level child\n"); + return STATUS_SUCCESS; + } + + /* Skip processing if it was already completed before */ + if (DeviceNode->Flags & DNF_PROCESSED) + { + /* Nothing to do */ + return STATUS_SUCCESS; + } + + /* Get Locale ID */ + Status = ZwQueryDefaultLocale(FALSE, &LocaleId); + if (!NT_SUCCESS(Status)) + { + DPRINT1("ZwQueryDefaultLocale() failed with status 0x%lx\n", Status); + return Status; + } + + /* + * FIXME: For critical errors, cleanup and disable device, but always + * return STATUS_SUCCESS. + */ + + DPRINT("Sending IRP_MN_QUERY_ID.BusQueryDeviceID to device stack\n"); + + Stack.Parameters.QueryId.IdType = BusQueryDeviceID; + Status = IopInitiatePnpIrp(DeviceNode->PhysicalDeviceObject, + &IoStatusBlock, + IRP_MN_QUERY_ID, + &Stack); + if (NT_SUCCESS(Status)) + { + /* Copy the device id string */ + wcscpy(InstancePath, (PWSTR)IoStatusBlock.Information); + + /* + * FIXME: Check for valid characters, if there is invalid characters + * then bugcheck. + */ + } + else + { + DPRINT1("IopInitiatePnpIrp() failed (Status %x)\n", Status); + + /* We have to return success otherwise we abort the traverse operation */ + return STATUS_SUCCESS; + } + + DPRINT("Sending IRP_MN_QUERY_CAPABILITIES to device stack (after enumeration)\n"); + + Status = IopQueryDeviceCapabilities(DeviceNode, &DeviceCapabilities); + if (!NT_SUCCESS(Status)) + { + DPRINT1("IopInitiatePnpIrp() failed (Status 0x%08lx)\n", Status); + + /* We have to return success otherwise we abort the traverse operation */ + return STATUS_SUCCESS; + } + + /* This bit is only check after enumeration */ + if (DeviceCapabilities.HardwareDisabled) + { + /* FIXME: Cleanup device */ + DeviceNode->Flags |= DNF_DISABLED; + return STATUS_SUCCESS; + } + else + { + DeviceNode->Flags &= ~DNF_DISABLED; + } + + if (!DeviceCapabilities.UniqueID) + { + /* Device has not a unique ID. We need to prepend parent bus unique identifier */ + DPRINT("Instance ID is not unique\n"); + Status = IopGetParentIdPrefix(DeviceNode, &ParentIdPrefix); + if (!NT_SUCCESS(Status)) + { + DPRINT1("IopGetParentIdPrefix() failed (Status 0x%08lx)\n", Status); + + /* We have to return success otherwise we abort the traverse operation */ + return STATUS_SUCCESS; + } + } + + DPRINT("Sending IRP_MN_QUERY_ID.BusQueryInstanceID to device stack\n"); + + Stack.Parameters.QueryId.IdType = BusQueryInstanceID; + Status = IopInitiatePnpIrp(DeviceNode->PhysicalDeviceObject, + &IoStatusBlock, + IRP_MN_QUERY_ID, + &Stack); + if (NT_SUCCESS(Status)) + { + /* Append the instance id string */ + wcscat(InstancePath, L"\\"); + if (ParentIdPrefix.Length > 0) + { + /* Add information from parent bus device to InstancePath */ + wcscat(InstancePath, ParentIdPrefix.Buffer); + if (IoStatusBlock.Information && *(PWSTR)IoStatusBlock.Information) + { + wcscat(InstancePath, L"&"); + } + } + if (IoStatusBlock.Information) + { + wcscat(InstancePath, (PWSTR)IoStatusBlock.Information); + } + + /* + * FIXME: Check for valid characters, if there is invalid characters + * then bugcheck + */ + } + else + { + DPRINT("IopInitiatePnpIrp() failed (Status %x)\n", Status); + } + RtlFreeUnicodeString(&ParentIdPrefix); + + if (!RtlCreateUnicodeString(&InstancePathU, InstancePath)) + { + DPRINT("No resources\n"); + /* FIXME: Cleanup and disable device */ + } + + /* Verify that this is not a duplicate */ + OldDeviceObject = IopGetDeviceObjectFromDeviceInstance(&InstancePathU); + if (OldDeviceObject != NULL) + { + PDEVICE_NODE OldDeviceNode = IopGetDeviceNode(OldDeviceObject); + + DPRINT1("Duplicate device instance '%wZ'\n", &InstancePathU); + DPRINT1("Current instance parent: '%wZ'\n", &DeviceNode->Parent->InstancePath); + DPRINT1("Old instance parent: '%wZ'\n", &OldDeviceNode->Parent->InstancePath); + + KeBugCheckEx(PNP_DETECTED_FATAL_ERROR, + 0x01, + (ULONG_PTR)DeviceNode->PhysicalDeviceObject, + (ULONG_PTR)OldDeviceObject, + 0); + } + + DeviceNode->InstancePath = InstancePathU; + + DPRINT("InstancePath is %S\n", DeviceNode->InstancePath.Buffer); + + /* + * Create registry key for the instance id, if it doesn't exist yet + */ + Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath, 0, &InstanceKey); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to create the instance key! (Status %lx)\n", Status); + + /* We have to return success otherwise we abort the traverse operation */ + return STATUS_SUCCESS; + } + + IopQueryHardwareIds(DeviceNode, InstanceKey); + + IopQueryCompatibleIds(DeviceNode, InstanceKey); + + DPRINT("Sending IRP_MN_QUERY_DEVICE_TEXT.DeviceTextDescription to device stack\n"); + + Stack.Parameters.QueryDeviceText.DeviceTextType = DeviceTextDescription; + Stack.Parameters.QueryDeviceText.LocaleId = LocaleId; + Status = IopInitiatePnpIrp(DeviceNode->PhysicalDeviceObject, + &IoStatusBlock, + IRP_MN_QUERY_DEVICE_TEXT, + &Stack); + /* This key is mandatory, so even if the Irp fails, we still write it */ + RtlInitUnicodeString(&ValueName, L"DeviceDesc"); + if (ZwQueryValueKey(InstanceKey, &ValueName, KeyValueBasicInformation, NULL, 0, &RequiredLength) == STATUS_OBJECT_NAME_NOT_FOUND) + { + if (NT_SUCCESS(Status) && + IoStatusBlock.Information && + (*(PWSTR)IoStatusBlock.Information != 0)) + { + /* This key is overriden when a driver is installed. Don't write the + * new description if another one already exists */ + Status = ZwSetValueKey(InstanceKey, + &ValueName, + 0, + REG_SZ, + (PVOID)IoStatusBlock.Information, + ((ULONG)wcslen((PWSTR)IoStatusBlock.Information) + 1) * sizeof(WCHAR)); + } + else + { + UNICODE_STRING DeviceDesc = RTL_CONSTANT_STRING(L"Unknown device"); + DPRINT("Driver didn't return DeviceDesc (Status 0x%08lx), so place unknown device there\n", Status); + + Status = ZwSetValueKey(InstanceKey, + &ValueName, + 0, + REG_SZ, + DeviceDesc.Buffer, + DeviceDesc.MaximumLength); + if (!NT_SUCCESS(Status)) + { + DPRINT1("ZwSetValueKey() failed (Status 0x%lx)\n", Status); + } + + } + } + + DPRINT("Sending IRP_MN_QUERY_DEVICE_TEXT.DeviceTextLocation to device stack\n"); + + Stack.Parameters.QueryDeviceText.DeviceTextType = DeviceTextLocationInformation; + Stack.Parameters.QueryDeviceText.LocaleId = LocaleId; + Status = IopInitiatePnpIrp(DeviceNode->PhysicalDeviceObject, + &IoStatusBlock, + IRP_MN_QUERY_DEVICE_TEXT, + &Stack); + if (NT_SUCCESS(Status) && IoStatusBlock.Information) + { + DPRINT("LocationInformation: %S\n", (PWSTR)IoStatusBlock.Information); + RtlInitUnicodeString(&ValueName, L"LocationInformation"); + Status = ZwSetValueKey(InstanceKey, + &ValueName, + 0, + REG_SZ, + (PVOID)IoStatusBlock.Information, + ((ULONG)wcslen((PWSTR)IoStatusBlock.Information) + 1) * sizeof(WCHAR)); + if (!NT_SUCCESS(Status)) + { + DPRINT1("ZwSetValueKey() failed (Status %lx)\n", Status); + } + } + else + { + DPRINT("IopInitiatePnpIrp() failed (Status %x) or IoStatusBlock.Information=NULL\n", Status); + } + + DPRINT("Sending IRP_MN_QUERY_BUS_INFORMATION to device stack\n"); + + Status = IopInitiatePnpIrp(DeviceNode->PhysicalDeviceObject, + &IoStatusBlock, + IRP_MN_QUERY_BUS_INFORMATION, + NULL); + if (NT_SUCCESS(Status) && IoStatusBlock.Information) + { + PPNP_BUS_INFORMATION BusInformation = (PPNP_BUS_INFORMATION)IoStatusBlock.Information; + + DeviceNode->ChildBusNumber = BusInformation->BusNumber; + DeviceNode->ChildInterfaceType = BusInformation->LegacyBusType; + DeviceNode->ChildBusTypeIndex = IopGetBusTypeGuidIndex(&BusInformation->BusTypeGuid); + ExFreePool(BusInformation); + } + else + { + DPRINT("IopInitiatePnpIrp() failed (Status %x) or IoStatusBlock.Information=NULL\n", Status); + + DeviceNode->ChildBusNumber = 0xFFFFFFF0; + DeviceNode->ChildInterfaceType = InterfaceTypeUndefined; + DeviceNode->ChildBusTypeIndex = -1; + } + + DPRINT("Sending IRP_MN_QUERY_RESOURCES to device stack\n"); + + Status = IopInitiatePnpIrp(DeviceNode->PhysicalDeviceObject, + &IoStatusBlock, + IRP_MN_QUERY_RESOURCES, + NULL); + if (NT_SUCCESS(Status) && IoStatusBlock.Information) + { + DeviceNode->BootResources = (PCM_RESOURCE_LIST)IoStatusBlock.Information; + IopDeviceNodeSetFlag(DeviceNode, DNF_HAS_BOOT_CONFIG); + } + else + { + DPRINT("IopInitiatePnpIrp() failed (Status %x) or IoStatusBlock.Information=NULL\n", Status); + DeviceNode->BootResources = NULL; + } + + DPRINT("Sending IRP_MN_QUERY_RESOURCE_REQUIREMENTS to device stack\n"); + + Status = IopInitiatePnpIrp(DeviceNode->PhysicalDeviceObject, + &IoStatusBlock, + IRP_MN_QUERY_RESOURCE_REQUIREMENTS, + NULL); + if (NT_SUCCESS(Status)) + { + DeviceNode->ResourceRequirements = (PIO_RESOURCE_REQUIREMENTS_LIST)IoStatusBlock.Information; + } + else + { + DPRINT("IopInitiatePnpIrp() failed (Status %08lx)\n", Status); + DeviceNode->ResourceRequirements = NULL; + } + + if (InstanceKey != NULL) + { + IopSetDeviceInstanceData(InstanceKey, DeviceNode); + } + + ZwClose(InstanceKey); + + IopDeviceNodeSetFlag(DeviceNode, DNF_PROCESSED); + + if (!IopDeviceNodeHasFlag(DeviceNode, DNF_LEGACY_DRIVER)) + { + /* Report the device to the user-mode pnp manager */ + IopQueueTargetDeviceEvent(&GUID_DEVICE_ENUMERATED, + &DeviceNode->InstancePath); + } + + return STATUS_SUCCESS; } static
7 years, 8 months
1
0
0
0
[jimtabor] 74015: [NtUser] - Move functions around.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Wed Mar 1 16:51:13 2017 New Revision: 74015 URL:
http://svn.reactos.org/svn/reactos?rev=74015&view=rev
Log: [NtUser] - Move functions around. Modified: trunk/reactos/win32ss/user/ntuser/winpos.c Modified: trunk/reactos/win32ss/user/ntuser/winpos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winpos…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] Wed Mar 1 16:51:13 2017 @@ -835,6 +835,1362 @@ Window->InternalPos.flags |= WPF_MININIT; TRACE("Position is set! X:%d Y:%d\n",Pos->x,Pos->y); return; +} + +BOOL +UserHasWindowEdge(DWORD Style, DWORD ExStyle) +{ + if (Style & WS_MINIMIZE) + return TRUE; + if (ExStyle & WS_EX_DLGMODALFRAME) + return TRUE; + if (ExStyle & WS_EX_STATICEDGE) + return FALSE; + if (Style & WS_THICKFRAME) + return TRUE; + Style &= WS_CAPTION; + if (Style == WS_DLGFRAME || Style == WS_CAPTION) + return TRUE; + return FALSE; +} + +VOID FASTCALL +IntGetWindowBorderMeasures(PWND Wnd, UINT *cx, UINT *cy) +{ + if(HAS_DLGFRAME(Wnd->style, Wnd->ExStyle) && !(Wnd->style & WS_MINIMIZE)) + { + *cx = UserGetSystemMetrics(SM_CXDLGFRAME); + *cy = UserGetSystemMetrics(SM_CYDLGFRAME); + } + else + { + if(HAS_THICKFRAME(Wnd->style, Wnd->ExStyle)&& !(Wnd->style & WS_MINIMIZE)) + { + *cx = UserGetSystemMetrics(SM_CXFRAME); + *cy = UserGetSystemMetrics(SM_CYFRAME); + } + else if(HAS_THINFRAME(Wnd->style, Wnd->ExStyle)) + { + *cx = UserGetSystemMetrics(SM_CXBORDER); + *cy = UserGetSystemMetrics(SM_CYBORDER); + } + else + { + *cx = *cy = 0; + } + } +} + +VOID +UserGetWindowBorders(DWORD Style, DWORD ExStyle, SIZE *Size, BOOL WithClient) +{ + DWORD Border = 0; + + if (UserHasWindowEdge(Style, ExStyle)) + Border += 2; + else if (ExStyle & WS_EX_STATICEDGE) + Border += 1; + if ((ExStyle & WS_EX_CLIENTEDGE) && WithClient) + Border += 2; + if (Style & WS_CAPTION || ExStyle & WS_EX_DLGMODALFRAME) + Border ++; + Size->cx = Size->cy = Border; + if ((Style & WS_THICKFRAME) && !(Style & WS_MINIMIZE)) + { + Size->cx += UserGetSystemMetrics(SM_CXFRAME) - UserGetSystemMetrics(SM_CXDLGFRAME); + Size->cy += UserGetSystemMetrics(SM_CYFRAME) - UserGetSystemMetrics(SM_CYDLGFRAME); + } + Size->cx *= UserGetSystemMetrics(SM_CXBORDER); + Size->cy *= UserGetSystemMetrics(SM_CYBORDER); +} + +BOOL WINAPI +UserAdjustWindowRectEx(LPRECT lpRect, + DWORD dwStyle, + BOOL bMenu, + DWORD dwExStyle) +{ + SIZE BorderSize; + + if (bMenu) + { + lpRect->top -= UserGetSystemMetrics(SM_CYMENU); + } + if ((dwStyle & WS_CAPTION) == WS_CAPTION) + { + if (dwExStyle & WS_EX_TOOLWINDOW) + lpRect->top -= UserGetSystemMetrics(SM_CYSMCAPTION); + else + lpRect->top -= UserGetSystemMetrics(SM_CYCAPTION); + } + UserGetWindowBorders(dwStyle, dwExStyle, &BorderSize, TRUE); + RECTL_vInflateRect( + lpRect, + BorderSize.cx, + BorderSize.cy); + + return TRUE; +} + +UINT FASTCALL +co_WinPosGetMinMaxInfo(PWND Window, POINT* MaxSize, POINT* MaxPos, + POINT* MinTrack, POINT* MaxTrack) +{ + MINMAXINFO MinMax; + PMONITOR monitor; + INT xinc, yinc; + LONG style = Window->style; + LONG adjustedStyle; + LONG exstyle = Window->ExStyle; + RECT rc; + + ASSERT_REFS_CO(Window); + + /* Compute default values */ + + rc = Window->rcWindow; + MinMax.ptReserved.x = rc.left; + MinMax.ptReserved.y = rc.top; + + if ((style & WS_CAPTION) == WS_CAPTION) + adjustedStyle = style & ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */ + else + adjustedStyle = style; + + if(Window->spwndParent) + IntGetClientRect(Window->spwndParent, &rc); + UserAdjustWindowRectEx(&rc, adjustedStyle, ((style & WS_POPUP) && Window->IDMenu), exstyle); + + xinc = -rc.left; + yinc = -rc.top; + + MinMax.ptMaxSize.x = rc.right - rc.left; + MinMax.ptMaxSize.y = rc.bottom - rc.top; + if (style & (WS_DLGFRAME | WS_BORDER)) + { + MinMax.ptMinTrackSize.x = UserGetSystemMetrics(SM_CXMINTRACK); + MinMax.ptMinTrackSize.y = UserGetSystemMetrics(SM_CYMINTRACK); + } + else + { + MinMax.ptMinTrackSize.x = 2 * xinc; + MinMax.ptMinTrackSize.y = 2 * yinc; + } + MinMax.ptMaxTrackSize.x = UserGetSystemMetrics(SM_CXMAXTRACK); + MinMax.ptMaxTrackSize.y = UserGetSystemMetrics(SM_CYMAXTRACK); + MinMax.ptMaxPosition.x = -xinc; + MinMax.ptMaxPosition.y = -yinc; + + if (!EMPTYPOINT(Window->InternalPos.MaxPos)) MinMax.ptMaxPosition = Window->InternalPos.MaxPos; + + co_IntSendMessage(Window->head.h, WM_GETMINMAXINFO, 0, (LPARAM)&MinMax); + + /* if the app didn't change the values, adapt them for the current monitor */ + if ((monitor = UserGetPrimaryMonitor())) + { + RECT rc_work; + + rc_work = monitor->rcMonitor; + + if (style & WS_MAXIMIZEBOX) + { + if ((style & WS_CAPTION) == WS_CAPTION || !(style & (WS_CHILD | WS_POPUP))) + rc_work = monitor->rcWork; + } + + if (MinMax.ptMaxSize.x == UserGetSystemMetrics(SM_CXSCREEN) + 2 * xinc && + MinMax.ptMaxSize.y == UserGetSystemMetrics(SM_CYSCREEN) + 2 * yinc) + { + MinMax.ptMaxSize.x = (rc_work.right - rc_work.left) + 2 * xinc; + MinMax.ptMaxSize.y = (rc_work.bottom - rc_work.top) + 2 * yinc; + } + if (MinMax.ptMaxPosition.x == -xinc && MinMax.ptMaxPosition.y == -yinc) + { + MinMax.ptMaxPosition.x = rc_work.left - xinc; + MinMax.ptMaxPosition.y = rc_work.top - yinc; + } + if (MinMax.ptMaxSize.x >= (monitor->rcMonitor.right - monitor->rcMonitor.left) && + MinMax.ptMaxSize.y >= (monitor->rcMonitor.bottom - monitor->rcMonitor.top) ) + Window->state |= WNDS_MAXIMIZESTOMONITOR; + else + Window->state &= ~WNDS_MAXIMIZESTOMONITOR; + } + + + MinMax.ptMaxTrackSize.x = max(MinMax.ptMaxTrackSize.x, + MinMax.ptMinTrackSize.x); + MinMax.ptMaxTrackSize.y = max(MinMax.ptMaxTrackSize.y, + MinMax.ptMinTrackSize.y); + + if (MaxSize) + *MaxSize = MinMax.ptMaxSize; + if (MaxPos) + *MaxPos = MinMax.ptMaxPosition; + if (MinTrack) + *MinTrack = MinMax.ptMinTrackSize; + if (MaxTrack) + *MaxTrack = MinMax.ptMaxTrackSize; + + return 0; // FIXME: What does it return? +} + +static +BOOL +IntValidateParent(PWND Child, PREGION ValidateRgn) +{ + PWND ParentWnd = Child; + + if (ParentWnd->style & WS_CHILD) + { + do + ParentWnd = ParentWnd->spwndParent; + while (ParentWnd->style & WS_CHILD); + } + + ParentWnd = Child->spwndParent; + while (ParentWnd) + { + if (ParentWnd->style & WS_CLIPCHILDREN) + break; + + if (ParentWnd->hrgnUpdate != 0) + { + IntInvalidateWindows( ParentWnd, + ValidateRgn, + RDW_VALIDATE | RDW_NOCHILDREN); + } + + ParentWnd = ParentWnd->spwndParent; + } + + return TRUE; +} + +static +VOID FASTCALL +FixClientRect(PRECTL ClientRect, PRECTL WindowRect) +{ + if (ClientRect->left < WindowRect->left) + { + ClientRect->left = WindowRect->left; + } + else if (WindowRect->right < ClientRect->left) + { + ClientRect->left = WindowRect->right; + } + if (ClientRect->right < WindowRect->left) + { + ClientRect->right = WindowRect->left; + } + else if (WindowRect->right < ClientRect->right) + { + ClientRect->right = WindowRect->right; + } + if (ClientRect->top < WindowRect->top) + { + ClientRect->top = WindowRect->top; + } + else if (WindowRect->bottom < ClientRect->top) + { + ClientRect->top = WindowRect->bottom; + } + if (ClientRect->bottom < WindowRect->top) + { + ClientRect->bottom = WindowRect->top; + } + else if (WindowRect->bottom < ClientRect->bottom) + { + ClientRect->bottom = WindowRect->bottom; + } +} +/*********************************************************************** + * get_valid_rects + * + * Compute the valid rects from the old and new client rect and WVR_* flags. + * Helper for WM_NCCALCSIZE handling. + */ +static +VOID FASTCALL +get_valid_rects( RECTL *old_client, RECTL *new_client, UINT flags, RECTL *valid ) +{ + int cx, cy; + + if (flags & WVR_REDRAW) + { + RECTL_vSetEmptyRect( &valid[0] ); + RECTL_vSetEmptyRect( &valid[1] ); + return; + } + + if (flags & WVR_VALIDRECTS) + { + if (!RECTL_bIntersectRect( &valid[0], &valid[0], new_client ) || + !RECTL_bIntersectRect( &valid[1], &valid[1], old_client )) + { + RECTL_vSetEmptyRect( &valid[0] ); + RECTL_vSetEmptyRect( &valid[1] ); + return; + } + flags = WVR_ALIGNLEFT | WVR_ALIGNTOP; + } + else + { + valid[0] = *new_client; + valid[1] = *old_client; + } + + /* make sure the rectangles have the same size */ + cx = min( valid[0].right - valid[0].left, valid[1].right - valid[1].left ); + cy = min( valid[0].bottom - valid[0].top, valid[1].bottom - valid[1].top ); + + if (flags & WVR_ALIGNBOTTOM) + { + valid[0].top = valid[0].bottom - cy; + valid[1].top = valid[1].bottom - cy; + } + else + { + valid[0].bottom = valid[0].top + cy; + valid[1].bottom = valid[1].top + cy; + } + if (flags & WVR_ALIGNRIGHT) + { + valid[0].left = valid[0].right - cx; + valid[1].left = valid[1].right - cx; + } + else + { + valid[0].right = valid[0].left + cx; + valid[1].right = valid[1].left + cx; + } +} + +static +LONG FASTCALL +co_WinPosDoNCCALCSize(PWND Window, PWINDOWPOS WinPos, RECTL* WindowRect, RECTL* ClientRect, RECTL* validRects) +{ + PWND Parent; + UINT wvrFlags = 0; + + ASSERT_REFS_CO(Window); + + /* Send WM_NCCALCSIZE message to get new client area */ + if ((WinPos->flags & (SWP_FRAMECHANGED | SWP_NOSIZE)) != SWP_NOSIZE) + { + NCCALCSIZE_PARAMS params; + WINDOWPOS winposCopy; + + params.rgrc[0] = *WindowRect; // new coordinates of a window that has been moved or resized + params.rgrc[1] = Window->rcWindow; // window before it was moved or resized + params.rgrc[2] = Window->rcClient; // client area before the window was moved or resized + + Parent = Window->spwndParent; + if (0 != (Window->style & WS_CHILD) && Parent) + { + RECTL_vOffsetRect(&(params.rgrc[0]), - Parent->rcClient.left, - Parent->rcClient.top); + RECTL_vOffsetRect(&(params.rgrc[1]), - Parent->rcClient.left, - Parent->rcClient.top); + RECTL_vOffsetRect(&(params.rgrc[2]), - Parent->rcClient.left, - Parent->rcClient.top); + } + + params.lppos = &winposCopy; + winposCopy = *WinPos; + + wvrFlags = co_IntSendMessage(Window->head.h, WM_NCCALCSIZE, TRUE, (LPARAM) ¶ms); + + /* 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) + { + *ClientRect = params.rgrc[0]; // First rectangle contains the coordinates of the new client rectangle resulting from the move or resize + if ((Window->style & WS_CHILD) && Parent) + { + RECTL_vOffsetRect(ClientRect, Parent->rcClient.left, Parent->rcClient.top); + } + FixClientRect(ClientRect, WindowRect); + } + + if (ClientRect->left != Window->rcClient.left || + ClientRect->top != Window->rcClient.top) + { + WinPos->flags &= ~SWP_NOCLIENTMOVE; + } + + if (ClientRect->right - ClientRect->left != Window->rcClient.right - Window->rcClient.left) + { + WinPos->flags &= ~SWP_NOCLIENTSIZE; + } + else + wvrFlags &= ~WVR_HREDRAW; + + if (ClientRect->bottom - ClientRect->top != Window->rcClient.bottom - Window->rcClient.top) + { + WinPos->flags &= ~SWP_NOCLIENTSIZE; + } + else + wvrFlags &= ~WVR_VREDRAW; + + validRects[0] = params.rgrc[1]; // second rectangle contains the valid destination rectangle + validRects[1] = params.rgrc[2]; // third rectangle contains the valid source rectangle + } + else + { + if (!(WinPos->flags & SWP_NOMOVE) && + (ClientRect->left != Window->rcClient.left || + ClientRect->top != Window->rcClient.top)) + { + WinPos->flags &= ~SWP_NOCLIENTMOVE; + } + } + + if (WinPos->flags & (SWP_NOCOPYBITS | SWP_NOREDRAW | SWP_SHOWWINDOW | SWP_HIDEWINDOW)) + { + RECTL_vSetEmptyRect( &validRects[0] ); + RECTL_vSetEmptyRect( &validRects[1] ); + } + else get_valid_rects( &Window->rcClient, ClientRect, wvrFlags, validRects ); + + return wvrFlags; +} + +static +BOOL FASTCALL +co_WinPosDoWinPosChanging(PWND Window, + PWINDOWPOS WinPos, + PRECTL WindowRect, + PRECTL ClientRect) +{ + ASSERT_REFS_CO(Window); + + /* Send WM_WINDOWPOSCHANGING message */ + + if (!(WinPos->flags & SWP_NOSENDCHANGING)) + { + TRACE("Sending WM_WINDOWPOSCHANGING to hwnd %p flags %04x.\n", Window->head.h,WinPos->flags); + co_IntSendMessage(Window->head.h, WM_WINDOWPOSCHANGING, 0, (LPARAM) WinPos); + } + + /* Calculate new position and size */ + + *WindowRect = Window->rcWindow; + *ClientRect = (Window->style & WS_MINIMIZE) ? Window->rcWindow : Window->rcClient; + + if (!(WinPos->flags & SWP_NOSIZE)) + { + if (Window->style & WS_MINIMIZE) + { + WindowRect->right = WindowRect->left + UserGetSystemMetrics(SM_CXMINIMIZED); + WindowRect->bottom = WindowRect->top + UserGetSystemMetrics(SM_CYMINIMIZED); + } + else + { + WindowRect->right = WindowRect->left + WinPos->cx; + WindowRect->bottom = WindowRect->top + WinPos->cy; + } + } + + if (!(WinPos->flags & SWP_NOMOVE)) + { + INT X, Y; + PWND Parent; + X = WinPos->x; + Y = WinPos->y; + + Parent = Window->spwndParent; + + // Parent child position issue is in here. SetParent_W7 test CORE-6651. + if (//((Window->style & WS_CHILD) != 0) && <- Fixes wine msg test_SetParent: "rects do not match", the last test. + Parent && + Parent != Window->head.rpdesk->pDeskInfo->spwnd) + { + TRACE("Not SWP_NOMOVE 1 Parent client offset X %d Y %d\n",X,Y); + X += Parent->rcClient.left; + Y += Parent->rcClient.top; + TRACE("Not SWP_NOMOVE 2 Parent client offset X %d Y %d\n",X,Y); + } + + WindowRect->left = X; + WindowRect->top = Y; + WindowRect->right += X - Window->rcWindow.left; + WindowRect->bottom += Y - Window->rcWindow.top; + + RECTL_vOffsetRect(ClientRect, X - Window->rcWindow.left, + Y - Window->rcWindow.top); + } + WinPos->flags |= SWP_NOCLIENTMOVE | SWP_NOCLIENTSIZE; + + TRACE( "hwnd %p, after %p, swp %d,%d %dx%d flags %08x\n", + WinPos->hwnd, WinPos->hwndInsertAfter, WinPos->x, WinPos->y, + WinPos->cx, WinPos->cy, WinPos->flags ); + TRACE("WindowRect: %d %d %d %d\n", WindowRect->left,WindowRect->top,WindowRect->right,WindowRect->bottom); + TRACE("ClientRect: %d %d %d %d\n", ClientRect->left,ClientRect->top,ClientRect->right,ClientRect->bottom); + + return TRUE; +} + +/* + * Fix Z order taking into account owned popups - + * basically we need to maintain them above the window that owns them + * + * FIXME: hide/show owned popups when owner visibility changes. + * + * ReactOS: See bug CORE-6129 and CORE-6554. + * + */ + //// + // Pass all the win:test_children/popup_zorder tests except "move hwnd_F and its popups down" which is if'ed out. + // Side effect, breaks more of the DeferWindowPos api tests, but wine breaks more!!!! +static +HWND FASTCALL +WinPosDoOwnedPopups(PWND Window, HWND hWndInsertAfter) +{ + HWND *List = NULL; + HWND Owner; + LONG Style; + PWND DesktopWindow, ChildObject; + int i; + + TRACE("(%p) hInsertAfter = %p\n", Window, hWndInsertAfter ); + + Style = Window->style; + + if (Style & WS_CHILD) + { + TRACE("Window is child\n"); + return hWndInsertAfter; + } + + Owner = Window->spwndOwner ? Window->spwndOwner->head.h : NULL; + + if (Owner) + { + /* Make sure this popup stays above the owner */ + + if (hWndInsertAfter != HWND_TOPMOST) + { + DesktopWindow = UserGetDesktopWindow(); + List = IntWinListChildren(DesktopWindow); + + if (List != NULL) + { + for (i = 0; List[i]; i++) + { + BOOL topmost = FALSE; + + ChildObject = ValidateHwndNoErr(List[i]); + if (ChildObject) + { + topmost = (ChildObject->ExStyle & WS_EX_TOPMOST) != 0; + } + + if (List[i] == Owner) + { + if (i > 0) hWndInsertAfter = List[i-1]; + else hWndInsertAfter = topmost ? HWND_TOPMOST : HWND_TOP; + break; + } + + if (hWndInsertAfter == HWND_TOP || hWndInsertAfter == HWND_NOTOPMOST) + { + if (!topmost) break; + } + else if (List[i] == hWndInsertAfter) break; + } + } + else + return hWndInsertAfter; + } + } + + if (hWndInsertAfter == HWND_BOTTOM) + { + ERR("Window is HWND_BOTTOM hwnd %p\n",hWndInsertAfter); + if (List) ExFreePoolWithTag(List, USERTAG_WINDOWLIST); + goto done; + } + + if (!List) + { + DesktopWindow = UserGetDesktopWindow(); + List = IntWinListChildren(DesktopWindow); + } + + if (List != NULL) + { + i = 0; + + if (hWndInsertAfter == HWND_TOP || hWndInsertAfter == HWND_NOTOPMOST) + { + if (hWndInsertAfter == HWND_NOTOPMOST || !(Window->ExStyle & WS_EX_TOPMOST)) + { + TRACE("skip all the topmost windows\n"); + /* skip all the topmost windows */ + while (List[i] && + (ChildObject = ValidateHwndNoErr(List[i])) && + (ChildObject->ExStyle & WS_EX_TOPMOST)) i++; + } + } + else if (hWndInsertAfter != HWND_TOPMOST) + { + /* skip windows that are already placed correctly */ + for (i = 0; List[i]; i++) + { + if (List[i] == hWndInsertAfter) break; + if (List[i] == UserHMGetHandle(Window)) + { + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); + goto done; /* nothing to do if window is moving backwards in z-order */ + } + } + } + + for (; List[i]; i++) + { + PWND Wnd; + USER_REFERENCE_ENTRY Ref; + + if (List[i] == UserHMGetHandle(Window)) + break; + + if (!(Wnd = ValidateHwndNoErr(List[i]))) + continue; + + Owner = Wnd->spwndOwner ? Wnd->spwndOwner->head.h : NULL; + + if (Owner != UserHMGetHandle(Window)) continue; + + UserRefObjectCo(Wnd, &Ref); + TRACE( "moving %p owned by %p after %p\n", List[i], UserHMGetHandle(Window), hWndInsertAfter ); + co_WinPosSetWindowPos(Wnd, hWndInsertAfter, 0, 0, 0, 0, + SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING| SWP_DEFERERASE); + + UserDerefObjectCo(Wnd); + hWndInsertAfter = List[i]; + } + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); + } +done: + return hWndInsertAfter; +} +//// + +/*********************************************************************** + * WinPosInternalMoveWindow + * + * Update WindowRect and ClientRect of Window and all of its children + * We keep both WindowRect and ClientRect in screen coordinates internally + */ +static +VOID FASTCALL +WinPosInternalMoveWindow(PWND Window, INT MoveX, INT MoveY) +{ + PWND Child; + + ASSERT(Window != Window->spwndChild); + TRACE("InternalMoveWin X %d Y %d\n", MoveX, MoveY); + + Window->rcWindow.left += MoveX; + Window->rcWindow.right += MoveX; + Window->rcWindow.top += MoveY; + Window->rcWindow.bottom += MoveY; + + Window->rcClient.left += MoveX; + Window->rcClient.right += MoveX; + Window->rcClient.top += MoveY; + Window->rcClient.bottom += MoveY; + + for(Child = Window->spwndChild; Child; Child = Child->spwndNext) + { + WinPosInternalMoveWindow(Child, MoveX, MoveY); + } +} + +/* + * WinPosFixupSWPFlags + * + * Fix redundant flags and values in the WINDOWPOS structure. + */ +static +BOOL FASTCALL +WinPosFixupFlags(WINDOWPOS *WinPos, PWND Wnd) +{ + PWND Parent; + POINT pt; + + /* Finally make sure that all coordinates are valid */ + if (WinPos->x < -32768) WinPos->x = -32768; + else if (WinPos->x > 32767) WinPos->x = 32767; + if (WinPos->y < -32768) WinPos->y = -32768; + else if (WinPos->y > 32767) WinPos->y = 32767; + + WinPos->cx = max(WinPos->cx, 0); + WinPos->cy = max(WinPos->cy, 0); + + Parent = UserGetAncestor( Wnd, GA_PARENT ); + if (!IntIsWindowVisible( Parent ) && + /* Fix B : wine msg test_SetParent:WmSetParentSeq_2:25 wParam bits! */ + (WinPos->flags & SWP_AGG_STATUSFLAGS) == SWP_AGG_NOPOSCHANGE) WinPos->flags |= SWP_NOREDRAW; + + if (Wnd->style & WS_VISIBLE) WinPos->flags &= ~SWP_SHOWWINDOW; + else + { + WinPos->flags &= ~SWP_HIDEWINDOW; + if (!(WinPos->flags & SWP_SHOWWINDOW)) WinPos->flags |= SWP_NOREDRAW; + } + + /* Check for right size */ + if (Wnd->rcWindow.right - Wnd->rcWindow.left == WinPos->cx && + Wnd->rcWindow.bottom - Wnd->rcWindow.top == WinPos->cy) + { + WinPos->flags |= SWP_NOSIZE; + } + + pt.x = WinPos->x; + pt.y = WinPos->y; + IntClientToScreen( Parent, &pt ); + TRACE("WPFU C2S wpx %d wpy %d ptx %d pty %d\n",WinPos->x,WinPos->y,pt.x,pt.y); + /* Check for right position */ + if (Wnd->rcWindow.left == pt.x && Wnd->rcWindow.top == pt.y) + { + //ERR("In right pos\n"); + WinPos->flags |= SWP_NOMOVE; + } + + if ( WinPos->hwnd != UserGetForegroundWindow() && (Wnd->style & (WS_POPUP | WS_CHILD)) != WS_CHILD) + { + /* Bring to the top when activating */ + if (!(WinPos->flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW)) && + (WinPos->flags & SWP_NOZORDER || + (WinPos->hwndInsertAfter != HWND_TOPMOST && WinPos->hwndInsertAfter != HWND_NOTOPMOST))) + { + WinPos->flags &= ~SWP_NOZORDER; + WinPos->hwndInsertAfter = (0 != (Wnd->ExStyle & WS_EX_TOPMOST) ? HWND_TOPMOST : HWND_TOP); + } + } + + /* Check hwndInsertAfter */ + if (!(WinPos->flags & SWP_NOZORDER)) + { + /* Fix sign extension */ + if (WinPos->hwndInsertAfter == (HWND)0xffff) + { + WinPos->hwndInsertAfter = HWND_TOPMOST; + } + else if (WinPos->hwndInsertAfter == (HWND)0xfffe) + { + WinPos->hwndInsertAfter = HWND_NOTOPMOST; + } + + if (WinPos->hwndInsertAfter == HWND_TOP) + { + /* Keep it topmost when it's already topmost */ + if ((Wnd->ExStyle & WS_EX_TOPMOST) != 0) + WinPos->hwndInsertAfter = HWND_TOPMOST; + + if (IntGetWindow(WinPos->hwnd, GW_HWNDFIRST) == WinPos->hwnd) + { + WinPos->flags |= SWP_NOZORDER; + } + } + else if (WinPos->hwndInsertAfter == HWND_BOTTOM) + { + if (!(Wnd->ExStyle & WS_EX_TOPMOST) && IntGetWindow(WinPos->hwnd, GW_HWNDLAST) == WinPos->hwnd) + WinPos->flags |= SWP_NOZORDER; + } + else if (WinPos->hwndInsertAfter == HWND_TOPMOST) + { + if ((Wnd->ExStyle & WS_EX_TOPMOST) && IntGetWindow(WinPos->hwnd, GW_HWNDFIRST) == WinPos->hwnd) + WinPos->flags |= SWP_NOZORDER; + } + else if (WinPos->hwndInsertAfter == HWND_NOTOPMOST) + { + if (!(Wnd->ExStyle & WS_EX_TOPMOST)) + WinPos->flags |= SWP_NOZORDER; + } + else /* hwndInsertAfter must be a sibling of the window */ + { + PWND InsAfterWnd; + + InsAfterWnd = ValidateHwndNoErr(WinPos->hwndInsertAfter); + if(!InsAfterWnd) + { + return TRUE; + } + + if (InsAfterWnd->spwndParent != Wnd->spwndParent) + { + /* Note from wine User32 Win test_SetWindowPos: + "Returns TRUE also for windows that are not siblings" + "Does not seem to do anything even without passing flags, still returns TRUE" + "Same thing the other way around." + ".. and with these windows." + */ + return FALSE; + } + else + { + /* + * We don't need to change the Z order of hwnd if it's already + * inserted after hwndInsertAfter or when inserting hwnd after + * itself. + */ + if ((WinPos->hwnd == WinPos->hwndInsertAfter) || + ((InsAfterWnd->spwndNext) && (WinPos->hwnd == InsAfterWnd->spwndNext->head.h))) + { + WinPos->flags |= SWP_NOZORDER; + } + } + } + } + + return TRUE; +} + +/* x and y are always screen relative */ +BOOLEAN FASTCALL +co_WinPosSetWindowPos( + PWND Window, + HWND WndInsertAfter, + INT x, + INT y, + INT cx, + INT cy, + UINT flags + ) +{ + WINDOWPOS WinPos; + RECTL NewWindowRect; + RECTL NewClientRect; + RECTL valid_rects[2]; + PREGION VisBefore = NULL; + PREGION VisBeforeJustClient = NULL; + PREGION VisAfter = NULL; + PREGION CopyRgn = NULL; + ULONG WvrFlags = 0; + RECTL OldWindowRect, OldClientRect; + int RgnType; + HDC Dc; + RECTL CopyRect; + PWND Ancestor; + BOOL bPointerInWindow, PosChanged = FALSE; + PTHREADINFO pti = PsGetCurrentThreadWin32Thread(); + + ASSERT_REFS_CO(Window); + + TRACE("pwnd %p, after %p, %d,%d (%dx%d), flags %s", + Window, WndInsertAfter, x, y, cx, cy, flags); +#if DBG + dump_winpos_flags(flags); +#endif + + /* FIXME: Get current active window from active queue. Why? since r2915. */ + + bPointerInWindow = IntPtInWindow(Window, gpsi->ptCursor.x, gpsi->ptCursor.y); + + WinPos.hwnd = Window->head.h; + WinPos.hwndInsertAfter = WndInsertAfter; + WinPos.x = x; + WinPos.y = y; + WinPos.cx = cx; + WinPos.cy = cy; + WinPos.flags = flags; + + if ( flags & SWP_ASYNCWINDOWPOS ) + { + LRESULT lRes; + PWINDOWPOS ppos = ExAllocatePoolWithTag(PagedPool, sizeof(WINDOWPOS), USERTAG_SWP); + if ( ppos ) + { + WinPos.flags &= ~SWP_ASYNCWINDOWPOS; // Clear flag. + *ppos = WinPos; + /* Yes it's a pointer inside Win32k! */ + lRes = co_IntSendMessageNoWait( WinPos.hwnd, WM_ASYNC_SETWINDOWPOS, 0, (LPARAM)ppos); + /* We handle this the same way as Event Hooks and Hooks. */ + if ( !lRes ) + { + ExFreePoolWithTag(ppos, USERTAG_SWP); + return FALSE; + } + return TRUE; + } + return FALSE; + } + + co_WinPosDoWinPosChanging(Window, &WinPos, &NewWindowRect, &NewClientRect); + + /* Does the window still exist? */ + if (!IntIsWindow(WinPos.hwnd)) + { + TRACE("WinPosSetWindowPos: Invalid handle 0x%p!\n",WinPos.hwnd); + EngSetLastError(ERROR_INVALID_WINDOW_HANDLE); + return FALSE; + } + + /* Fix up the flags. */ + if (!WinPosFixupFlags(&WinPos, Window)) + { + // See Note. + return TRUE; + } + + Ancestor = UserGetAncestor(Window, GA_PARENT); + if ( (WinPos.flags & (SWP_NOZORDER | SWP_HIDEWINDOW | SWP_SHOWWINDOW)) != SWP_NOZORDER && + Ancestor && Ancestor->head.h == IntGetDesktopWindow() ) + { + WinPos.hwndInsertAfter = WinPosDoOwnedPopups(Window, WinPos.hwndInsertAfter); + } + + if (!(WinPos.flags & SWP_NOREDRAW)) + { + /* Compute the visible region before the window position is changed */ + if (!(WinPos.flags & SWP_SHOWWINDOW) && + (WinPos.flags & (SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | + SWP_HIDEWINDOW | SWP_FRAMECHANGED)) != + (SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER)) + { + VisBefore = VIS_ComputeVisibleRegion(Window, FALSE, FALSE, + (Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE); + + if ( VisBefore != NULL && + REGION_Complexity(VisBefore) == NULLREGION ) + { + REGION_Delete(VisBefore); + VisBefore = NULL; + } + else if(VisBefore) + { + REGION_bOffsetRgn(VisBefore, -Window->rcWindow.left, -Window->rcWindow.top); + } + + /* Calculate the non client area for resizes, as this is used in the copy region */ + if (!(WinPos.flags & SWP_NOSIZE)) + { + VisBeforeJustClient = VIS_ComputeVisibleRegion(Window, TRUE, FALSE, + (Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE); + + if ( VisBeforeJustClient != NULL && + REGION_Complexity(VisBeforeJustClient) == NULLREGION ) + { + REGION_Delete(VisBeforeJustClient); + VisBeforeJustClient = NULL; + } + else if(VisBeforeJustClient) + { + REGION_bOffsetRgn(VisBeforeJustClient, -Window->rcWindow.left, -Window->rcWindow.top); + } + } + } + } + + //// HACK 3 + if (Window->hrgnNewFrame) + { + SelectWindowRgn( Window, Window->hrgnNewFrame ); // Should be PSMWP->acvr->hrgnClip + Window->hrgnNewFrame = NULL; + } + + WvrFlags = co_WinPosDoNCCALCSize(Window, &WinPos, &NewWindowRect, &NewClientRect, valid_rects); + +// ERR("co_WinPosDoNCCALCSize returned 0x%x\n valid dest: %d %d %d %d\n valid src : %d %d %d %d\n", WvrFlags, +// valid_rects[0].left,valid_rects[0].top,valid_rects[0].right,valid_rects[0].bottom, +// valid_rects[1].left,valid_rects[1].top,valid_rects[1].right,valid_rects[1].bottom); + + /* Validate link windows. (also take into account shell window in hwndShellWindow) */ + if (!(WinPos.flags & SWP_NOZORDER) && WinPos.hwnd != UserGetShellWindow()) + { + IntLinkHwnd(Window, WinPos.hwndInsertAfter); + } + + OldWindowRect = Window->rcWindow; + OldClientRect = Window->rcClient; + + if (NewClientRect.left != OldClientRect.left || + NewClientRect.top != OldClientRect.top) + { + // Move child window if their parent is moved. Keep Child window relative to Parent... + WinPosInternalMoveWindow(Window, + NewClientRect.left - OldClientRect.left, + NewClientRect.top - OldClientRect.top); + PosChanged = TRUE; + } + + Window->rcWindow = NewWindowRect; + Window->rcClient = NewClientRect; + + /* erase parent when hiding or resizing child */ + if (WinPos.flags & SWP_HIDEWINDOW) + { + /* Clear the update region */ + co_UserRedrawWindow( Window, + NULL, + 0, + RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE | RDW_NOINTERNALPAINT | RDW_ALLCHILDREN); + + if (UserIsDesktopWindow(Window->spwndParent)) + co_IntShellHookNotify(HSHELL_WINDOWDESTROYED, (WPARAM)Window->head.h, 0); + + Window->style &= ~WS_VISIBLE; //IntSetStyle( Window, 0, WS_VISIBLE ); + Window->head.pti->cVisWindows--; + IntNotifyWinEvent(EVENT_OBJECT_HIDE, Window, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI); + } + else if (WinPos.flags & SWP_SHOWWINDOW) + { + if (UserIsDesktopWindow(Window->spwndParent) && + Window->spwndOwner == NULL && + (!(Window->ExStyle & WS_EX_TOOLWINDOW) || + (Window->ExStyle & WS_EX_APPWINDOW))) + co_IntShellHookNotify(HSHELL_WINDOWCREATED, (WPARAM)Window->head.h, 0); + + Window->style |= WS_VISIBLE; //IntSetStyle( Window, WS_VISIBLE, 0 ); + Window->head.pti->cVisWindows++; + IntNotifyWinEvent(EVENT_OBJECT_SHOW, Window, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI); + } + + if (Window->hrgnUpdate != NULL && Window->hrgnUpdate != HRGN_WINDOW) + { + NtGdiOffsetRgn(Window->hrgnUpdate, + NewWindowRect.left - OldWindowRect.left, + NewWindowRect.top - OldWindowRect.top); + } + + DceResetActiveDCEs(Window); // For WS_VISIBLE changes. + + if (!(WinPos.flags & SWP_NOREDRAW)) + { + /* Determine the new visible region */ + VisAfter = VIS_ComputeVisibleRegion(Window, FALSE, FALSE, + (Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE); + + if ( VisAfter != NULL && + REGION_Complexity(VisAfter) == NULLREGION ) + { + REGION_Delete(VisAfter); + VisAfter = NULL; + } + else if(VisAfter) + { + REGION_bOffsetRgn(VisAfter, -Window->rcWindow.left, -Window->rcWindow.top); + } + + /* + * Determine which pixels can be copied from the old window position + * to the new. Those pixels must be visible in both the old and new + * position. Also, check the class style to see if the windows of this + * class need to be completely repainted on (horizontal/vertical) size + * change. + */ + if ( ( VisBefore != NULL && + VisAfter != NULL && + !(WinPos.flags & SWP_NOCOPYBITS) && + ((WinPos.flags & SWP_NOSIZE) || !(WvrFlags & WVR_REDRAW)) && + !(Window->ExStyle & WS_EX_TRANSPARENT) ) || + ( !PosChanged && (WinPos.flags & SWP_FRAMECHANGED) && VisBefore) ) + { + + /* + * If this is (also) a window resize, the whole nonclient area + * needs to be repainted. So we limit the copy to the client area, + * 'cause there is no use in copying it (would possibly cause + * "flashing" too). However, if the copy region is already empty, + * we don't have to crop (can't take anything away from an empty + * region...) + */ + + CopyRgn = IntSysCreateRectpRgn(0, 0, 0, 0); + if (WinPos.flags & SWP_NOSIZE) + RgnType = IntGdiCombineRgn(CopyRgn, VisAfter, VisBefore, RGN_AND); + else if (VisBeforeJustClient != NULL) + { + RgnType = IntGdiCombineRgn(CopyRgn, VisAfter, VisBeforeJustClient, RGN_AND); + REGION_Delete(VisBeforeJustClient); + } + + /* Now use in copying bits which are in the update region. */ + if (Window->hrgnUpdate != NULL) + { + PREGION RgnUpdate = REGION_LockRgn(Window->hrgnUpdate); + if (RgnUpdate) + { + REGION_bOffsetRgn(CopyRgn, NewWindowRect.left, NewWindowRect.top); + IntGdiCombineRgn(CopyRgn, CopyRgn, RgnUpdate, RGN_DIFF); + REGION_bOffsetRgn(CopyRgn, -NewWindowRect.left, -NewWindowRect.top); + REGION_UnlockRgn(RgnUpdate); + } + } + + /* + * Now, get the bounding box of the copy region. If it's empty + * there's nothing to copy. Also, it's no use copying bits onto + * themselves. + */ + if (REGION_GetRgnBox(CopyRgn, &CopyRect) == NULLREGION) + { + /* Nothing to copy, clean up */ + REGION_Delete(CopyRgn); + CopyRgn = NULL; + } + else if ( OldWindowRect.left != NewWindowRect.left || + OldWindowRect.top != NewWindowRect.top || + (WinPos.flags & SWP_FRAMECHANGED) ) + { + HRGN DcRgn = NtGdiCreateRectRgn(0, 0, 0, 0); + PREGION DcRgnObj = REGION_LockRgn(DcRgn); + + /* + * Small trick here: there is no function to bitblt a region. So + * we set the region as the clipping region, take the bounding box + * of the region and bitblt that. Since nothing outside the clipping + * region is copied, this has the effect of bitblt'ing the region. + * + * Since NtUserGetDCEx takes ownership of the clip region, we need + * to create a copy of CopyRgn and pass that. We need CopyRgn later + */ + IntGdiCombineRgn(DcRgnObj, CopyRgn, NULL, RGN_COPY); + REGION_bOffsetRgn(DcRgnObj, NewWindowRect.left, NewWindowRect.top); + REGION_UnlockRgn(DcRgnObj); + Dc = UserGetDCEx( Window, + DcRgn, + DCX_WINDOW|DCX_CACHE|DCX_INTERSECTRGN|DCX_CLIPSIBLINGS|DCX_KEEPCLIPRGN); + NtGdiBitBlt( Dc, + CopyRect.left, CopyRect.top, + CopyRect.right - CopyRect.left, + CopyRect.bottom - CopyRect.top, + Dc, + CopyRect.left + (OldWindowRect.left - NewWindowRect.left), + CopyRect.top + (OldWindowRect.top - NewWindowRect.top), + SRCCOPY, + 0, + 0); + + UserReleaseDC(Window, Dc, FALSE); + IntValidateParent(Window, CopyRgn); + GreDeleteObject(DcRgn); + } + } + else + { + CopyRgn = NULL; + } +#if 0 + /////// Fixes NoPopup tests but breaks msg_paint tests. + if ( !PosChanged && (WinPos.flags & SWP_FRAMECHANGED) && VisBefore) + { + PWND Parent = Window->spwndParent; + ERR("SWP_FRAMECHANGED no chg\n"); + if ( !(Window->style & WS_CHILD) && (Parent) && (Parent->style & WS_CLIPCHILDREN)) + { + ERR("SWP_FRAMECHANGED Parent WS_CLIPCHILDREN\n"); + //IntInvalidateWindows( Window, VisBefore, /*RDW_ERASE |*/ RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN); + } + } +#endif + /* We need to redraw what wasn't visible before */ + if (VisAfter != NULL) + { + PREGION DirtyRgn = IntSysCreateRectpRgn(0, 0, 0, 0); + if (DirtyRgn) + { + if (CopyRgn != NULL) + { + RgnType = IntGdiCombineRgn(DirtyRgn, VisAfter, CopyRgn, RGN_DIFF); + } + else + { + RgnType = IntGdiCombineRgn(DirtyRgn, VisAfter, 0, RGN_COPY); + } + + if (RgnType != ERROR && RgnType != NULLREGION) + { + /* old code + NtGdiOffsetRgn(DirtyRgn, Window->rcWindow.left, Window->rcWindow.top); + IntInvalidateWindows( Window, + DirtyRgn, + RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN); + } + GreDeleteObject(DirtyRgn); + */ + + PWND Parent = Window->spwndParent; + + REGION_bOffsetRgn( DirtyRgn, Window->rcWindow.left, Window->rcWindow.top); + + if ( (Window->style & WS_CHILD) && (Parent) && !(Parent->style & WS_CLIPCHILDREN)) + { + IntInvalidateWindows( Parent, DirtyRgn, RDW_ERASE | RDW_INVALIDATE); + co_IntPaintWindows(Parent, RDW_NOCHILDREN, FALSE); + } + else + { + IntInvalidateWindows( Window, DirtyRgn, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN); + } + } + REGION_Delete(DirtyRgn); + } + } + + if (CopyRgn != NULL) + { + REGION_Delete(CopyRgn); + } + + /* Expose what was covered before but not covered anymore */ + if (VisBefore != NULL) + { + PREGION ExposedRgn = IntSysCreateRectpRgn(0, 0, 0, 0); + if (ExposedRgn) + { + RgnType = IntGdiCombineRgn(ExposedRgn, VisBefore, NULL, RGN_COPY); + REGION_bOffsetRgn(ExposedRgn, + OldWindowRect.left - NewWindowRect.left, + OldWindowRect.top - NewWindowRect.top); + + if (VisAfter != NULL) + RgnType = IntGdiCombineRgn(ExposedRgn, ExposedRgn, VisAfter, RGN_DIFF); + + if (RgnType != ERROR && RgnType != NULLREGION) + { + co_VIS_WindowLayoutChanged(Window, ExposedRgn); + } + REGION_Delete(ExposedRgn); + } + REGION_Delete(VisBefore); + } + + if (VisAfter != NULL) + { + REGION_Delete(VisAfter); + } + } + + if (!(WinPos.flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW))) + { + if ((Window->style & (WS_CHILD | WS_POPUP)) == WS_CHILD) + { + co_IntSendMessageNoWait(WinPos.hwnd, WM_CHILDACTIVATE, 0, 0); + } + else + { + //ERR("SetWindowPos Set FG Window!\n"); + if ( pti->MessageQueue->spwndActive != Window || + pti->MessageQueue != gpqForeground ) + { + //ERR("WPSWP : set active window\n"); + if (!(Window->state & WNDS_BEINGACTIVATED)) // Inside SAW? + { + co_IntSetForegroundWindow(Window); // Fixes SW_HIDE issues. Wine win test_SetActiveWindow & test_SetForegroundWindow. + } + } + } + } + + if ( !PosChanged && + (WinPos.flags & SWP_FRAMECHANGED) && + !(WinPos.flags & SWP_DEFERERASE) && // Prevent sending WM_SYNCPAINT message. + VisAfter ) + { + PWND Parent = Window->spwndParent; + if ( !(Window->style & WS_CHILD) && (Parent) && (Parent->style & WS_CLIPCHILDREN)) + { + TRACE("SWP_FRAMECHANGED Parent WS_CLIPCHILDREN\n"); + UserSyncAndPaintWindows( Parent, RDW_CLIPCHILDREN); + } + } + + // Fix wine msg test_SetFocus, prevents sending WM_WINDOWPOSCHANGED. + if ( VisBefore == NULL && + VisBeforeJustClient == NULL && + !(Window->ExStyle & WS_EX_TOPMOST) && + (WinPos.flags & SWP_AGG_STATUSFLAGS) == (SWP_AGG_NOPOSCHANGE & ~SWP_NOZORDER)) + { + TRACE("No drawing, set no Z order and no redraw!\n"); + WinPos.flags |= SWP_NOZORDER|SWP_NOREDRAW; + } + + /* And last, send the WM_WINDOWPOSCHANGED message */ + + TRACE("\tstatus hwnd %p flags = %04x\n",Window?Window->head.h:NULL,WinPos.flags & SWP_AGG_STATUSFLAGS); + + if ((WinPos.flags & SWP_AGG_STATUSFLAGS) != SWP_AGG_NOPOSCHANGE) + { + /* WM_WINDOWPOSCHANGED is sent even if SWP_NOSENDCHANGING is set + and always contains final window position. + */ + WinPos.x = NewWindowRect.left; + WinPos.y = NewWindowRect.top; + WinPos.cx = NewWindowRect.right - NewWindowRect.left; + WinPos.cy = NewWindowRect.bottom - NewWindowRect.top; + TRACE("WM_WINDOWPOSCHANGED hwnd %p Flags %04x\n",WinPos.hwnd,WinPos.flags); + co_IntSendMessageNoWait(WinPos.hwnd, WM_WINDOWPOSCHANGED, 0, (LPARAM) &WinPos); + } + + if ( WinPos.flags & SWP_FRAMECHANGED || WinPos.flags & SWP_STATECHANGED || + !(WinPos.flags & SWP_NOCLIENTSIZE) || !(WinPos.flags & SWP_NOCLIENTMOVE) ) + { + PWND pWnd = ValidateHwndNoErr(WinPos.hwnd); + if (pWnd) + IntNotifyWinEvent(EVENT_OBJECT_LOCATIONCHANGE, pWnd, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI); + } + + if(bPointerInWindow != IntPtInWindow(Window, gpsi->ptCursor.x, gpsi->ptCursor.y)) + { + /* Generate mouse move message */ + MSG msg; + msg.message = WM_MOUSEMOVE; + msg.wParam = UserGetMouseButtonsState(); + msg.lParam = MAKELPARAM(gpsi->ptCursor.x, gpsi->ptCursor.y); + msg.pt = gpsi->ptCursor; + co_MsqInsertMouseMessage(&msg, 0, 0, TRUE); + } + + return TRUE; +} + +LRESULT FASTCALL +co_WinPosGetNonClientSize(PWND Window, RECT* WindowRect, RECT* ClientRect) +{ + LRESULT Result; + + ASSERT_REFS_CO(Window); + + *ClientRect = *WindowRect; + Result = co_IntSendMessageNoWait(Window->head.h, WM_NCCALCSIZE, FALSE, (LPARAM) ClientRect); + + FixClientRect(ClientRect, WindowRect); + + return Result; +} + +void FASTCALL +co_WinPosSendSizeMove(PWND Wnd) +{ + RECTL Rect; + LPARAM lParam; + WPARAM wParam = SIZE_RESTORED; + + IntGetClientRect(Wnd, &Rect); + lParam = MAKELONG(Rect.right-Rect.left, Rect.bottom-Rect.top); + + Wnd->state &= ~WNDS_SENDSIZEMOVEMSGS; + + if (Wnd->style & WS_MAXIMIZE) + { + wParam = SIZE_MAXIMIZED; + } + else if (Wnd->style & WS_MINIMIZE) + { + wParam = SIZE_MINIMIZED; + lParam = 0; + } + + co_IntSendMessageNoWait(UserHMGetHandle(Wnd), WM_SIZE, wParam, lParam); + + if (UserIsDesktopWindow(Wnd->spwndParent)) + lParam = MAKELONG(Wnd->rcClient.left, Wnd->rcClient.top); + else + lParam = MAKELONG(Wnd->rcClient.left-Wnd->spwndParent->rcClient.left, Wnd->rcClient.top-Wnd->spwndParent->rcClient.top); + + co_IntSendMessageNoWait(UserHMGetHandle(Wnd), WM_MOVE, 0, lParam); + + IntEngWindowChanged(Wnd, WOC_RGN_CLIENT); } UINT FASTCALL @@ -984,1362 +2340,6 @@ return SwpFlags; } -BOOL -UserHasWindowEdge(DWORD Style, DWORD ExStyle) -{ - if (Style & WS_MINIMIZE) - return TRUE; - if (ExStyle & WS_EX_DLGMODALFRAME) - return TRUE; - if (ExStyle & WS_EX_STATICEDGE) - return FALSE; - if (Style & WS_THICKFRAME) - return TRUE; - Style &= WS_CAPTION; - if (Style == WS_DLGFRAME || Style == WS_CAPTION) - return TRUE; - return FALSE; -} - -VOID FASTCALL -IntGetWindowBorderMeasures(PWND Wnd, UINT *cx, UINT *cy) -{ - if(HAS_DLGFRAME(Wnd->style, Wnd->ExStyle) && !(Wnd->style & WS_MINIMIZE)) - { - *cx = UserGetSystemMetrics(SM_CXDLGFRAME); - *cy = UserGetSystemMetrics(SM_CYDLGFRAME); - } - else - { - if(HAS_THICKFRAME(Wnd->style, Wnd->ExStyle)&& !(Wnd->style & WS_MINIMIZE)) - { - *cx = UserGetSystemMetrics(SM_CXFRAME); - *cy = UserGetSystemMetrics(SM_CYFRAME); - } - else if(HAS_THINFRAME(Wnd->style, Wnd->ExStyle)) - { - *cx = UserGetSystemMetrics(SM_CXBORDER); - *cy = UserGetSystemMetrics(SM_CYBORDER); - } - else - { - *cx = *cy = 0; - } - } -} - -VOID -UserGetWindowBorders(DWORD Style, DWORD ExStyle, SIZE *Size, BOOL WithClient) -{ - DWORD Border = 0; - - if (UserHasWindowEdge(Style, ExStyle)) - Border += 2; - else if (ExStyle & WS_EX_STATICEDGE) - Border += 1; - if ((ExStyle & WS_EX_CLIENTEDGE) && WithClient) - Border += 2; - if (Style & WS_CAPTION || ExStyle & WS_EX_DLGMODALFRAME) - Border ++; - Size->cx = Size->cy = Border; - if ((Style & WS_THICKFRAME) && !(Style & WS_MINIMIZE)) - { - Size->cx += UserGetSystemMetrics(SM_CXFRAME) - UserGetSystemMetrics(SM_CXDLGFRAME); - Size->cy += UserGetSystemMetrics(SM_CYFRAME) - UserGetSystemMetrics(SM_CYDLGFRAME); - } - Size->cx *= UserGetSystemMetrics(SM_CXBORDER); - Size->cy *= UserGetSystemMetrics(SM_CYBORDER); -} - -BOOL WINAPI -UserAdjustWindowRectEx(LPRECT lpRect, - DWORD dwStyle, - BOOL bMenu, - DWORD dwExStyle) -{ - SIZE BorderSize; - - if (bMenu) - { - lpRect->top -= UserGetSystemMetrics(SM_CYMENU); - } - if ((dwStyle & WS_CAPTION) == WS_CAPTION) - { - if (dwExStyle & WS_EX_TOOLWINDOW) - lpRect->top -= UserGetSystemMetrics(SM_CYSMCAPTION); - else - lpRect->top -= UserGetSystemMetrics(SM_CYCAPTION); - } - UserGetWindowBorders(dwStyle, dwExStyle, &BorderSize, TRUE); - RECTL_vInflateRect( - lpRect, - BorderSize.cx, - BorderSize.cy); - - return TRUE; -} - -UINT FASTCALL -co_WinPosGetMinMaxInfo(PWND Window, POINT* MaxSize, POINT* MaxPos, - POINT* MinTrack, POINT* MaxTrack) -{ - MINMAXINFO MinMax; - PMONITOR monitor; - INT xinc, yinc; - LONG style = Window->style; - LONG adjustedStyle; - LONG exstyle = Window->ExStyle; - RECT rc; - - ASSERT_REFS_CO(Window); - - /* Compute default values */ - - rc = Window->rcWindow; - MinMax.ptReserved.x = rc.left; - MinMax.ptReserved.y = rc.top; - - if ((style & WS_CAPTION) == WS_CAPTION) - adjustedStyle = style & ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */ - else - adjustedStyle = style; - - if(Window->spwndParent) - IntGetClientRect(Window->spwndParent, &rc); - UserAdjustWindowRectEx(&rc, adjustedStyle, ((style & WS_POPUP) && Window->IDMenu), exstyle); - - xinc = -rc.left; - yinc = -rc.top; - - MinMax.ptMaxSize.x = rc.right - rc.left; - MinMax.ptMaxSize.y = rc.bottom - rc.top; - if (style & (WS_DLGFRAME | WS_BORDER)) - { - MinMax.ptMinTrackSize.x = UserGetSystemMetrics(SM_CXMINTRACK); - MinMax.ptMinTrackSize.y = UserGetSystemMetrics(SM_CYMINTRACK); - } - else - { - MinMax.ptMinTrackSize.x = 2 * xinc; - MinMax.ptMinTrackSize.y = 2 * yinc; - } - MinMax.ptMaxTrackSize.x = UserGetSystemMetrics(SM_CXMAXTRACK); - MinMax.ptMaxTrackSize.y = UserGetSystemMetrics(SM_CYMAXTRACK); - MinMax.ptMaxPosition.x = -xinc; - MinMax.ptMaxPosition.y = -yinc; - - if (!EMPTYPOINT(Window->InternalPos.MaxPos)) MinMax.ptMaxPosition = Window->InternalPos.MaxPos; - - co_IntSendMessage(Window->head.h, WM_GETMINMAXINFO, 0, (LPARAM)&MinMax); - - /* if the app didn't change the values, adapt them for the current monitor */ - if ((monitor = UserGetPrimaryMonitor())) - { - RECT rc_work; - - rc_work = monitor->rcMonitor; - - if (style & WS_MAXIMIZEBOX) - { - if ((style & WS_CAPTION) == WS_CAPTION || !(style & (WS_CHILD | WS_POPUP))) - rc_work = monitor->rcWork; - } - - if (MinMax.ptMaxSize.x == UserGetSystemMetrics(SM_CXSCREEN) + 2 * xinc && - MinMax.ptMaxSize.y == UserGetSystemMetrics(SM_CYSCREEN) + 2 * yinc) - { - MinMax.ptMaxSize.x = (rc_work.right - rc_work.left) + 2 * xinc; - MinMax.ptMaxSize.y = (rc_work.bottom - rc_work.top) + 2 * yinc; - } - if (MinMax.ptMaxPosition.x == -xinc && MinMax.ptMaxPosition.y == -yinc) - { - MinMax.ptMaxPosition.x = rc_work.left - xinc; - MinMax.ptMaxPosition.y = rc_work.top - yinc; - } - if (MinMax.ptMaxSize.x >= (monitor->rcMonitor.right - monitor->rcMonitor.left) && - MinMax.ptMaxSize.y >= (monitor->rcMonitor.bottom - monitor->rcMonitor.top) ) - Window->state |= WNDS_MAXIMIZESTOMONITOR; - else - Window->state &= ~WNDS_MAXIMIZESTOMONITOR; - } - - - MinMax.ptMaxTrackSize.x = max(MinMax.ptMaxTrackSize.x, - MinMax.ptMinTrackSize.x); - MinMax.ptMaxTrackSize.y = max(MinMax.ptMaxTrackSize.y, - MinMax.ptMinTrackSize.y); - - if (MaxSize) - *MaxSize = MinMax.ptMaxSize; - if (MaxPos) - *MaxPos = MinMax.ptMaxPosition; - if (MinTrack) - *MinTrack = MinMax.ptMinTrackSize; - if (MaxTrack) - *MaxTrack = MinMax.ptMaxTrackSize; - - return 0; // FIXME: What does it return? -} - -static -BOOL -IntValidateParent(PWND Child, PREGION ValidateRgn) -{ - PWND ParentWnd = Child; - - if (ParentWnd->style & WS_CHILD) - { - do - ParentWnd = ParentWnd->spwndParent; - while (ParentWnd->style & WS_CHILD); - } - - ParentWnd = Child->spwndParent; - while (ParentWnd) - { - if (ParentWnd->style & WS_CLIPCHILDREN) - break; - - if (ParentWnd->hrgnUpdate != 0) - { - IntInvalidateWindows( ParentWnd, - ValidateRgn, - RDW_VALIDATE | RDW_NOCHILDREN); - } - - ParentWnd = ParentWnd->spwndParent; - } - - return TRUE; -} - -static -VOID FASTCALL -FixClientRect(PRECTL ClientRect, PRECTL WindowRect) -{ - if (ClientRect->left < WindowRect->left) - { - ClientRect->left = WindowRect->left; - } - else if (WindowRect->right < ClientRect->left) - { - ClientRect->left = WindowRect->right; - } - if (ClientRect->right < WindowRect->left) - { - ClientRect->right = WindowRect->left; - } - else if (WindowRect->right < ClientRect->right) - { - ClientRect->right = WindowRect->right; - } - if (ClientRect->top < WindowRect->top) - { - ClientRect->top = WindowRect->top; - } - else if (WindowRect->bottom < ClientRect->top) - { - ClientRect->top = WindowRect->bottom; - } - if (ClientRect->bottom < WindowRect->top) - { - ClientRect->bottom = WindowRect->top; - } - else if (WindowRect->bottom < ClientRect->bottom) - { - ClientRect->bottom = WindowRect->bottom; - } -} -/*********************************************************************** - * get_valid_rects - * - * Compute the valid rects from the old and new client rect and WVR_* flags. - * Helper for WM_NCCALCSIZE handling. - */ -static -VOID FASTCALL -get_valid_rects( RECTL *old_client, RECTL *new_client, UINT flags, RECTL *valid ) -{ - int cx, cy; - - if (flags & WVR_REDRAW) - { - RECTL_vSetEmptyRect( &valid[0] ); - RECTL_vSetEmptyRect( &valid[1] ); - return; - } - - if (flags & WVR_VALIDRECTS) - { - if (!RECTL_bIntersectRect( &valid[0], &valid[0], new_client ) || - !RECTL_bIntersectRect( &valid[1], &valid[1], old_client )) - { - RECTL_vSetEmptyRect( &valid[0] ); - RECTL_vSetEmptyRect( &valid[1] ); - return; - } - flags = WVR_ALIGNLEFT | WVR_ALIGNTOP; - } - else - { - valid[0] = *new_client; - valid[1] = *old_client; - } - - /* make sure the rectangles have the same size */ - cx = min( valid[0].right - valid[0].left, valid[1].right - valid[1].left ); - cy = min( valid[0].bottom - valid[0].top, valid[1].bottom - valid[1].top ); - - if (flags & WVR_ALIGNBOTTOM) - { - valid[0].top = valid[0].bottom - cy; - valid[1].top = valid[1].bottom - cy; - } - else - { - valid[0].bottom = valid[0].top + cy; - valid[1].bottom = valid[1].top + cy; - } - if (flags & WVR_ALIGNRIGHT) - { - valid[0].left = valid[0].right - cx; - valid[1].left = valid[1].right - cx; - } - else - { - valid[0].right = valid[0].left + cx; - valid[1].right = valid[1].left + cx; - } -} - -static -LONG FASTCALL -co_WinPosDoNCCALCSize(PWND Window, PWINDOWPOS WinPos, RECTL* WindowRect, RECTL* ClientRect, RECTL* validRects) -{ - PWND Parent; - UINT wvrFlags = 0; - - ASSERT_REFS_CO(Window); - - /* Send WM_NCCALCSIZE message to get new client area */ - if ((WinPos->flags & (SWP_FRAMECHANGED | SWP_NOSIZE)) != SWP_NOSIZE) - { - NCCALCSIZE_PARAMS params; - WINDOWPOS winposCopy; - - params.rgrc[0] = *WindowRect; // new coordinates of a window that has been moved or resized - params.rgrc[1] = Window->rcWindow; // window before it was moved or resized - params.rgrc[2] = Window->rcClient; // client area before the window was moved or resized - - Parent = Window->spwndParent; - if (0 != (Window->style & WS_CHILD) && Parent) - { - RECTL_vOffsetRect(&(params.rgrc[0]), - Parent->rcClient.left, - Parent->rcClient.top); - RECTL_vOffsetRect(&(params.rgrc[1]), - Parent->rcClient.left, - Parent->rcClient.top); - RECTL_vOffsetRect(&(params.rgrc[2]), - Parent->rcClient.left, - Parent->rcClient.top); - } - - params.lppos = &winposCopy; - winposCopy = *WinPos; - - wvrFlags = co_IntSendMessage(Window->head.h, WM_NCCALCSIZE, TRUE, (LPARAM) ¶ms); - - /* 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) - { - *ClientRect = params.rgrc[0]; // First rectangle contains the coordinates of the new client rectangle resulting from the move or resize - if ((Window->style & WS_CHILD) && Parent) - { - RECTL_vOffsetRect(ClientRect, Parent->rcClient.left, Parent->rcClient.top); - } - FixClientRect(ClientRect, WindowRect); - } - - if (ClientRect->left != Window->rcClient.left || - ClientRect->top != Window->rcClient.top) - { - WinPos->flags &= ~SWP_NOCLIENTMOVE; - } - - if (ClientRect->right - ClientRect->left != Window->rcClient.right - Window->rcClient.left) - { - WinPos->flags &= ~SWP_NOCLIENTSIZE; - } - else - wvrFlags &= ~WVR_HREDRAW; - - if (ClientRect->bottom - ClientRect->top != Window->rcClient.bottom - Window->rcClient.top) - { - WinPos->flags &= ~SWP_NOCLIENTSIZE; - } - else - wvrFlags &= ~WVR_VREDRAW; - - validRects[0] = params.rgrc[1]; // second rectangle contains the valid destination rectangle - validRects[1] = params.rgrc[2]; // third rectangle contains the valid source rectangle - } - else - { - if (!(WinPos->flags & SWP_NOMOVE) && - (ClientRect->left != Window->rcClient.left || - ClientRect->top != Window->rcClient.top)) - { - WinPos->flags &= ~SWP_NOCLIENTMOVE; - } - } - - if (WinPos->flags & (SWP_NOCOPYBITS | SWP_NOREDRAW | SWP_SHOWWINDOW | SWP_HIDEWINDOW)) - { - RECTL_vSetEmptyRect( &validRects[0] ); - RECTL_vSetEmptyRect( &validRects[1] ); - } - else get_valid_rects( &Window->rcClient, ClientRect, wvrFlags, validRects ); - - return wvrFlags; -} - -static -BOOL FASTCALL -co_WinPosDoWinPosChanging(PWND Window, - PWINDOWPOS WinPos, - PRECTL WindowRect, - PRECTL ClientRect) -{ - ASSERT_REFS_CO(Window); - - /* Send WM_WINDOWPOSCHANGING message */ - - if (!(WinPos->flags & SWP_NOSENDCHANGING)) - { - TRACE("Sending WM_WINDOWPOSCHANGING to hwnd %p flags %04x.\n", Window->head.h,WinPos->flags); - co_IntSendMessage(Window->head.h, WM_WINDOWPOSCHANGING, 0, (LPARAM) WinPos); - } - - /* Calculate new position and size */ - - *WindowRect = Window->rcWindow; - *ClientRect = (Window->style & WS_MINIMIZE) ? Window->rcWindow : Window->rcClient; - - if (!(WinPos->flags & SWP_NOSIZE)) - { - if (Window->style & WS_MINIMIZE) - { - WindowRect->right = WindowRect->left + UserGetSystemMetrics(SM_CXMINIMIZED); - WindowRect->bottom = WindowRect->top + UserGetSystemMetrics(SM_CYMINIMIZED); - } - else - { - WindowRect->right = WindowRect->left + WinPos->cx; - WindowRect->bottom = WindowRect->top + WinPos->cy; - } - } - - if (!(WinPos->flags & SWP_NOMOVE)) - { - INT X, Y; - PWND Parent; - X = WinPos->x; - Y = WinPos->y; - - Parent = Window->spwndParent; - - // Parent child position issue is in here. SetParent_W7 test CORE-6651. - if (//((Window->style & WS_CHILD) != 0) && <- Fixes wine msg test_SetParent: "rects do not match", the last test. - Parent && - Parent != Window->head.rpdesk->pDeskInfo->spwnd) - { - TRACE("Not SWP_NOMOVE 1 Parent client offset X %d Y %d\n",X,Y); - X += Parent->rcClient.left; - Y += Parent->rcClient.top; - TRACE("Not SWP_NOMOVE 2 Parent client offset X %d Y %d\n",X,Y); - } - - WindowRect->left = X; - WindowRect->top = Y; - WindowRect->right += X - Window->rcWindow.left; - WindowRect->bottom += Y - Window->rcWindow.top; - - RECTL_vOffsetRect(ClientRect, X - Window->rcWindow.left, - Y - Window->rcWindow.top); - } - WinPos->flags |= SWP_NOCLIENTMOVE | SWP_NOCLIENTSIZE; - - TRACE( "hwnd %p, after %p, swp %d,%d %dx%d flags %08x\n", - WinPos->hwnd, WinPos->hwndInsertAfter, WinPos->x, WinPos->y, - WinPos->cx, WinPos->cy, WinPos->flags ); - TRACE("WindowRect: %d %d %d %d\n", WindowRect->left,WindowRect->top,WindowRect->right,WindowRect->bottom); - TRACE("ClientRect: %d %d %d %d\n", ClientRect->left,ClientRect->top,ClientRect->right,ClientRect->bottom); - - return TRUE; -} - -/* - * Fix Z order taking into account owned popups - - * basically we need to maintain them above the window that owns them - * - * FIXME: hide/show owned popups when owner visibility changes. - * - * ReactOS: See bug CORE-6129 and CORE-6554. - * - */ - //// - // Pass all the win:test_children/popup_zorder tests except "move hwnd_F and its popups down" which is if'ed out. - // Side effect, breaks more of the DeferWindowPos api tests, but wine breaks more!!!! -static -HWND FASTCALL -WinPosDoOwnedPopups(PWND Window, HWND hWndInsertAfter) -{ - HWND *List = NULL; - HWND Owner; - LONG Style; - PWND DesktopWindow, ChildObject; - int i; - - TRACE("(%p) hInsertAfter = %p\n", Window, hWndInsertAfter ); - - Style = Window->style; - - if (Style & WS_CHILD) - { - TRACE("Window is child\n"); - return hWndInsertAfter; - } - - Owner = Window->spwndOwner ? Window->spwndOwner->head.h : NULL; - - if (Owner) - { - /* Make sure this popup stays above the owner */ - - if (hWndInsertAfter != HWND_TOPMOST) - { - DesktopWindow = UserGetDesktopWindow(); - List = IntWinListChildren(DesktopWindow); - - if (List != NULL) - { - for (i = 0; List[i]; i++) - { - BOOL topmost = FALSE; - - ChildObject = ValidateHwndNoErr(List[i]); - if (ChildObject) - { - topmost = (ChildObject->ExStyle & WS_EX_TOPMOST) != 0; - } - - if (List[i] == Owner) - { - if (i > 0) hWndInsertAfter = List[i-1]; - else hWndInsertAfter = topmost ? HWND_TOPMOST : HWND_TOP; - break; - } - - if (hWndInsertAfter == HWND_TOP || hWndInsertAfter == HWND_NOTOPMOST) - { - if (!topmost) break; - } - else if (List[i] == hWndInsertAfter) break; - } - } - else - return hWndInsertAfter; - } - } - - if (hWndInsertAfter == HWND_BOTTOM) - { - ERR("Window is HWND_BOTTOM hwnd %p\n",hWndInsertAfter); - if (List) ExFreePoolWithTag(List, USERTAG_WINDOWLIST); - goto done; - } - - if (!List) - { - DesktopWindow = UserGetDesktopWindow(); - List = IntWinListChildren(DesktopWindow); - } - - if (List != NULL) - { - i = 0; - - if (hWndInsertAfter == HWND_TOP || hWndInsertAfter == HWND_NOTOPMOST) - { - if (hWndInsertAfter == HWND_NOTOPMOST || !(Window->ExStyle & WS_EX_TOPMOST)) - { - TRACE("skip all the topmost windows\n"); - /* skip all the topmost windows */ - while (List[i] && - (ChildObject = ValidateHwndNoErr(List[i])) && - (ChildObject->ExStyle & WS_EX_TOPMOST)) i++; - } - } - else if (hWndInsertAfter != HWND_TOPMOST) - { - /* skip windows that are already placed correctly */ - for (i = 0; List[i]; i++) - { - if (List[i] == hWndInsertAfter) break; - if (List[i] == UserHMGetHandle(Window)) - { - ExFreePoolWithTag(List, USERTAG_WINDOWLIST); - goto done; /* nothing to do if window is moving backwards in z-order */ - } - } - } - - for (; List[i]; i++) - { - PWND Wnd; - USER_REFERENCE_ENTRY Ref; - - if (List[i] == UserHMGetHandle(Window)) - break; - - if (!(Wnd = ValidateHwndNoErr(List[i]))) - continue; - - Owner = Wnd->spwndOwner ? Wnd->spwndOwner->head.h : NULL; - - if (Owner != UserHMGetHandle(Window)) continue; - - UserRefObjectCo(Wnd, &Ref); - TRACE( "moving %p owned by %p after %p\n", List[i], UserHMGetHandle(Window), hWndInsertAfter ); - co_WinPosSetWindowPos(Wnd, hWndInsertAfter, 0, 0, 0, 0, - SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING| SWP_DEFERERASE); - - UserDerefObjectCo(Wnd); - hWndInsertAfter = List[i]; - } - ExFreePoolWithTag(List, USERTAG_WINDOWLIST); - } -done: - return hWndInsertAfter; -} -//// - -/*********************************************************************** - * WinPosInternalMoveWindow - * - * Update WindowRect and ClientRect of Window and all of its children - * We keep both WindowRect and ClientRect in screen coordinates internally - */ -static -VOID FASTCALL -WinPosInternalMoveWindow(PWND Window, INT MoveX, INT MoveY) -{ - PWND Child; - - ASSERT(Window != Window->spwndChild); - TRACE("InternalMoveWin X %d Y %d\n", MoveX, MoveY); - - Window->rcWindow.left += MoveX; - Window->rcWindow.right += MoveX; - Window->rcWindow.top += MoveY; - Window->rcWindow.bottom += MoveY; - - Window->rcClient.left += MoveX; - Window->rcClient.right += MoveX; - Window->rcClient.top += MoveY; - Window->rcClient.bottom += MoveY; - - for(Child = Window->spwndChild; Child; Child = Child->spwndNext) - { - WinPosInternalMoveWindow(Child, MoveX, MoveY); - } -} - -/* - * WinPosFixupSWPFlags - * - * Fix redundant flags and values in the WINDOWPOS structure. - */ -static -BOOL FASTCALL -WinPosFixupFlags(WINDOWPOS *WinPos, PWND Wnd) -{ - PWND Parent; - POINT pt; - - /* Finally make sure that all coordinates are valid */ - if (WinPos->x < -32768) WinPos->x = -32768; - else if (WinPos->x > 32767) WinPos->x = 32767; - if (WinPos->y < -32768) WinPos->y = -32768; - else if (WinPos->y > 32767) WinPos->y = 32767; - - WinPos->cx = max(WinPos->cx, 0); - WinPos->cy = max(WinPos->cy, 0); - - Parent = UserGetAncestor( Wnd, GA_PARENT ); - if (!IntIsWindowVisible( Parent ) && - /* Fix B : wine msg test_SetParent:WmSetParentSeq_2:25 wParam bits! */ - (WinPos->flags & SWP_AGG_STATUSFLAGS) == SWP_AGG_NOPOSCHANGE) WinPos->flags |= SWP_NOREDRAW; - - if (Wnd->style & WS_VISIBLE) WinPos->flags &= ~SWP_SHOWWINDOW; - else - { - WinPos->flags &= ~SWP_HIDEWINDOW; - if (!(WinPos->flags & SWP_SHOWWINDOW)) WinPos->flags |= SWP_NOREDRAW; - } - - /* Check for right size */ - if (Wnd->rcWindow.right - Wnd->rcWindow.left == WinPos->cx && - Wnd->rcWindow.bottom - Wnd->rcWindow.top == WinPos->cy) - { - WinPos->flags |= SWP_NOSIZE; - } - - pt.x = WinPos->x; - pt.y = WinPos->y; - IntClientToScreen( Parent, &pt ); - TRACE("WPFU C2S wpx %d wpy %d ptx %d pty %d\n",WinPos->x,WinPos->y,pt.x,pt.y); - /* Check for right position */ - if (Wnd->rcWindow.left == pt.x && Wnd->rcWindow.top == pt.y) - { - //ERR("In right pos\n"); - WinPos->flags |= SWP_NOMOVE; - } - - if ( WinPos->hwnd != UserGetForegroundWindow() && (Wnd->style & (WS_POPUP | WS_CHILD)) != WS_CHILD) - { - /* Bring to the top when activating */ - if (!(WinPos->flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW)) && - (WinPos->flags & SWP_NOZORDER || - (WinPos->hwndInsertAfter != HWND_TOPMOST && WinPos->hwndInsertAfter != HWND_NOTOPMOST))) - { - WinPos->flags &= ~SWP_NOZORDER; - WinPos->hwndInsertAfter = (0 != (Wnd->ExStyle & WS_EX_TOPMOST) ? HWND_TOPMOST : HWND_TOP); - } - } - - /* Check hwndInsertAfter */ - if (!(WinPos->flags & SWP_NOZORDER)) - { - /* Fix sign extension */ - if (WinPos->hwndInsertAfter == (HWND)0xffff) - { - WinPos->hwndInsertAfter = HWND_TOPMOST; - } - else if (WinPos->hwndInsertAfter == (HWND)0xfffe) - { - WinPos->hwndInsertAfter = HWND_NOTOPMOST; - } - - if (WinPos->hwndInsertAfter == HWND_TOP) - { - /* Keep it topmost when it's already topmost */ - if ((Wnd->ExStyle & WS_EX_TOPMOST) != 0) - WinPos->hwndInsertAfter = HWND_TOPMOST; - - if (IntGetWindow(WinPos->hwnd, GW_HWNDFIRST) == WinPos->hwnd) - { - WinPos->flags |= SWP_NOZORDER; - } - } - else if (WinPos->hwndInsertAfter == HWND_BOTTOM) - { - if (!(Wnd->ExStyle & WS_EX_TOPMOST) && IntGetWindow(WinPos->hwnd, GW_HWNDLAST) == WinPos->hwnd) - WinPos->flags |= SWP_NOZORDER; - } - else if (WinPos->hwndInsertAfter == HWND_TOPMOST) - { - if ((Wnd->ExStyle & WS_EX_TOPMOST) && IntGetWindow(WinPos->hwnd, GW_HWNDFIRST) == WinPos->hwnd) - WinPos->flags |= SWP_NOZORDER; - } - else if (WinPos->hwndInsertAfter == HWND_NOTOPMOST) - { - if (!(Wnd->ExStyle & WS_EX_TOPMOST)) - WinPos->flags |= SWP_NOZORDER; - } - else /* hwndInsertAfter must be a sibling of the window */ - { - PWND InsAfterWnd; - - InsAfterWnd = ValidateHwndNoErr(WinPos->hwndInsertAfter); - if(!InsAfterWnd) - { - return TRUE; - } - - if (InsAfterWnd->spwndParent != Wnd->spwndParent) - { - /* Note from wine User32 Win test_SetWindowPos: - "Returns TRUE also for windows that are not siblings" - "Does not seem to do anything even without passing flags, still returns TRUE" - "Same thing the other way around." - ".. and with these windows." - */ - return FALSE; - } - else - { - /* - * We don't need to change the Z order of hwnd if it's already - * inserted after hwndInsertAfter or when inserting hwnd after - * itself. - */ - if ((WinPos->hwnd == WinPos->hwndInsertAfter) || - ((InsAfterWnd->spwndNext) && (WinPos->hwnd == InsAfterWnd->spwndNext->head.h))) - { - WinPos->flags |= SWP_NOZORDER; - } - } - } - } - - return TRUE; -} - -/* x and y are always screen relative */ -BOOLEAN FASTCALL -co_WinPosSetWindowPos( - PWND Window, - HWND WndInsertAfter, - INT x, - INT y, - INT cx, - INT cy, - UINT flags - ) -{ - WINDOWPOS WinPos; - RECTL NewWindowRect; - RECTL NewClientRect; - RECTL valid_rects[2]; - PREGION VisBefore = NULL; - PREGION VisBeforeJustClient = NULL; - PREGION VisAfter = NULL; - PREGION CopyRgn = NULL; - ULONG WvrFlags = 0; - RECTL OldWindowRect, OldClientRect; - int RgnType; - HDC Dc; - RECTL CopyRect; - PWND Ancestor; - BOOL bPointerInWindow, PosChanged = FALSE; - PTHREADINFO pti = PsGetCurrentThreadWin32Thread(); - - ASSERT_REFS_CO(Window); - - TRACE("pwnd %p, after %p, %d,%d (%dx%d), flags %s", - Window, WndInsertAfter, x, y, cx, cy, flags); -#if DBG - dump_winpos_flags(flags); -#endif - - /* FIXME: Get current active window from active queue. Why? since r2915. */ - - bPointerInWindow = IntPtInWindow(Window, gpsi->ptCursor.x, gpsi->ptCursor.y); - - WinPos.hwnd = Window->head.h; - WinPos.hwndInsertAfter = WndInsertAfter; - WinPos.x = x; - WinPos.y = y; - WinPos.cx = cx; - WinPos.cy = cy; - WinPos.flags = flags; - - if ( flags & SWP_ASYNCWINDOWPOS ) - { - LRESULT lRes; - PWINDOWPOS ppos = ExAllocatePoolWithTag(PagedPool, sizeof(WINDOWPOS), USERTAG_SWP); - if ( ppos ) - { - WinPos.flags &= ~SWP_ASYNCWINDOWPOS; // Clear flag. - *ppos = WinPos; - /* Yes it's a pointer inside Win32k! */ - lRes = co_IntSendMessageNoWait( WinPos.hwnd, WM_ASYNC_SETWINDOWPOS, 0, (LPARAM)ppos); - /* We handle this the same way as Event Hooks and Hooks. */ - if ( !lRes ) - { - ExFreePoolWithTag(ppos, USERTAG_SWP); - return FALSE; - } - return TRUE; - } - return FALSE; - } - - co_WinPosDoWinPosChanging(Window, &WinPos, &NewWindowRect, &NewClientRect); - - /* Does the window still exist? */ - if (!IntIsWindow(WinPos.hwnd)) - { - TRACE("WinPosSetWindowPos: Invalid handle 0x%p!\n",WinPos.hwnd); - EngSetLastError(ERROR_INVALID_WINDOW_HANDLE); - return FALSE; - } - - /* Fix up the flags. */ - if (!WinPosFixupFlags(&WinPos, Window)) - { - // See Note. - return TRUE; - } - - Ancestor = UserGetAncestor(Window, GA_PARENT); - if ( (WinPos.flags & (SWP_NOZORDER | SWP_HIDEWINDOW | SWP_SHOWWINDOW)) != SWP_NOZORDER && - Ancestor && Ancestor->head.h == IntGetDesktopWindow() ) - { - WinPos.hwndInsertAfter = WinPosDoOwnedPopups(Window, WinPos.hwndInsertAfter); - } - - if (!(WinPos.flags & SWP_NOREDRAW)) - { - /* Compute the visible region before the window position is changed */ - if (!(WinPos.flags & SWP_SHOWWINDOW) && - (WinPos.flags & (SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | - SWP_HIDEWINDOW | SWP_FRAMECHANGED)) != - (SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER)) - { - VisBefore = VIS_ComputeVisibleRegion(Window, FALSE, FALSE, - (Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE); - - if ( VisBefore != NULL && - REGION_Complexity(VisBefore) == NULLREGION ) - { - REGION_Delete(VisBefore); - VisBefore = NULL; - } - else if(VisBefore) - { - REGION_bOffsetRgn(VisBefore, -Window->rcWindow.left, -Window->rcWindow.top); - } - - /* Calculate the non client area for resizes, as this is used in the copy region */ - if (!(WinPos.flags & SWP_NOSIZE)) - { - VisBeforeJustClient = VIS_ComputeVisibleRegion(Window, TRUE, FALSE, - (Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE); - - if ( VisBeforeJustClient != NULL && - REGION_Complexity(VisBeforeJustClient) == NULLREGION ) - { - REGION_Delete(VisBeforeJustClient); - VisBeforeJustClient = NULL; - } - else if(VisBeforeJustClient) - { - REGION_bOffsetRgn(VisBeforeJustClient, -Window->rcWindow.left, -Window->rcWindow.top); - } - } - } - } - - //// HACK 3 - if (Window->hrgnNewFrame) - { - SelectWindowRgn( Window, Window->hrgnNewFrame ); // Should be PSMWP->acvr->hrgnClip - Window->hrgnNewFrame = NULL; - } - - WvrFlags = co_WinPosDoNCCALCSize(Window, &WinPos, &NewWindowRect, &NewClientRect, valid_rects); - -// ERR("co_WinPosDoNCCALCSize returned 0x%x\n valid dest: %d %d %d %d\n valid src : %d %d %d %d\n", WvrFlags, -// valid_rects[0].left,valid_rects[0].top,valid_rects[0].right,valid_rects[0].bottom, -// valid_rects[1].left,valid_rects[1].top,valid_rects[1].right,valid_rects[1].bottom); - - /* Validate link windows. (also take into account shell window in hwndShellWindow) */ - if (!(WinPos.flags & SWP_NOZORDER) && WinPos.hwnd != UserGetShellWindow()) - { - IntLinkHwnd(Window, WinPos.hwndInsertAfter); - } - - OldWindowRect = Window->rcWindow; - OldClientRect = Window->rcClient; - - if (NewClientRect.left != OldClientRect.left || - NewClientRect.top != OldClientRect.top) - { - // Move child window if their parent is moved. Keep Child window relative to Parent... - WinPosInternalMoveWindow(Window, - NewClientRect.left - OldClientRect.left, - NewClientRect.top - OldClientRect.top); - PosChanged = TRUE; - } - - Window->rcWindow = NewWindowRect; - Window->rcClient = NewClientRect; - - /* erase parent when hiding or resizing child */ - if (WinPos.flags & SWP_HIDEWINDOW) - { - /* Clear the update region */ - co_UserRedrawWindow( Window, - NULL, - 0, - RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE | RDW_NOINTERNALPAINT | RDW_ALLCHILDREN); - - if (UserIsDesktopWindow(Window->spwndParent)) - co_IntShellHookNotify(HSHELL_WINDOWDESTROYED, (WPARAM)Window->head.h, 0); - - Window->style &= ~WS_VISIBLE; //IntSetStyle( Window, 0, WS_VISIBLE ); - Window->head.pti->cVisWindows--; - IntNotifyWinEvent(EVENT_OBJECT_HIDE, Window, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI); - } - else if (WinPos.flags & SWP_SHOWWINDOW) - { - if (UserIsDesktopWindow(Window->spwndParent) && - Window->spwndOwner == NULL && - (!(Window->ExStyle & WS_EX_TOOLWINDOW) || - (Window->ExStyle & WS_EX_APPWINDOW))) - co_IntShellHookNotify(HSHELL_WINDOWCREATED, (WPARAM)Window->head.h, 0); - - Window->style |= WS_VISIBLE; //IntSetStyle( Window, WS_VISIBLE, 0 ); - Window->head.pti->cVisWindows++; - IntNotifyWinEvent(EVENT_OBJECT_SHOW, Window, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI); - } - - if (Window->hrgnUpdate != NULL && Window->hrgnUpdate != HRGN_WINDOW) - { - NtGdiOffsetRgn(Window->hrgnUpdate, - NewWindowRect.left - OldWindowRect.left, - NewWindowRect.top - OldWindowRect.top); - } - - DceResetActiveDCEs(Window); // For WS_VISIBLE changes. - - if (!(WinPos.flags & SWP_NOREDRAW)) - { - /* Determine the new visible region */ - VisAfter = VIS_ComputeVisibleRegion(Window, FALSE, FALSE, - (Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE); - - if ( VisAfter != NULL && - REGION_Complexity(VisAfter) == NULLREGION ) - { - REGION_Delete(VisAfter); - VisAfter = NULL; - } - else if(VisAfter) - { - REGION_bOffsetRgn(VisAfter, -Window->rcWindow.left, -Window->rcWindow.top); - } - - /* - * Determine which pixels can be copied from the old window position - * to the new. Those pixels must be visible in both the old and new - * position. Also, check the class style to see if the windows of this - * class need to be completely repainted on (horizontal/vertical) size - * change. - */ - if ( ( VisBefore != NULL && - VisAfter != NULL && - !(WinPos.flags & SWP_NOCOPYBITS) && - ((WinPos.flags & SWP_NOSIZE) || !(WvrFlags & WVR_REDRAW)) && - !(Window->ExStyle & WS_EX_TRANSPARENT) ) || - ( !PosChanged && (WinPos.flags & SWP_FRAMECHANGED) && VisBefore) ) - { - - /* - * If this is (also) a window resize, the whole nonclient area - * needs to be repainted. So we limit the copy to the client area, - * 'cause there is no use in copying it (would possibly cause - * "flashing" too). However, if the copy region is already empty, - * we don't have to crop (can't take anything away from an empty - * region...) - */ - - CopyRgn = IntSysCreateRectpRgn(0, 0, 0, 0); - if (WinPos.flags & SWP_NOSIZE) - RgnType = IntGdiCombineRgn(CopyRgn, VisAfter, VisBefore, RGN_AND); - else if (VisBeforeJustClient != NULL) - { - RgnType = IntGdiCombineRgn(CopyRgn, VisAfter, VisBeforeJustClient, RGN_AND); - REGION_Delete(VisBeforeJustClient); - } - - /* No use in copying bits which are in the update region. */ - if (Window->hrgnUpdate != NULL) - { - PREGION RgnUpdate = REGION_LockRgn(Window->hrgnUpdate); - if (RgnUpdate) - { - REGION_bOffsetRgn(CopyRgn, NewWindowRect.left, NewWindowRect.top); - IntGdiCombineRgn(CopyRgn, CopyRgn, RgnUpdate, RGN_DIFF); - REGION_bOffsetRgn(CopyRgn, -NewWindowRect.left, -NewWindowRect.top); - REGION_UnlockRgn(RgnUpdate); - } - } - - /* - * Now, get the bounding box of the copy region. If it's empty - * there's nothing to copy. Also, it's no use copying bits onto - * themselves. - */ - if (REGION_GetRgnBox(CopyRgn, &CopyRect) == NULLREGION) - { - /* Nothing to copy, clean up */ - REGION_Delete(CopyRgn); - CopyRgn = NULL; - } - else if ( OldWindowRect.left != NewWindowRect.left || - OldWindowRect.top != NewWindowRect.top || - (WinPos.flags & SWP_FRAMECHANGED) ) - { - HRGN DcRgn = NtGdiCreateRectRgn(0, 0, 0, 0); - PREGION DcRgnObj = REGION_LockRgn(DcRgn); - - /* - * Small trick here: there is no function to bitblt a region. So - * we set the region as the clipping region, take the bounding box - * of the region and bitblt that. Since nothing outside the clipping - * region is copied, this has the effect of bitblt'ing the region. - * - * Since NtUserGetDCEx takes ownership of the clip region, we need - * to create a copy of CopyRgn and pass that. We need CopyRgn later - */ - IntGdiCombineRgn(DcRgnObj, CopyRgn, NULL, RGN_COPY); - REGION_bOffsetRgn(DcRgnObj, NewWindowRect.left, NewWindowRect.top); - REGION_UnlockRgn(DcRgnObj); - Dc = UserGetDCEx( Window, - DcRgn, - DCX_WINDOW|DCX_CACHE|DCX_INTERSECTRGN|DCX_CLIPSIBLINGS|DCX_KEEPCLIPRGN); - NtGdiBitBlt( Dc, - CopyRect.left, CopyRect.top, - CopyRect.right - CopyRect.left, - CopyRect.bottom - CopyRect.top, - Dc, - CopyRect.left + (OldWindowRect.left - NewWindowRect.left), - CopyRect.top + (OldWindowRect.top - NewWindowRect.top), - SRCCOPY, - 0, - 0); - - UserReleaseDC(Window, Dc, FALSE); - IntValidateParent(Window, CopyRgn); - GreDeleteObject(DcRgn); - } - } - else - { - CopyRgn = NULL; - } -#if 0 - /////// Fixes NoPopup tests but breaks msg_paint tests. - if ( !PosChanged && (WinPos.flags & SWP_FRAMECHANGED) && VisBefore) - { - PWND Parent = Window->spwndParent; - ERR("SWP_FRAMECHANGED no chg\n"); - if ( !(Window->style & WS_CHILD) && (Parent) && (Parent->style & WS_CLIPCHILDREN)) - { - ERR("SWP_FRAMECHANGED Parent WS_CLIPCHILDREN\n"); - //IntInvalidateWindows( Window, VisBefore, /*RDW_ERASE |*/ RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN); - } - } -#endif - /* We need to redraw what wasn't visible before */ - if (VisAfter != NULL) - { - PREGION DirtyRgn = IntSysCreateRectpRgn(0, 0, 0, 0); - if (DirtyRgn) - { - if (CopyRgn != NULL) - { - RgnType = IntGdiCombineRgn(DirtyRgn, VisAfter, CopyRgn, RGN_DIFF); - } - else - { - RgnType = IntGdiCombineRgn(DirtyRgn, VisAfter, 0, RGN_COPY); - } - - if (RgnType != ERROR && RgnType != NULLREGION) - { - /* old code - NtGdiOffsetRgn(DirtyRgn, Window->rcWindow.left, Window->rcWindow.top); - IntInvalidateWindows( Window, - DirtyRgn, - RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN); - } - GreDeleteObject(DirtyRgn); - */ - - PWND Parent = Window->spwndParent; - - REGION_bOffsetRgn( DirtyRgn, Window->rcWindow.left, Window->rcWindow.top); - - if ( (Window->style & WS_CHILD) && (Parent) && !(Parent->style & WS_CLIPCHILDREN)) - { - IntInvalidateWindows( Parent, DirtyRgn, RDW_ERASE | RDW_INVALIDATE); - co_IntPaintWindows(Parent, RDW_NOCHILDREN, FALSE); - } - else - { - IntInvalidateWindows( Window, DirtyRgn, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN); - } - } - REGION_Delete(DirtyRgn); - } - } - - if (CopyRgn != NULL) - { - REGION_Delete(CopyRgn); - } - - /* Expose what was covered before but not covered anymore */ - if (VisBefore != NULL) - { - PREGION ExposedRgn = IntSysCreateRectpRgn(0, 0, 0, 0); - if (ExposedRgn) - { - RgnType = IntGdiCombineRgn(ExposedRgn, VisBefore, NULL, RGN_COPY); - REGION_bOffsetRgn(ExposedRgn, - OldWindowRect.left - NewWindowRect.left, - OldWindowRect.top - NewWindowRect.top); - - if (VisAfter != NULL) - RgnType = IntGdiCombineRgn(ExposedRgn, ExposedRgn, VisAfter, RGN_DIFF); - - if (RgnType != ERROR && RgnType != NULLREGION) - { - co_VIS_WindowLayoutChanged(Window, ExposedRgn); - } - REGION_Delete(ExposedRgn); - } - REGION_Delete(VisBefore); - } - - if (VisAfter != NULL) - { - REGION_Delete(VisAfter); - } - } - - if (!(WinPos.flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW))) - { - if ((Window->style & (WS_CHILD | WS_POPUP)) == WS_CHILD) - { - co_IntSendMessageNoWait(WinPos.hwnd, WM_CHILDACTIVATE, 0, 0); - } - else - { - //ERR("SetWindowPos Set FG Window!\n"); - if ( pti->MessageQueue->spwndActive != Window || - pti->MessageQueue != gpqForeground ) - { - //ERR("WPSWP : set active window\n"); - if (!(Window->state & WNDS_BEINGACTIVATED)) // Inside SAW? - { - co_IntSetForegroundWindow(Window); // Fixes SW_HIDE issues. Wine win test_SetActiveWindow & test_SetForegroundWindow. - } - } - } - } - - if ( !PosChanged && - (WinPos.flags & SWP_FRAMECHANGED) && - !(WinPos.flags & SWP_DEFERERASE) && // Prevent sending WM_SYNCPAINT message. - VisAfter ) - { - PWND Parent = Window->spwndParent; - if ( !(Window->style & WS_CHILD) && (Parent) && (Parent->style & WS_CLIPCHILDREN)) - { - TRACE("SWP_FRAMECHANGED Parent WS_CLIPCHILDREN\n"); - UserSyncAndPaintWindows( Parent, RDW_CLIPCHILDREN); - } - } - - // Fix wine msg test_SetFocus, prevents sending WM_WINDOWPOSCHANGED. - if ( VisBefore == NULL && - VisBeforeJustClient == NULL && - !(Window->ExStyle & WS_EX_TOPMOST) && - (WinPos.flags & SWP_AGG_STATUSFLAGS) == (SWP_AGG_NOPOSCHANGE & ~SWP_NOZORDER)) - { - TRACE("No drawing, set no Z order and no redraw!\n"); - WinPos.flags |= SWP_NOZORDER|SWP_NOREDRAW; - } - - /* And last, send the WM_WINDOWPOSCHANGED message */ - - TRACE("\tstatus hwnd %p flags = %04x\n",Window?Window->head.h:NULL,WinPos.flags & SWP_AGG_STATUSFLAGS); - - if ((WinPos.flags & SWP_AGG_STATUSFLAGS) != SWP_AGG_NOPOSCHANGE) - { - /* WM_WINDOWPOSCHANGED is sent even if SWP_NOSENDCHANGING is set - and always contains final window position. - */ - WinPos.x = NewWindowRect.left; - WinPos.y = NewWindowRect.top; - WinPos.cx = NewWindowRect.right - NewWindowRect.left; - WinPos.cy = NewWindowRect.bottom - NewWindowRect.top; - TRACE("WM_WINDOWPOSCHANGED hwnd %p Flags %04x\n",WinPos.hwnd,WinPos.flags); - co_IntSendMessageNoWait(WinPos.hwnd, WM_WINDOWPOSCHANGED, 0, (LPARAM) &WinPos); - } - - if ( WinPos.flags & SWP_FRAMECHANGED || WinPos.flags & SWP_STATECHANGED || - !(WinPos.flags & SWP_NOCLIENTSIZE) || !(WinPos.flags & SWP_NOCLIENTMOVE) ) - { - PWND pWnd = ValidateHwndNoErr(WinPos.hwnd); - if (pWnd) - IntNotifyWinEvent(EVENT_OBJECT_LOCATIONCHANGE, pWnd, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI); - } - - if(bPointerInWindow != IntPtInWindow(Window, gpsi->ptCursor.x, gpsi->ptCursor.y)) - { - /* Generate mouse move message */ - MSG msg; - msg.message = WM_MOUSEMOVE; - msg.wParam = UserGetMouseButtonsState(); - msg.lParam = MAKELPARAM(gpsi->ptCursor.x, gpsi->ptCursor.y); - msg.pt = gpsi->ptCursor; - co_MsqInsertMouseMessage(&msg, 0, 0, TRUE); - } - - return TRUE; -} - -LRESULT FASTCALL -co_WinPosGetNonClientSize(PWND Window, RECT* WindowRect, RECT* ClientRect) -{ - LRESULT Result; - - ASSERT_REFS_CO(Window); - - *ClientRect = *WindowRect; - Result = co_IntSendMessageNoWait(Window->head.h, WM_NCCALCSIZE, FALSE, (LPARAM) ClientRect); - - FixClientRect(ClientRect, WindowRect); - - return Result; -} - -void FASTCALL -co_WinPosSendSizeMove(PWND Wnd) -{ - RECTL Rect; - LPARAM lParam; - WPARAM wParam = SIZE_RESTORED; - - IntGetClientRect(Wnd, &Rect); - lParam = MAKELONG(Rect.right-Rect.left, Rect.bottom-Rect.top); - - Wnd->state &= ~WNDS_SENDSIZEMOVEMSGS; - - if (Wnd->style & WS_MAXIMIZE) - { - wParam = SIZE_MAXIMIZED; - } - else if (Wnd->style & WS_MINIMIZE) - { - wParam = SIZE_MINIMIZED; - lParam = 0; - } - - co_IntSendMessageNoWait(UserHMGetHandle(Wnd), WM_SIZE, wParam, lParam); - - if (UserIsDesktopWindow(Wnd->spwndParent)) - lParam = MAKELONG(Wnd->rcClient.left, Wnd->rcClient.top); - else - lParam = MAKELONG(Wnd->rcClient.left-Wnd->spwndParent->rcClient.left, Wnd->rcClient.top-Wnd->spwndParent->rcClient.top); - - co_IntSendMessageNoWait(UserHMGetHandle(Wnd), WM_MOVE, 0, lParam); - - IntEngWindowChanged(Wnd, WOC_RGN_CLIENT); -} - /* ShowWindow does not set SWP_FRAMECHANGED!!! Fix wine msg test_SetParent:WmSetParentSeq_2:23 wParam bits! */
7 years, 8 months
1
0
0
0
[tfaber] 74014: [USBSTOR] - Fix error check in USBSTOR_SelectConfigurationAndInterface. CID 515249
by tfaber@svn.reactos.org
Author: tfaber Date: Wed Mar 1 13:51:18 2017 New Revision: 74014 URL:
http://svn.reactos.org/svn/reactos?rev=74014&view=rev
Log: [USBSTOR] - Fix error check in USBSTOR_SelectConfigurationAndInterface. CID 515249 Modified: trunk/reactos/drivers/usb/usbstor/descriptor.c Modified: trunk/reactos/drivers/usb/usbstor/descriptor.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbstor/descri…
============================================================================== --- trunk/reactos/drivers/usb/usbstor/descriptor.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbstor/descriptor.c [iso-8859-1] Wed Mar 1 13:51:18 2017 @@ -422,14 +422,14 @@ // backup interface information // DeviceExtension->InterfaceInformation = (PUSBD_INTERFACE_INFORMATION)AllocateItem(NonPagedPool, Urb->UrbSelectConfiguration.Interface.Length); - if (!NT_SUCCESS(Status)) + if (!DeviceExtension->InterfaceInformation) { // // failed to allocate interface information structure // FreeItem(InterfaceList); ExFreePoolWithTag(Urb, 0); - return Status; + return STATUS_INSUFFICIENT_RESOURCES; } //
7 years, 8 months
1
0
0
0
[tfaber] 74013: [NTOS:IO] - Avoid event leak in NtQueryInformationFile. CID 716584
by tfaber@svn.reactos.org
Author: tfaber Date: Wed Mar 1 13:10:52 2017 New Revision: 74013 URL:
http://svn.reactos.org/svn/reactos?rev=74013&view=rev
Log: [NTOS:IO] - Avoid event leak in NtQueryInformationFile. CID 716584 Modified: trunk/reactos/ntoskrnl/io/iomgr/iofunc.c Modified: trunk/reactos/ntoskrnl/io/iomgr/iofunc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/iofunc.c…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] Wed Mar 1 13:10:52 2017 @@ -2240,8 +2240,17 @@ } _SEH2_END; - /* Unlock FO */ - IopUnlockFileObject(FileObject); + /* Free the event if we had one */ + if (LocalEvent) + { + ExFreePoolWithTag(Event, TAG_IO); + } + + /* If FO was locked, unlock it */ + if (FileObject->Flags & FO_SYNCHRONOUS_IO) + { + IopUnlockFileObject(FileObject); + } /* We're done with FastIO! */ ObDereferenceObject(FileObject);
7 years, 8 months
1
0
0
0
[gadamopoulos] 74012: [COMCTL32] -Add initial implementation for BCM_GETIDEALSIZE and support to draw buttons with image lists. This is still WIP and needs tons of new tests. Crappy themes will be ...
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Wed Mar 1 11:49:59 2017 New Revision: 74012 URL:
http://svn.reactos.org/svn/reactos?rev=74012&view=rev
Log: [COMCTL32] -Add initial implementation for BCM_GETIDEALSIZE and support to draw buttons with image lists. This is still WIP and needs tons of new tests. Crappy themes will be displayed like crap for now. Modified: trunk/reactos/dll/win32/comctl32/button.c trunk/reactos/dll/win32/comctl32/theme_button.c Modified: trunk/reactos/dll/win32/comctl32/button.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/button.…
============================================================================== --- trunk/reactos/dll/win32/comctl32/button.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/button.c [iso-8859-1] Wed Mar 1 11:49:59 2017 @@ -237,6 +237,7 @@ } BOOL BUTTON_PaintWithTheme(HTHEME theme, HWND hwnd, HDC hParamDC, LPARAM prfFlag); +WCHAR *get_button_text( HWND hwnd ); static inline LONG_PTR get_button_image(HWND hwnd) { @@ -307,11 +308,96 @@ ReleaseDC( hwnd, hdc ); } +BOOL BUTTON_GetIdealSize(HTHEME theme, HWND hwnd, SIZE* psize) +{ + PBUTTON_DATA pdata; + HDC hdc; + WCHAR *text; + HFONT hFont = 0, hPrevFont = 0; + SIZE TextSize, ImageSize, ButtonSize; + + pdata = _GetButtonData(hwnd); + text = get_button_text( hwnd ); + hdc = GetDC(hwnd); + if (!pdata || !text || !hdc || !text[0]) + { + psize->cx = 100; + psize->cy = 100; + goto cleanup; + } + + /* FIXME : Should use GetThemeTextExtent but unfortunately uses DrawTextW which is broken */ + if (theme) + { + LOGFONTW logfont; + HRESULT hr = GetThemeFont(theme, hdc, BP_PUSHBUTTON, PBS_NORMAL, TMT_FONT, &logfont); + if(SUCCEEDED(hr)) + { + hFont = CreateFontIndirectW(&logfont); + if(hFont) + hPrevFont = SelectObject( hdc, hFont ); + } + } + else + { + if (pdata->font) + hPrevFont = SelectObject( hdc, pdata->font ); + } + + GetTextExtentPoint32W(hdc, text, wcslen(text), &TextSize); + + if (hPrevFont) + SelectObject( hdc, hPrevFont ); + + TextSize.cy += pdata->rcTextMargin.top + pdata->rcTextMargin.bottom; + TextSize.cx += pdata->rcTextMargin.left + pdata->rcTextMargin.right; + + if (pdata->imlData.himl && ImageList_GetIconSize(pdata->imlData.himl, &ImageSize.cx, &ImageSize.cy)) + { + ImageSize.cx += pdata->imlData.margin.left + pdata->imlData.margin.right; + ImageSize.cy += pdata->imlData.margin.top + pdata->imlData.margin.bottom; + } + else + { + ImageSize.cx = ImageSize.cy = 0; + } + + if (theme) + { + RECT rcContents = {0}; + RECT rcButtonExtent = {0}; + rcContents.right = ImageSize.cx + TextSize.cx; + rcContents.bottom = max(ImageSize.cy, TextSize.cy); + GetThemeBackgroundExtent(theme, hdc, BP_PUSHBUTTON, PBS_NORMAL, &rcContents, &rcButtonExtent); + ERR("rcContents: %d, %d, %d, %d\n", rcContents.left, rcContents.top, rcContents.right, rcContents.bottom); + ERR("rcButtonExtent: %d, %d, %d, %d\n", rcButtonExtent.left, rcButtonExtent.top, rcButtonExtent.right, rcButtonExtent.bottom); + ButtonSize.cx = abs(rcButtonExtent.right - rcButtonExtent.left) + 1; + ButtonSize.cy = abs(rcButtonExtent.bottom - rcButtonExtent.top) - 1; + } + else + { + ButtonSize.cx = ImageSize.cx + TextSize.cx + 5; + ButtonSize.cy = max(ImageSize.cy, TextSize.cy + 7); + } + + *psize = ButtonSize; + +cleanup: + if (hFont) + DeleteObject(hFont); + if (text) + HeapFree( GetProcessHeap(), 0, text ); + if (hdc) + ReleaseDC(hwnd, hdc); + + return TRUE; +} + #endif /* retrieve the button text; returned buffer must be freed by caller */ -static inline WCHAR *get_button_text( HWND hwnd ) +inline WCHAR *get_button_text( HWND hwnd ) { INT len = 512; WCHAR *buffer = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) ); @@ -485,6 +571,21 @@ return FALSE; *pimldata = data->imlData; return TRUE; + } + case BCM_GETIDEALSIZE: + { + HTHEME theme = GetWindowTheme(hWnd); + + if (btn_type != BS_PUSHBUTTON && btn_type != BS_DEFPUSHBUTTON) + { + SIZE* pSize = (SIZE*)lParam; + GetClientRect(hWnd, &rect); + pSize->cx = rect.right; + pSize->cy = rect.bottom; + return TRUE; + } + + return BUTTON_GetIdealSize(theme, hWnd, (SIZE*)lParam); } } @@ -1110,11 +1211,34 @@ */ static BOOL CALLBACK BUTTON_DrawTextCallback(HDC hdc, LPARAM lp, WPARAM wp, int cx, int cy) { +#ifdef _USER32_ RECT rc; SetRect(&rc, 0, 0, cx, cy); DrawTextW(hdc, (LPCWSTR)lp, -1, &rc, (UINT)wp); return TRUE; +#else + HWND hwnd = (HWND)lp; + RECT rc; + PBUTTON_DATA pdata = _GetButtonData(hwnd); + SIZE ImageSize; + WCHAR *text = NULL; + + if (!(text = get_button_text( hwnd ))) return TRUE; + + SetRect(&rc, 0, 0, cx, cy); + + if (pdata->imlData.himl && ImageList_GetIconSize(pdata->imlData.himl, &ImageSize.cx, &ImageSize.cy)) + { + int left = pdata->imlData.margin.left; + int top = (cy - ImageSize.cy) / 2; + rc.left += pdata->imlData.margin.left + pdata->imlData.margin.right + ImageSize.cy; + ImageList_Draw(pdata->imlData.himl, 0, hdc, left, top, 0); + } + + DrawTextW(hdc, text, -1, &rc, (UINT)wp); + return TRUE; +#endif } @@ -1150,8 +1274,13 @@ case BS_TEXT: /* DST_COMPLEX -- is 0 */ lpOutputProc = BUTTON_DrawTextCallback; +#ifdef _USER32_ if (!(text = get_button_text( hwnd ))) return; lp = (LPARAM)text; +#else + lp = (LPARAM)hwnd; +#endif + wp = (WPARAM)dtFlags; #ifdef __REACTOS__ Modified: trunk/reactos/dll/win32/comctl32/theme_button.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/theme_b…
============================================================================== --- trunk/reactos/dll/win32/comctl32/theme_button.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/theme_button.c [iso-8859-1] Wed Mar 1 11:49:59 2017 @@ -111,6 +111,8 @@ HFONT hPrevFont = font ? SelectObject(hDC, font) : NULL; int state = states[ drawState ]; WCHAR *text = get_button_text(hwnd); + PBUTTON_DATA pdata = _GetButtonData(hwnd); + SIZE ImageSize; GetClientRect(hwnd, &bgRect); GetThemeBackgroundContentRect(theme, hDC, BP_PUSHBUTTON, state, &bgRect, &textRect); @@ -122,6 +124,15 @@ } DrawThemeBackground(theme, hDC, BP_PUSHBUTTON, state, &bgRect, NULL); + + if (pdata->imlData.himl && ImageList_GetIconSize(pdata->imlData.himl, &ImageSize.cx, &ImageSize.cy)) + { + int left = textRect.left + pdata->imlData.margin.left; + int top = textRect.top + (textRect.bottom - textRect.top - ImageSize.cy) / 2; + textRect.left += pdata->imlData.margin.left + pdata->imlData.margin.right + ImageSize.cy; + ImageList_Draw(pdata->imlData.himl, 0, hDC, left, top, 0); + } + if (text) { DrawThemeText(theme, hDC, BP_PUSHBUTTON, state, text, lstrlenW(text), dtFlags, 0, &textRect);
7 years, 8 months
1
0
0
0
[tfaber] 74011: [ACPICA] - Update to version 20170119, since the February version needs more work. CORE-12833 #resolve
by tfaber@svn.reactos.org
Author: tfaber Date: Wed Mar 1 11:36:19 2017 New Revision: 74011 URL:
http://svn.reactos.org/svn/reactos?rev=74011&view=rev
Log: [ACPICA] - Update to version 20170119, since the February version needs more work. CORE-12833 #resolve Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsargs.c trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dscontrol.c trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsdebug.c trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsfield.c trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsinit.c trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsmethod.c trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsmthdat.c trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsobject.c trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsopcode.c trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsutils.c trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dswexec.c trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dswload.c trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dswload2.c trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dswscope.c trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dswstate.c trunk/reactos/drivers/bus/acpi/acpica/events/evevent.c trunk/reactos/drivers/bus/acpi/acpica/events/evglock.c trunk/reactos/drivers/bus/acpi/acpica/events/evgpe.c trunk/reactos/drivers/bus/acpi/acpica/events/evgpeblk.c trunk/reactos/drivers/bus/acpi/acpica/events/evgpeinit.c trunk/reactos/drivers/bus/acpi/acpica/events/evgpeutil.c trunk/reactos/drivers/bus/acpi/acpica/events/evhandler.c trunk/reactos/drivers/bus/acpi/acpica/events/evmisc.c trunk/reactos/drivers/bus/acpi/acpica/events/evregion.c trunk/reactos/drivers/bus/acpi/acpica/events/evrgnini.c trunk/reactos/drivers/bus/acpi/acpica/events/evsci.c trunk/reactos/drivers/bus/acpi/acpica/events/evxface.c trunk/reactos/drivers/bus/acpi/acpica/events/evxfevnt.c trunk/reactos/drivers/bus/acpi/acpica/events/evxfgpe.c trunk/reactos/drivers/bus/acpi/acpica/events/evxfregn.c trunk/reactos/drivers/bus/acpi/acpica/executer/exconcat.c trunk/reactos/drivers/bus/acpi/acpica/executer/exconfig.c trunk/reactos/drivers/bus/acpi/acpica/executer/exconvrt.c trunk/reactos/drivers/bus/acpi/acpica/executer/excreate.c trunk/reactos/drivers/bus/acpi/acpica/executer/exdebug.c trunk/reactos/drivers/bus/acpi/acpica/executer/exdump.c trunk/reactos/drivers/bus/acpi/acpica/executer/exfield.c trunk/reactos/drivers/bus/acpi/acpica/executer/exfldio.c trunk/reactos/drivers/bus/acpi/acpica/executer/exmisc.c trunk/reactos/drivers/bus/acpi/acpica/executer/exmutex.c trunk/reactos/drivers/bus/acpi/acpica/executer/exnames.c trunk/reactos/drivers/bus/acpi/acpica/executer/exoparg1.c trunk/reactos/drivers/bus/acpi/acpica/executer/exoparg2.c trunk/reactos/drivers/bus/acpi/acpica/executer/exoparg3.c trunk/reactos/drivers/bus/acpi/acpica/executer/exoparg6.c trunk/reactos/drivers/bus/acpi/acpica/executer/exprep.c trunk/reactos/drivers/bus/acpi/acpica/executer/exregion.c trunk/reactos/drivers/bus/acpi/acpica/executer/exresnte.c trunk/reactos/drivers/bus/acpi/acpica/executer/exresolv.c trunk/reactos/drivers/bus/acpi/acpica/executer/exresop.c trunk/reactos/drivers/bus/acpi/acpica/executer/exstore.c trunk/reactos/drivers/bus/acpi/acpica/executer/exstoren.c trunk/reactos/drivers/bus/acpi/acpica/executer/exstorob.c trunk/reactos/drivers/bus/acpi/acpica/executer/exsystem.c trunk/reactos/drivers/bus/acpi/acpica/executer/extrace.c trunk/reactos/drivers/bus/acpi/acpica/executer/exutils.c trunk/reactos/drivers/bus/acpi/acpica/hardware/hwacpi.c trunk/reactos/drivers/bus/acpi/acpica/hardware/hwesleep.c trunk/reactos/drivers/bus/acpi/acpica/hardware/hwgpe.c trunk/reactos/drivers/bus/acpi/acpica/hardware/hwpci.c trunk/reactos/drivers/bus/acpi/acpica/hardware/hwregs.c trunk/reactos/drivers/bus/acpi/acpica/hardware/hwsleep.c trunk/reactos/drivers/bus/acpi/acpica/hardware/hwtimer.c trunk/reactos/drivers/bus/acpi/acpica/hardware/hwvalid.c trunk/reactos/drivers/bus/acpi/acpica/hardware/hwxface.c trunk/reactos/drivers/bus/acpi/acpica/hardware/hwxfsleep.c trunk/reactos/drivers/bus/acpi/acpica/include/acapps.h trunk/reactos/drivers/bus/acpi/acpica/include/acbuffer.h trunk/reactos/drivers/bus/acpi/acpica/include/acclib.h trunk/reactos/drivers/bus/acpi/acpica/include/accommon.h trunk/reactos/drivers/bus/acpi/acpica/include/acconfig.h trunk/reactos/drivers/bus/acpi/acpica/include/acdebug.h trunk/reactos/drivers/bus/acpi/acpica/include/acdisasm.h trunk/reactos/drivers/bus/acpi/acpica/include/acdispat.h trunk/reactos/drivers/bus/acpi/acpica/include/acevents.h trunk/reactos/drivers/bus/acpi/acpica/include/acexcep.h trunk/reactos/drivers/bus/acpi/acpica/include/acglobal.h trunk/reactos/drivers/bus/acpi/acpica/include/achware.h trunk/reactos/drivers/bus/acpi/acpica/include/acinterp.h trunk/reactos/drivers/bus/acpi/acpica/include/aclocal.h trunk/reactos/drivers/bus/acpi/acpica/include/acmacros.h trunk/reactos/drivers/bus/acpi/acpica/include/acnames.h trunk/reactos/drivers/bus/acpi/acpica/include/acnamesp.h trunk/reactos/drivers/bus/acpi/acpica/include/acobject.h trunk/reactos/drivers/bus/acpi/acpica/include/acopcode.h trunk/reactos/drivers/bus/acpi/acpica/include/acoutput.h trunk/reactos/drivers/bus/acpi/acpica/include/acparser.h trunk/reactos/drivers/bus/acpi/acpica/include/acpi.h trunk/reactos/drivers/bus/acpi/acpica/include/acpiosxf.h trunk/reactos/drivers/bus/acpi/acpica/include/acpixf.h trunk/reactos/drivers/bus/acpi/acpica/include/acpredef.h trunk/reactos/drivers/bus/acpi/acpica/include/acresrc.h trunk/reactos/drivers/bus/acpi/acpica/include/acrestyp.h trunk/reactos/drivers/bus/acpi/acpica/include/acstruct.h trunk/reactos/drivers/bus/acpi/acpica/include/actables.h trunk/reactos/drivers/bus/acpi/acpica/include/actbl.h trunk/reactos/drivers/bus/acpi/acpica/include/actbl1.h trunk/reactos/drivers/bus/acpi/acpica/include/actbl2.h trunk/reactos/drivers/bus/acpi/acpica/include/actbl3.h trunk/reactos/drivers/bus/acpi/acpica/include/actypes.h trunk/reactos/drivers/bus/acpi/acpica/include/acutils.h trunk/reactos/drivers/bus/acpi/acpica/include/acuuid.h trunk/reactos/drivers/bus/acpi/acpica/include/amlcode.h trunk/reactos/drivers/bus/acpi/acpica/include/amlresrc.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/accygwin.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acdragonfly.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acdragonflyex.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acefi.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acefiex.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acenv.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acenvex.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acfreebsd.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acgcc.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acgccex.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/achaiku.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acintel.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/aclinux.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/aclinuxex.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acmacosx.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acmsvc.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acmsvcex.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acnetbsd.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acos2.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acqnx.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acwin.h trunk/reactos/drivers/bus/acpi/acpica/include/platform/acwin64.h trunk/reactos/drivers/bus/acpi/acpica/namespace/nsaccess.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nsalloc.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nsarguments.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nsconvert.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nsdump.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nsdumpdv.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nseval.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nsinit.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nsload.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nsnames.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nsobject.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nsparse.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nspredef.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nsprepkg.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nsrepair.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nsrepair2.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nssearch.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nsutils.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nswalk.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nsxfeval.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nsxfname.c trunk/reactos/drivers/bus/acpi/acpica/namespace/nsxfobj.c trunk/reactos/drivers/bus/acpi/acpica/parser/psargs.c trunk/reactos/drivers/bus/acpi/acpica/parser/psloop.c trunk/reactos/drivers/bus/acpi/acpica/parser/psobject.c trunk/reactos/drivers/bus/acpi/acpica/parser/psopcode.c trunk/reactos/drivers/bus/acpi/acpica/parser/psopinfo.c trunk/reactos/drivers/bus/acpi/acpica/parser/psparse.c trunk/reactos/drivers/bus/acpi/acpica/parser/psscope.c trunk/reactos/drivers/bus/acpi/acpica/parser/pstree.c trunk/reactos/drivers/bus/acpi/acpica/parser/psutils.c trunk/reactos/drivers/bus/acpi/acpica/parser/pswalk.c trunk/reactos/drivers/bus/acpi/acpica/parser/psxface.c trunk/reactos/drivers/bus/acpi/acpica/resources/rsaddr.c trunk/reactos/drivers/bus/acpi/acpica/resources/rscalc.c trunk/reactos/drivers/bus/acpi/acpica/resources/rscreate.c trunk/reactos/drivers/bus/acpi/acpica/resources/rsdump.c trunk/reactos/drivers/bus/acpi/acpica/resources/rsdumpinfo.c trunk/reactos/drivers/bus/acpi/acpica/resources/rsinfo.c trunk/reactos/drivers/bus/acpi/acpica/resources/rsio.c trunk/reactos/drivers/bus/acpi/acpica/resources/rsirq.c trunk/reactos/drivers/bus/acpi/acpica/resources/rslist.c trunk/reactos/drivers/bus/acpi/acpica/resources/rsmemory.c trunk/reactos/drivers/bus/acpi/acpica/resources/rsmisc.c trunk/reactos/drivers/bus/acpi/acpica/resources/rsserial.c trunk/reactos/drivers/bus/acpi/acpica/resources/rsutils.c trunk/reactos/drivers/bus/acpi/acpica/resources/rsxface.c trunk/reactos/drivers/bus/acpi/acpica/tables/tbdata.c trunk/reactos/drivers/bus/acpi/acpica/tables/tbfadt.c trunk/reactos/drivers/bus/acpi/acpica/tables/tbfind.c trunk/reactos/drivers/bus/acpi/acpica/tables/tbinstal.c trunk/reactos/drivers/bus/acpi/acpica/tables/tbprint.c trunk/reactos/drivers/bus/acpi/acpica/tables/tbutils.c trunk/reactos/drivers/bus/acpi/acpica/tables/tbxface.c trunk/reactos/drivers/bus/acpi/acpica/tables/tbxfload.c trunk/reactos/drivers/bus/acpi/acpica/tables/tbxfroot.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utaddress.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utalloc.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utascii.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utbuffer.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utcache.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utclib.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utcopy.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utdebug.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utdecode.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utdelete.c trunk/reactos/drivers/bus/acpi/acpica/utilities/uterror.c trunk/reactos/drivers/bus/acpi/acpica/utilities/uteval.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utexcep.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utglobal.c trunk/reactos/drivers/bus/acpi/acpica/utilities/uthex.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utids.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utinit.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utlock.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utmath.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utmisc.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utmutex.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utnonansi.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utobject.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utosi.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utownerid.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utpredef.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utprint.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utresrc.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utstate.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utstring.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utstrtoul64.c trunk/reactos/drivers/bus/acpi/acpica/utilities/uttrack.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utuuid.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utxface.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utxferror.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utxfinit.c trunk/reactos/drivers/bus/acpi/acpica/utilities/utxfmutex.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsargs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/di…
Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dscontrol.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/di…
Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsdebug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/di…
Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsfield.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/di…
Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/di…
Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsmethod.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/di…
Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsmthdat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/di…
Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsobject.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/di…
Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsopcode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/di…
Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsutils.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/di…
Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dswexec.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/di…
Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dswload.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/di…
Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dswload2.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/di…
Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dswscope.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/di…
Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dswstate.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/di…
Modified: trunk/reactos/drivers/bus/acpi/acpica/events/evevent.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ev…
Modified: trunk/reactos/drivers/bus/acpi/acpica/events/evglock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ev…
Modified: trunk/reactos/drivers/bus/acpi/acpica/events/evgpe.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ev…
Modified: trunk/reactos/drivers/bus/acpi/acpica/events/evgpeblk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ev…
Modified: trunk/reactos/drivers/bus/acpi/acpica/events/evgpeinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ev…
Modified: trunk/reactos/drivers/bus/acpi/acpica/events/evgpeutil.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ev…
Modified: trunk/reactos/drivers/bus/acpi/acpica/events/evhandler.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ev…
Modified: trunk/reactos/drivers/bus/acpi/acpica/events/evmisc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ev…
Modified: trunk/reactos/drivers/bus/acpi/acpica/events/evregion.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ev…
Modified: trunk/reactos/drivers/bus/acpi/acpica/events/evrgnini.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ev…
Modified: trunk/reactos/drivers/bus/acpi/acpica/events/evsci.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ev…
Modified: trunk/reactos/drivers/bus/acpi/acpica/events/evxface.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ev…
Modified: trunk/reactos/drivers/bus/acpi/acpica/events/evxfevnt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ev…
Modified: trunk/reactos/drivers/bus/acpi/acpica/events/evxfgpe.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ev…
Modified: trunk/reactos/drivers/bus/acpi/acpica/events/evxfregn.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ev…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exconcat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exconfig.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exconvrt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/excreate.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exdebug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exdump.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exfield.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exfldio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exmisc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exmutex.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exnames.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exoparg1.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exoparg2.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exoparg3.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exoparg6.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exprep.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exregion.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exresnte.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exresolv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exresop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exstore.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exstoren.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exstorob.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exsystem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/extrace.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exutils.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
Modified: trunk/reactos/drivers/bus/acpi/acpica/hardware/hwacpi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ha…
Modified: trunk/reactos/drivers/bus/acpi/acpica/hardware/hwesleep.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ha…
Modified: trunk/reactos/drivers/bus/acpi/acpica/hardware/hwgpe.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ha…
Modified: trunk/reactos/drivers/bus/acpi/acpica/hardware/hwpci.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ha…
Modified: trunk/reactos/drivers/bus/acpi/acpica/hardware/hwregs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ha…
Modified: trunk/reactos/drivers/bus/acpi/acpica/hardware/hwsleep.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ha…
Modified: trunk/reactos/drivers/bus/acpi/acpica/hardware/hwtimer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ha…
Modified: trunk/reactos/drivers/bus/acpi/acpica/hardware/hwvalid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ha…
Modified: trunk/reactos/drivers/bus/acpi/acpica/hardware/hwxface.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ha…
Modified: trunk/reactos/drivers/bus/acpi/acpica/hardware/hwxfsleep.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ha…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acapps.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acbuffer.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acclib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/accommon.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acconfig.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acdebug.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acdisasm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acdispat.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acevents.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acexcep.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acglobal.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/achware.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acinterp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/aclocal.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acmacros.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acnames.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acnamesp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acobject.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acopcode.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acoutput.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acparser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acpi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acpiosxf.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acpixf.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acpredef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acresrc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acrestyp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acstruct.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/actables.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/actbl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/actbl1.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/actbl2.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/actbl3.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/actypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acutils.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acuuid.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/amlcode.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/amlresrc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/accygwin.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acdragonfly.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acdragonflyex.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acefi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acefiex.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acenv.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acenvex.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acfreebsd.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acgcc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acgccex.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/achaiku.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acintel.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/aclinux.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/aclinuxex.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acmacosx.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acmsvc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acmsvcex.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acnetbsd.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acos2.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acqnx.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acwin.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acwin64.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsaccess.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsalloc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsarguments.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsconvert.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsdump.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsdumpdv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nseval.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsload.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsnames.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsobject.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsparse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nspredef.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsprepkg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsrepair.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsrepair2.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nssearch.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsutils.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nswalk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsxfeval.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsxfname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsxfobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
Modified: trunk/reactos/drivers/bus/acpi/acpica/parser/psargs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/pa…
Modified: trunk/reactos/drivers/bus/acpi/acpica/parser/psloop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/pa…
Modified: trunk/reactos/drivers/bus/acpi/acpica/parser/psobject.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/pa…
Modified: trunk/reactos/drivers/bus/acpi/acpica/parser/psopcode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/pa…
Modified: trunk/reactos/drivers/bus/acpi/acpica/parser/psopinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/pa…
Modified: trunk/reactos/drivers/bus/acpi/acpica/parser/psparse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/pa…
Modified: trunk/reactos/drivers/bus/acpi/acpica/parser/psscope.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/pa…
Modified: trunk/reactos/drivers/bus/acpi/acpica/parser/pstree.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/pa…
Modified: trunk/reactos/drivers/bus/acpi/acpica/parser/psutils.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/pa…
Modified: trunk/reactos/drivers/bus/acpi/acpica/parser/pswalk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/pa…
Modified: trunk/reactos/drivers/bus/acpi/acpica/parser/psxface.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/pa…
Modified: trunk/reactos/drivers/bus/acpi/acpica/resources/rsaddr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/re…
Modified: trunk/reactos/drivers/bus/acpi/acpica/resources/rscalc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/re…
Modified: trunk/reactos/drivers/bus/acpi/acpica/resources/rscreate.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/re…
Modified: trunk/reactos/drivers/bus/acpi/acpica/resources/rsdump.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/re…
Modified: trunk/reactos/drivers/bus/acpi/acpica/resources/rsdumpinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/re…
Modified: trunk/reactos/drivers/bus/acpi/acpica/resources/rsinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/re…
Modified: trunk/reactos/drivers/bus/acpi/acpica/resources/rsio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/re…
Modified: trunk/reactos/drivers/bus/acpi/acpica/resources/rsirq.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/re…
Modified: trunk/reactos/drivers/bus/acpi/acpica/resources/rslist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/re…
Modified: trunk/reactos/drivers/bus/acpi/acpica/resources/rsmemory.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/re…
Modified: trunk/reactos/drivers/bus/acpi/acpica/resources/rsmisc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/re…
Modified: trunk/reactos/drivers/bus/acpi/acpica/resources/rsserial.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/re…
Modified: trunk/reactos/drivers/bus/acpi/acpica/resources/rsutils.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/re…
Modified: trunk/reactos/drivers/bus/acpi/acpica/resources/rsxface.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/re…
Modified: trunk/reactos/drivers/bus/acpi/acpica/tables/tbdata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ta…
Modified: trunk/reactos/drivers/bus/acpi/acpica/tables/tbfadt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ta…
Modified: trunk/reactos/drivers/bus/acpi/acpica/tables/tbfind.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ta…
Modified: trunk/reactos/drivers/bus/acpi/acpica/tables/tbinstal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ta…
Modified: trunk/reactos/drivers/bus/acpi/acpica/tables/tbprint.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ta…
Modified: trunk/reactos/drivers/bus/acpi/acpica/tables/tbutils.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ta…
Modified: trunk/reactos/drivers/bus/acpi/acpica/tables/tbxface.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ta…
Modified: trunk/reactos/drivers/bus/acpi/acpica/tables/tbxfload.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ta…
Modified: trunk/reactos/drivers/bus/acpi/acpica/tables/tbxfroot.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ta…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utaddress.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utalloc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utascii.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utbuffer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utcache.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utclib.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utcopy.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utdebug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utdecode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utdelete.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/uterror.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/uteval.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utexcep.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utglobal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/uthex.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utids.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utlock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utmath.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utmisc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utmutex.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utnonansi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utobject.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utosi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utownerid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utpredef.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utprint.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utresrc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utstate.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utstring.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utstrtoul64.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/uttrack.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utuuid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utxface.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utxferror.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utxfinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utxfmutex.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
7 years, 8 months
1
0
0
0
[tfaber] 74010: [MSACM32] - Free session driver instance using the correct heap. Fixes crash in msacm32_winetest. - Remove obsolete diff file
by tfaber@svn.reactos.org
Author: tfaber Date: Wed Mar 1 10:54:59 2017 New Revision: 74010 URL:
http://svn.reactos.org/svn/reactos?rev=74010&view=rev
Log: [MSACM32] - Free session driver instance using the correct heap. Fixes crash in msacm32_winetest. - Remove obsolete diff file Removed: trunk/reactos/dll/win32/msacm32/msacm_ros.diff Modified: trunk/reactos/dll/win32/msacm32/internal.c Modified: trunk/reactos/dll/win32/msacm32/internal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msacm32/internal…
============================================================================== --- trunk/reactos/dll/win32/msacm32/internal.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msacm32/internal.c [iso-8859-1] Wed Mar 1 10:54:59 2017 @@ -1070,7 +1070,7 @@ MSACM_DRIVER_SendMessage(lpDrv0, DRV_CLOSE, 0L, 0L); lpDrv0->dwDriverID = 0; MSACM_RemoveFromList(lpDrv0); - HeapFree(GetProcessHeap(), 0, lpDrv0); + HeapFree(MSACM_hHeap, 0, lpDrv0); } HeapFree(MSACM_hHeap, 0, paldrv); Removed: trunk/reactos/dll/win32/msacm32/msacm_ros.diff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msacm32/msacm_ro…
============================================================================== --- trunk/reactos/dll/win32/msacm32/msacm_ros.diff [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msacm32/msacm_ros.diff (removed) @@ -1,64 +0,0 @@ -Index: msacm_Uk.rc -=================================================================== ---- msacm_Uk.rc (revision 25687) -+++ msacm_Uk.rc (working copy) -@@ -0,0 +1,44 @@ -+/* -+ * PROJECT: OLE User Interface Support -+ * LICENSE: GPL - See COPYING in the top level directory -+ * FILE: dll/win32/msacm/msacm_Uk.rc -+ * PURPOSE: Ukraianian resource file for MS ACM -+ * TRANSLATOR: Artem Reznikov -+ */ -+ -+LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -+ -+DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100 -+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -+CAPTION "Sound Selection" -+FONT 8, "MS Shell Dlg" -+BEGIN -+ -+ LTEXT "&²ì'ÿ:", -1, 5, 5, 115, 8, NOT WS_GROUP -+ -+ COMBOBOX IDD_ACMFORMATCHOOSE_CMB_CUSTOM, 5, 15, 115, 60, -+ CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP -+ -+ PUSHBUTTON "Çáåðåãòè &ÿê...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14 -+ PUSHBUTTON "&Âèäàëèòè", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14 -+ -+ LTEXT "&Ôîðìàò:", -1, 5, 41, 44, 8, NOT WS_GROUP -+ -+ COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, 50, 39, 170, 60, -+ CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP -+ -+ LTEXT "&Âëàñòèâîñò³:", -1, 5, 59, 44, 8, NOT WS_GROUP -+ -+#if 0 -+ COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMAT, 50, 57, 170, 60, -+ CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | -+ CBS_OWNERDRAWFIXED | CBS_HASSTRINGS -+#else -+ COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMAT, 50, 57, 170, 60, -+ CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP -+#endif -+ DEFPUSHBUTTON "OK", IDOK, 48, 80, 40, 14 -+ PUSHBUTTON "Ñêàñóâàòè", IDCANCEL, 92, 80, 40, 14 -+ PUSHBUTTON "&Äîâ³äêà", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14 -+ -+END - -Property changes on: msacm_Uk.rc -___________________________________________________________________ -Name: svn:eol-style - + native - -Index: msacm.rc -=================================================================== ---- msacm.rc (revision 25687) -+++ msacm.rc (working copy) -@@ -34,3 +34,4 @@ - #include "msacm_Ru.rc" - #include "msacm_Sv.rc" - #include "msacm_Hu.rc" -+#include "msacm_Uk.rc"
7 years, 8 months
1
0
0
0
[tfaber] 74009: [MBEDTLS] - Avoid building unneeded source files - Style fixes in the CMake file CORE-12834
by tfaber@svn.reactos.org
Author: tfaber Date: Wed Mar 1 10:01:14 2017 New Revision: 74009 URL:
http://svn.reactos.org/svn/reactos?rev=74009&view=rev
Log: [MBEDTLS] - Avoid building unneeded source files - Style fixes in the CMake file CORE-12834 Modified: trunk/reactos/dll/3rdparty/mbedtls/CMakeLists.txt Modified: trunk/reactos/dll/3rdparty/mbedtls/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/mbedtls/CMake…
============================================================================== --- trunk/reactos/dll/3rdparty/mbedtls/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/mbedtls/CMakeLists.txt [iso-8859-1] Wed Mar 1 10:01:14 2017 @@ -1,98 +1,96 @@ - -spec2def(mbedtls.dll mbedtls.spec ADD_IMPORTLIB) include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs ${REACTOS_SOURCE_DIR}/sdk/include/reactos/zlib) -list(APPEND src - _reactos_strsafe_wrapper.c - aes.c - aesni.c - arc4.c - asn1parse.c - asn1write.c - base64.c - bignum.c - blowfish.c - camellia.c - ccm.c - certs.c - cipher.c - cipher_wrap.c - cmac.c - ctr_drbg.c - debug.c - des.c - dhm.c - ecdh.c - ecdsa.c - ecp.c - ecp_curves.c - entropy.c - entropy_poll.c - error.c - gcm.c - havege.c - hmac_drbg.c - md2.c - md4.c - md5.c - md.c - md_wrap.c - memory_buffer_alloc.c - net_sockets.c - oid.c - padlock.c - pem.c - pk.c - pkcs11.c - pkcs12.c - pkcs5.c - pkparse.c - pk_wrap.c - pkwrite.c - platform.c - ripemd160.c - rsa.c - sha1.c - sha256.c - sha512.c - ssl_cache.c - ssl_ciphersuites.c - ssl_cli.c - ssl_cookie.c - ssl_srv.c - ssl_ticket.c - ssl_tls.c - threading.c - timing.c - version.c - version_features.c - x509.c - x509_create.c - x509_crl.c - x509_crt.c - x509_csr.c - x509write_crt.c - x509write_csr.c - xtea.c) +spec2def(mbedtls.dll mbedtls.spec ADD_IMPORTLIB) + +list(APPEND SOURCE + _reactos_strsafe_wrapper.c + aes.c + aesni.c + arc4.c + asn1parse.c + asn1write.c + #base64.c + bignum.c + blowfish.c + camellia.c + ccm.c + #certs.c + cipher.c + cipher_wrap.c + #cmac.c + ctr_drbg.c + #debug.c + des.c + dhm.c + ecdh.c + ecdsa.c + ecp.c + ecp_curves.c + entropy.c + entropy_poll.c + #error.c + gcm.c + #havege.c + hmac_drbg.c + #md2.c + #md4.c + md5.c + md.c + md_wrap.c + #memory_buffer_alloc.c + #net_sockets.c + oid.c + padlock.c + #pem.c + pk.c + #pkcs11.c + pkcs12.c + pkcs5.c + pkparse.c + pk_wrap.c + #pkwrite.c + platform.c + ripemd160.c + rsa.c + sha1.c + sha256.c + sha512.c + #ssl_cache.c + ssl_ciphersuites.c + ssl_cli.c + #ssl_cookie.c + #ssl_srv.c + #ssl_ticket.c + ssl_tls.c + #threading.c + timing.c + #version.c + #version_features.c + x509.c + #x509_create.c + #x509_crl.c + x509_crt.c + #x509_csr.c + #x509write_crt.c + #x509write_csr.c + #xtea.c + ) add_library(mbedtls SHARED - ${src} + ${SOURCE} mbedtls.rc ${CMAKE_CURRENT_BINARY_DIR}/mbedtls.def) set_module_type(mbedtls win32dll) target_link_libraries(mbedtls zlib) -add_importlibs(mbedtls advapi32 ws2_32 msvcrt kernel32) +add_importlibs(mbedtls advapi32 msvcrt kernel32 ntdll) # to use `_vsnprintf_s` looks like we have to define MINGW_HAS_SECURE_API # and explicitly export it from msvcrt for it to work... what on earth?! add_definitions(-DMINGW_HAS_SECURE_API -DCRTDLL) -if(MSVC) - add_importlibs(mbedtls ntdll) -endif() add_cd_file(TARGET mbedtls DESTINATION reactos/system32 FOR all) if(NOT MSVC)
7 years, 8 months
1
0
0
0
[gadamopoulos] 74008: [COMCTL32_APITEST} -Add some more tests and fix build.
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Wed Mar 1 09:35:44 2017 New Revision: 74008 URL:
http://svn.reactos.org/svn/reactos?rev=74008&view=rev
Log: [COMCTL32_APITEST} -Add some more tests and fix build. Modified: trunk/rostests/apitests/comctl32/button.c Modified: trunk/rostests/apitests/comctl32/button.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/comctl32/button.…
============================================================================== --- trunk/rostests/apitests/comctl32/button.c [iso-8859-1] (original) +++ trunk/rostests/apitests/comctl32/button.c [iso-8859-1] Wed Mar 1 09:35:44 2017 @@ -188,7 +188,6 @@ - hwnd1 = CreateWindowW(L"Button", L" ", 0, 10, 10, 100, 100, 0, NULL, NULL, NULL); ok (hwnd1 != NULL, "Expected CreateWindowW to succeed\n"); SetWindowTheme(hwnd1, L"", L""); @@ -259,7 +258,32 @@ ret = SendMessageW(hwnd1, BCM_GETIDEALSIZE, 0, (LPARAM)&s); ok (ret == TRUE, "Expected BCM_GETIDEALSIZE to succeed\n"); /* image + its margins is so big that the height is dictated by them */ - ok_size(s, textent.cx + 5 + 2 + 1 + 100, 101); + ok_size(s, textent.cx + 5 + 2 + 1 + 100, (LONG)101); + + DestroyWindow(hwnd1); + + + + + + + hwnd1 = CreateWindowW(L"Button", L"Start", BS_VCENTER, 0, 0, 0, 0, 0, NULL, NULL, NULL); + ok (hwnd1 != NULL, "Expected CreateWindowW to succeed\n"); + SetWindowTheme(hwnd1, L"", L""); + + font = (HFONT)SendMessageW(hwnd1, WM_GETFONT, 0, 0); + hdc = GetDC(hwnd1); + SelectObject(hdc, font); + GetTextExtentPoint32W(hdc, L"Start", 5, &textent); + + SetRect(&rc, 0,0,0,0); + ret = SendMessageW(hwnd1, BCM_SETTEXTMARGIN, 0, (LPARAM)&rc); + ok (ret == TRUE, "Expected BCM_SETTEXTMARGIN to succeed\n"); + + memset(&s, 0, sizeof(s)); + ret = SendMessageW(hwnd1, BCM_GETIDEALSIZE, 0, (LPARAM)&s); + ok (ret == TRUE, "Expected BCM_GETIDEALSIZE to succeed\n"); + ok_size(s, textent.cx + 5, textent.cy + 7); DestroyWindow(hwnd1); @@ -285,6 +309,7 @@ /* The hardcoded values are independent of the margin */ lf.lfHeight = 200; lf.lfWidth = 200; + lf.lfWeight = FW_BOLD; wcscpy(lf.lfFaceName, L"Arial"); font = CreateFontIndirectW(&lf); ok(font != NULL, "\n"); @@ -300,6 +325,10 @@ textent.cy + 7 + 2); DestroyWindow(hwnd1); + + + + } START_TEST(button)
7 years, 8 months
1
0
0
0
← Newer
1
...
22
23
24
25
26
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
Results per page:
10
25
50
100
200