winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2022
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
1171 discussions
Start a n
N
ew thread
Rémi Bernon : joy.cpl: Use a struct list to keep created dinput devices.
by Alexandre Julliard
29 Nov '22
29 Nov '22
Module: wine Branch: master Commit: 8c6e2a2d799c493f97b33e5e3b3ede28cd1a8ce5 URL:
https://gitlab.winehq.org/wine/wine/-/commit/8c6e2a2d799c493f97b33e5e3b3ede…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sun Nov 27 00:09:01 2022 +0100 joy.cpl: Use a struct list to keep created dinput devices. --- dlls/joy.cpl/main.c | 228 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 137 insertions(+), 91 deletions(-)
1
0
0
0
Rémi Bernon : joy.cpl: Move the device effect list to static global scope.
by Alexandre Julliard
29 Nov '22
29 Nov '22
Module: wine Branch: master Commit: 2b706a00a3aecb1f26507d991d52cb4f41a00cbf URL:
https://gitlab.winehq.org/wine/wine/-/commit/2b706a00a3aecb1f26507d991d52cb…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sun Nov 27 00:07:17 2022 +0100 joy.cpl: Move the device effect list to static global scope. --- dlls/joy.cpl/main.c | 65 ++++++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/dlls/joy.cpl/main.c b/dlls/joy.cpl/main.c index ec8299753f1..33af6202445 100644 --- a/dlls/joy.cpl/main.c +++ b/dlls/joy.cpl/main.c @@ -78,9 +78,6 @@ struct effect struct Joystick { IDirectInputDevice8W *device; - - struct list effects; - IDirectInputEffect *effect_selected; }; struct Graphics @@ -114,6 +111,9 @@ static CRITICAL_SECTION_DEBUG joy_cs_debug = }; static CRITICAL_SECTION joy_cs = { &joy_cs_debug, -1, 0, 0, 0, 0 }; +static struct list effects = LIST_INIT( effects ); +static IDirectInputEffect *effect_selected; + /********************************************************************* * DllMain */ @@ -217,32 +217,46 @@ static BOOL CALLBACK enum_effects( const DIEFFECTINFOW *info, void *context ) } entry->effect = effect; - list_add_tail( &joystick->effects, &entry->entry ); + list_add_tail( &effects, &entry->entry ); return DIENUM_CONTINUE; } -static void set_selected_effect( struct Joystick *joystick, IDirectInputEffect *effect ) +static void set_selected_effect( IDirectInputEffect *effect ) { IDirectInputEffect *previous; EnterCriticalSection( &joy_cs ); - if ((previous = joystick->effect_selected)) IDirectInputEffect_Release( previous ); - if ((joystick->effect_selected = effect)) IDirectInput_AddRef( effect ); + if ((previous = effect_selected)) IDirectInputEffect_Release( previous ); + if ((effect_selected = effect)) IDirectInput_AddRef( effect ); LeaveCriticalSection( &joy_cs ); } -static IDirectInputEffect *get_selected_effect( struct Joystick *joystick ) +static IDirectInputEffect *get_selected_effect(void) { IDirectInputEffect *effect; EnterCriticalSection( &joy_cs ); - if ((effect = joystick->effect_selected)) IDirectInputEffect_AddRef( effect ); + if ((effect = effect_selected)) IDirectInputEffect_AddRef( effect ); LeaveCriticalSection( &joy_cs ); return effect; } +static void clear_effects(void) +{ + struct effect *effect, *next; + + set_selected_effect( NULL ); + + LIST_FOR_EACH_ENTRY_SAFE( effect, next, &effects, struct effect, entry ) + { + list_remove( &effect->entry ); + IDirectInputEffect_Release( effect->effect ); + free( effect ); + } +} + static BOOL CALLBACK enum_callback(const DIDEVICEINSTANCEW *instance, void *context) { DIDEVCAPS caps = {.dwSize = sizeof(DIDEVCAPS)}; @@ -262,9 +276,6 @@ static BOOL CALLBACK enum_callback(const DIDEVICEINSTANCEW *instance, void *cont IDirectInput8_CreateDevice(data->di, &instance->guidInstance, &joystick->device, NULL); IDirectInputDevice8_SetDataFormat(joystick->device, &c_dfDIJoystick); - list_init( &joystick->effects ); - joystick->effect_selected = NULL; - IDirectInputDevice8_GetCapabilities(joystick->device, &caps); if (caps.dwFlags & DIDC_FORCEFEEDBACK) data->num_ff++; @@ -277,7 +288,6 @@ static BOOL CALLBACK enum_callback(const DIDEVICEINSTANCEW *instance, void *cont proprange.lMax = TEST_AXIS_MAX; IDirectInputDevice_SetProperty(joystick->device, DIPROP_RANGE, &proprange.diph); - IDirectInputDevice8_EnumEffects( joystick->device, enum_effects, (void *)joystick, 0 ); return DIENUM_CONTINUE; } @@ -305,17 +315,6 @@ static void destroy_joysticks(struct JoystickData *data) for (i = 0; i < data->num_joysticks; i++) { - struct effect *effect, *next_effect; - - set_selected_effect( &data->joysticks[i], NULL ); - - LIST_FOR_EACH_ENTRY_SAFE( effect, next_effect, &data->joysticks[i].effects, struct effect, entry ) - { - list_remove( &effect->entry ); - IDirectInputEffect_Release( effect->effect ); - free( effect ); - } - IDirectInputDevice8_Unacquire(data->joysticks[i].device); IDirectInputDevice8_Release(data->joysticks[i].device); } @@ -394,6 +393,7 @@ static void refresh_joystick_list(HWND hwnd, struct JoystickData *data) LSTATUS status; DWORD i; + clear_effects(); destroy_joysticks(data); initialize_joysticks(data); @@ -873,9 +873,13 @@ static void initialize_effects_list(HWND hwnd, struct Joystick* joy) { struct effect *effect; + clear_effects(); + + IDirectInputDevice8_EnumEffects( joy->device, enum_effects, (void *)joy, 0 ); + SendDlgItemMessageW(hwnd, IDC_FFEFFECTLIST, LB_RESETCONTENT, 0, 0); - LIST_FOR_EACH_ENTRY( effect, &joy->effects, struct effect, entry ) + LIST_FOR_EACH_ENTRY( effect, &effects, struct effect, entry ) { DIEFFECTINFOW info = {.dwSize = sizeof(DIEFFECTINFOW)}; GUID guid; @@ -899,16 +903,16 @@ static void ff_handle_effectchange(HWND hwnd, struct Joystick *joy) struct list *entry; int sel; - set_selected_effect( joy, NULL ); + set_selected_effect( NULL ); sel = SendDlgItemMessageW(hwnd, IDC_FFEFFECTLIST, LB_GETCURSEL, 0, 0); if (sel < 0) return; - entry = list_head( &joy->effects ); - while (sel-- && entry) entry = list_next( &joy->effects, entry ); + entry = list_head( &effects ); + while (sel-- && entry) entry = list_next( &effects, entry ); if (!entry) return; - set_selected_effect( joy, LIST_ENTRY( entry, struct effect, entry )->effect ); + set_selected_effect( LIST_ENTRY( entry, struct effect, entry )->effect ); IDirectInputDevice8_Unacquire(joy->device); IDirectInputDevice8_SetCooperativeLevel(joy->device, GetAncestor(hwnd, GA_ROOT), DISCL_BACKGROUND|DISCL_EXCLUSIVE); @@ -942,7 +946,7 @@ static DWORD WINAPI ff_input_thread(void *param) Sleep(TEST_POLL_TIME); - if (!(effect = get_selected_effect( joy ))) continue; + if (!(effect = get_selected_effect())) continue; poll_input(joy, &state); @@ -1207,6 +1211,7 @@ LONG CALLBACK CPlApplet(HWND hwnd, UINT command, LPARAM lParam1, LPARAM lParam2) break; case CPL_STOP: + clear_effects(); destroy_joysticks(&data); /* And destroy dinput too */
1
0
0
0
Huw Davies : ntdll: Fix -Wformat warnings on macOS.
by Alexandre Julliard
29 Nov '22
29 Nov '22
Module: wine Branch: master Commit: 905821fc695803ac359c28b91a7436e6f2054c98 URL:
https://gitlab.winehq.org/wine/wine/-/commit/905821fc695803ac359c28b91a7436…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Nov 29 08:40:43 2022 +0000 ntdll: Fix -Wformat warnings on macOS. --- dlls/ntdll/unix/env.c | 2 +- dlls/ntdll/unix/serial.c | 2 +- dlls/ntdll/unix/sync.c | 2 +- dlls/ntdll/unix/system.c | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index 328040bbda6..6f1709f4713 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -1563,7 +1563,7 @@ static WCHAR *build_command_line( WCHAR **wargv ) *p = 0; if (p - ret >= 32767) { - ERR( "command line too long (%zu)\n", p - ret ); + ERR( "command line too long (%u)\n", (int)(p - ret) ); NtTerminateProcess( GetCurrentProcess(), 1 ); } return ret; diff --git a/dlls/ntdll/unix/serial.c b/dlls/ntdll/unix/serial.c index 45fda0f33db..d8f492fcc64 100644 --- a/dlls/ntdll/unix/serial.c +++ b/dlls/ntdll/unix/serial.c @@ -555,7 +555,7 @@ static NTSTATUS set_baud_rate(int fd, const SERIAL_BAUD_RATE* sbr) } break; #else /* Don't have linux/serial.h or lack TIOCSSERIAL */ - ERR("baudrate %d\n", sbr->BaudRate); + ERR("baudrate %d\n", (int)sbr->BaudRate); return STATUS_NOT_SUPPORTED; #endif /* Don't have linux/serial.h or lack TIOCSSERIAL */ } diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c index f80a2945cef..650e32a7d41 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c @@ -2352,7 +2352,7 @@ static union tid_alert_entry *get_tid_alert_entry( HANDLE tid ) if (semaphore_create( mach_task_self(), &sem, SYNC_POLICY_FIFO, 0 )) return NULL; - if (InterlockedCompareExchange( (int *)&entry->sem, sem, 0 )) + if (InterlockedCompareExchange( (LONG *)&entry->sem, sem, 0 )) semaphore_destroy( mach_task_self(), sem ); } #else diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index 603f778bd97..2dc99316f9c 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -1023,13 +1023,13 @@ static NTSTATUS create_logical_proc_info(void) /* for 'data', max_len is the array count. for 'dataex', max_len is in bytes */ static NTSTATUS create_logical_proc_info(void) { - DWORD pkgs_no, cores_no, lcpu_no, lcpu_per_core, cores_per_package, assoc; - DWORD cache_ctrs[10] = {0}; + unsigned int pkgs_no, cores_no, lcpu_no, lcpu_per_core, cores_per_package, assoc; + unsigned int cache_ctrs[10] = {0}; ULONG_PTR all_cpus_mask = 0; CACHE_DESCRIPTOR cache[10]; LONGLONG cache_size, cache_line_size, cache_sharing[10]; size_t size; - DWORD p,i,j,k; + unsigned int p, i, j, k; lcpu_no = peb->NumberOfProcessors; @@ -1806,7 +1806,7 @@ static NTSTATUS get_firmware_info( SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULON return ret; } default: - FIXME("info_class SYSTEM_FIRMWARE_TABLE_INFORMATION provider %08x\n", sfti->ProviderSignature); + FIXME("info_class SYSTEM_FIRMWARE_TABLE_INFORMATION provider %08x\n", (unsigned int)sfti->ProviderSignature); return STATUS_NOT_IMPLEMENTED; } }
1
0
0
0
Jacek Caban : winex11: Use NtUserGetDC.
by Alexandre Julliard
29 Nov '22
29 Nov '22
Module: wine Branch: master Commit: 114e7269162ec039954e72b9425a2a196bc3fbf3 URL:
https://gitlab.winehq.org/wine/wine/-/commit/114e7269162ec039954e72b9425a2a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 28 22:11:46 2022 +0100 winex11: Use NtUserGetDC. --- dlls/winex11.drv/clipboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c index 6ebc36cbead..e91368d69e7 100644 --- a/dlls/winex11.drv/clipboard.c +++ b/dlls/winex11.drv/clipboard.c @@ -564,7 +564,7 @@ static void *create_dib_from_bitmap( HBITMAP hBmp, size_t *size ) /* Retrieve the DIB bits from the bitmap and fill in the * DIB color table if present */ - hdc = NtUserGetDCEx( 0, 0, DCX_CACHE | DCX_WINDOW ); + hdc = NtUserGetDC( 0 ); nLinesCopied = NtGdiGetDIBitsInternal( hdc, hBmp, 0, bmp.bmHeight, ret + OffsetBits, (LPBITMAPINFO) pbmiHeader, 0, 0, 0 ); NtUserReleaseDC( 0, hdc ); @@ -986,7 +986,7 @@ static void *import_image_bmp( Atom type, const void *data, size_t size, size_t else return NULL; if (!width || !height) return NULL; - hdc = NtUserGetDCEx( 0, 0, DCX_CACHE | DCX_WINDOW ); + hdc = NtUserGetDC( 0 ); if ((hbmp = NtGdiCreateDIBitmapInternal( hdc, width, height, CBM_INIT, (const BYTE *)data + bfh->bfOffBits, bmi,
1
0
0
0
Jacek Caban : user32: Merge painting.c into win.c.
by Alexandre Julliard
29 Nov '22
29 Nov '22
Module: wine Branch: master Commit: 609990f7167de4490732dd0dbe4b013949e169ad URL:
https://gitlab.winehq.org/wine/wine/-/commit/609990f7167de4490732dd0dbe4b01…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 28 21:46:02 2022 +0100 user32: Merge painting.c into win.c. --- dlls/user32/Makefile.in | 1 - dlls/user32/painting.c | 64 ------------------------------------------------- dlls/user32/win.c | 40 +++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 65 deletions(-) diff --git a/dlls/user32/Makefile.in b/dlls/user32/Makefile.in index 3a01810991d..1a29970e112 100644 --- a/dlls/user32/Makefile.in +++ b/dlls/user32/Makefile.in @@ -32,7 +32,6 @@ C_SRCS = \ misc.c \ msgbox.c \ nonclient.c \ - painting.c \ property.c \ resource.c \ scroll.c \ diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c deleted file mode 100644 index de67cd97e5f..00000000000 --- a/dlls/user32/painting.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Window painting functions - * - * Copyright 1993, 1994, 1995, 2001, 2004, 2005, 2008 Alexandre Julliard - * Copyright 1996, 1997, 1999 Alex Korobka - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "user_private.h" - - -/*********************************************************************** - * UpdateWindow (USER32.@) - */ -BOOL WINAPI UpdateWindow( HWND hwnd ) -{ - if (!hwnd) - { - SetLastError( ERROR_INVALID_WINDOW_HANDLE ); - return FALSE; - } - - return NtUserRedrawWindow( hwnd, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN ); -} - - -/*********************************************************************** - * ValidateRgn (USER32.@) - */ -BOOL WINAPI ValidateRgn( HWND hwnd, HRGN hrgn ) -{ - if (!hwnd) - { - SetLastError( ERROR_INVALID_WINDOW_HANDLE ); - return FALSE; - } - - return NtUserRedrawWindow( hwnd, NULL, hrgn, RDW_VALIDATE ); -} - - -/************************************************************************* - * ScrollWindow (USER32.@) - * - */ -BOOL WINAPI ScrollWindow( HWND hwnd, INT dx, INT dy, - const RECT *rect, const RECT *clipRect ) -{ - UINT flags = SW_INVALIDATE | SW_ERASE | (rect ? 0 : SW_SCROLLCHILDREN) | SW_NODCCACHE; - return NtUserScrollWindowEx( hwnd, dx, dy, rect, clipRect, 0, NULL, flags ); -} diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 383de818172..a6f43c188c4 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -1428,6 +1428,46 @@ BOOL WINAPI SetProcessDefaultLayout( DWORD layout ) return NtUserSetProcessDefaultLayout( layout ); } + +/*********************************************************************** + * UpdateWindow (USER32.@) + */ +BOOL WINAPI UpdateWindow( HWND hwnd ) +{ + if (!hwnd) + { + SetLastError( ERROR_INVALID_WINDOW_HANDLE ); + return FALSE; + } + + return NtUserRedrawWindow( hwnd, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN ); +} + + +/*********************************************************************** + * ValidateRgn (USER32.@) + */ +BOOL WINAPI ValidateRgn( HWND hwnd, HRGN hrgn ) +{ + if (!hwnd) + { + SetLastError( ERROR_INVALID_WINDOW_HANDLE ); + return FALSE; + } + + return NtUserRedrawWindow( hwnd, NULL, hrgn, RDW_VALIDATE ); +} + + +/************************************************************************* + * ScrollWindow (USER32.@) + */ +BOOL WINAPI ScrollWindow( HWND hwnd, INT dx, INT dy, const RECT *rect, const RECT *clip_rect ) +{ + UINT flags = SW_INVALIDATE | SW_ERASE | (rect ? 0 : SW_SCROLLCHILDREN) | SW_NODCCACHE; + return NtUserScrollWindowEx( hwnd, dx, dy, rect, clip_rect, 0, NULL, flags ); +} + #ifdef _WIN64 /* 64bit versions */
1
0
0
0
Jacek Caban : win32u: Move NtUserPrintWindow implementation from user32.
by Alexandre Julliard
29 Nov '22
29 Nov '22
Module: wine Branch: master Commit: 6b2da0bab9296dca9533dbc7c24cf9169351ed63 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6b2da0bab9296dca9533dbc7c24cf9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 28 21:43:10 2022 +0100 win32u: Move NtUserPrintWindow implementation from user32. --- dlls/user32/painting.c | 15 --------------- dlls/user32/user32.spec | 2 +- dlls/win32u/dce.c | 11 +++++++++++ dlls/win32u/syscall.c | 1 + dlls/win32u/win32u.spec | 2 +- dlls/wow64win/syscall.h | 1 + dlls/wow64win/user.c | 9 +++++++++ include/ntuser.h | 1 + 8 files changed, 25 insertions(+), 17 deletions(-) diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c index be6f91e1bde..de67cd97e5f 100644 --- a/dlls/user32/painting.c +++ b/dlls/user32/painting.c @@ -62,18 +62,3 @@ BOOL WINAPI ScrollWindow( HWND hwnd, INT dx, INT dy, UINT flags = SW_INVALIDATE | SW_ERASE | (rect ? 0 : SW_SCROLLCHILDREN) | SW_NODCCACHE; return NtUserScrollWindowEx( hwnd, dx, dy, rect, clipRect, 0, NULL, flags ); } - -/************************************************************************ - * PrintWindow (USER32.@) - * - */ -BOOL WINAPI PrintWindow(HWND hwnd, HDC hdcBlt, UINT nFlags) -{ - UINT flags = PRF_CHILDREN | PRF_ERASEBKGND | PRF_OWNED | PRF_CLIENT; - if(!(nFlags & PW_CLIENTONLY)) - { - flags |= PRF_NONCLIENT; - } - SendMessageW(hwnd, WM_PRINT, (WPARAM)hdcBlt, flags); - return TRUE; -} diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index b843d2068cd..1130ab457cd 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -576,7 +576,7 @@ @ stdcall PostQuitMessage(long) @ stdcall PostThreadMessageA(long long long long) @ stdcall PostThreadMessageW(long long long long) NtUserPostThreadMessage -@ stdcall PrintWindow(long long long) +@ stdcall PrintWindow(long long long) NtUserPrintWindow @ stdcall PrivateExtractIconExA(str long ptr ptr long) @ stdcall PrivateExtractIconExW(wstr long ptr ptr long) @ stdcall PrivateExtractIconsA (str long long long ptr ptr long long) diff --git a/dlls/win32u/dce.c b/dlls/win32u/dce.c index 364fbe6455b..1cc6a0d605e 100644 --- a/dlls/win32u/dce.c +++ b/dlls/win32u/dce.c @@ -1858,3 +1858,14 @@ INT WINAPI NtUserScrollWindowEx( HWND hwnd, INT dx, INT dy, const RECT *rect, return retval; } + +/************************************************************************ + * NtUserPrintWindow (win32u.@) + */ +BOOL WINAPI NtUserPrintWindow( HWND hwnd, HDC hdc, UINT flags ) +{ + UINT prf_flags = PRF_CHILDREN | PRF_ERASEBKGND | PRF_OWNED | PRF_CLIENT; + if (!(flags & PW_CLIENTONLY)) prf_flags |= PRF_NONCLIENT; + send_message( hwnd, WM_PRINT, (WPARAM)hdc, prf_flags ); + return TRUE; +} diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 97052d4dc46..558edc0257e 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -237,6 +237,7 @@ static void * const syscalls[] = NtUserPerMonitorDPIPhysicalToLogicalPoint, NtUserPostMessage, NtUserPostThreadMessage, + NtUserPrintWindow, NtUserQueryInputContext, NtUserRedrawWindow, NtUserRegisterClassExWOW, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index d4e4365ce23..1d85a450748 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -1105,7 +1105,7 @@ @ stub NtUserPostKeyboardInputMessage @ stdcall -syscall NtUserPostMessage(long long long long) @ stdcall -syscall NtUserPostThreadMessage(long long long long) -@ stub NtUserPrintWindow +@ stdcall -syscall NtUserPrintWindow(long long long) @ stub NtUserProcessConnect @ stub NtUserProcessInkFeedbackCommand @ stub NtUserPromoteMouseInPointer diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index c2cd0b7bbf5..8573fa743a5 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -223,6 +223,7 @@ SYSCALL_ENTRY( NtUserPerMonitorDPIPhysicalToLogicalPoint ) \ SYSCALL_ENTRY( NtUserPostMessage ) \ SYSCALL_ENTRY( NtUserPostThreadMessage ) \ + SYSCALL_ENTRY( NtUserPrintWindow ) \ SYSCALL_ENTRY( NtUserQueryInputContext ) \ SYSCALL_ENTRY( NtUserRedrawWindow ) \ SYSCALL_ENTRY( NtUserRegisterClassExWOW ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index af77475e740..447e8f84495 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -3184,6 +3184,15 @@ NTSTATUS WINAPI wow64_NtUserPostThreadMessage( UINT *args ) return NtUserPostThreadMessage( thread, msg, wparam, lparam ); } +NTSTATUS WINAPI wow64_NtUserPrintWindow( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + HDC hdc = get_handle( &args ); + UINT flags = get_ulong( &args ); + + return NtUserPrintWindow( hwnd, hdc, flags ); +} + NTSTATUS WINAPI wow64_NtUserQueryInputContext( UINT *args ) { HIMC handle = get_handle( &args ); diff --git a/include/ntuser.h b/include/ntuser.h index 18718ea8a2c..b83ae2418d3 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -810,6 +810,7 @@ BOOL WINAPI NtUserPeekMessage( MSG *msg_out, HWND hwnd, UINT first, UINT last BOOL WINAPI NtUserPerMonitorDPIPhysicalToLogicalPoint( HWND hwnd, POINT *pt ); BOOL WINAPI NtUserPostMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ); BOOL WINAPI NtUserPostThreadMessage( DWORD thread, UINT msg, WPARAM wparam, LPARAM lparam ); +BOOL WINAPI NtUserPrintWindow( HWND hwnd, HDC hdc, UINT flags ); UINT_PTR WINAPI NtUserQueryInputContext( HIMC handle, UINT attr ); BOOL WINAPI NtUserRedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags ); ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *name, UNICODE_STRING *version,
1
0
0
0
Jacek Caban : win32u: Move NtUserValidateRect implementation from user32.
by Alexandre Julliard
29 Nov '22
29 Nov '22
Module: wine Branch: master Commit: ae984f630b040b95093ab149e3d344063ee2aa7f URL:
https://gitlab.winehq.org/wine/wine/-/commit/ae984f630b040b95093ab149e3d344…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 28 21:35:53 2022 +0100 win32u: Move NtUserValidateRect implementation from user32. --- dlls/user32/icontitle.c | 2 +- dlls/user32/painting.c | 20 -------------------- dlls/user32/user32.spec | 2 +- dlls/win32u/dce.c | 16 ++++++++++++++++ dlls/win32u/syscall.c | 1 + dlls/win32u/win32u.spec | 2 +- dlls/wow64win/syscall.h | 1 + dlls/wow64win/user.c | 8 ++++++++ include/ntuser.h | 1 + 9 files changed, 30 insertions(+), 23 deletions(-) diff --git a/dlls/user32/icontitle.c b/dlls/user32/icontitle.c index 047ac5ef1c8..687f2b69d72 100644 --- a/dlls/user32/icontitle.c +++ b/dlls/user32/icontitle.c @@ -176,7 +176,7 @@ LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg, else lParam = (owner == GetActiveWindow()); if( ICONTITLE_Paint( hWnd, owner, (HDC)wParam, (BOOL)lParam ) ) - ValidateRect( hWnd, NULL ); + NtUserValidateRect( hWnd, NULL ); return 1; } return DefWindowProcW( hWnd, msg, wParam, lParam ); diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c index c962f0dccf2..be6f91e1bde 100644 --- a/dlls/user32/painting.c +++ b/dlls/user32/painting.c @@ -52,26 +52,6 @@ BOOL WINAPI ValidateRgn( HWND hwnd, HRGN hrgn ) } -/*********************************************************************** - * ValidateRect (USER32.@) - * - * MSDN: if hwnd parameter is NULL, ValidateRect invalidates and redraws - * all windows and sends WM_ERASEBKGND and WM_NCPAINT. - */ -BOOL WINAPI ValidateRect( HWND hwnd, const RECT *rect ) -{ - UINT flags = RDW_VALIDATE; - - if (!hwnd) - { - flags = RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_FRAME | RDW_ERASE | RDW_ERASENOW; - rect = NULL; - } - - return NtUserRedrawWindow( hwnd, rect, 0, flags ); -} - - /************************************************************************* * ScrollWindow (USER32.@) * diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index e71370e9761..b843d2068cd 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -807,7 +807,7 @@ @ stdcall UserSignalProc(long long long long) # @ stub VRipOutput # @ stub VTagOutput -@ stdcall ValidateRect(long ptr) +@ stdcall ValidateRect(long ptr) NtUserValidateRect @ stdcall ValidateRgn(long long) @ stdcall VkKeyScanA(long) @ stdcall VkKeyScanExA(long long) diff --git a/dlls/win32u/dce.c b/dlls/win32u/dce.c index 9b5f87589c6..364fbe6455b 100644 --- a/dlls/win32u/dce.c +++ b/dlls/win32u/dce.c @@ -1507,6 +1507,22 @@ BOOL WINAPI NtUserRedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT fla return ret; } +/*********************************************************************** + * NtUserValidateRect (win32u.@) + */ +BOOL WINAPI NtUserValidateRect( HWND hwnd, const RECT *rect ) +{ + UINT flags = RDW_VALIDATE; + + if (!hwnd) + { + flags = RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_FRAME | RDW_ERASE | RDW_ERASENOW; + rect = NULL; + } + + return NtUserRedrawWindow( hwnd, rect, 0, flags ); +} + /*********************************************************************** * NtUserGetUpdateRgn (win32u.@) */ diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 3e029f413e5..97052d4dc46 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -302,6 +302,7 @@ static void * const syscalls[] = NtUserUnregisterClass, NtUserUnregisterHotKey, NtUserUpdateInputContext, + NtUserValidateRect, NtUserVkKeyScanEx, NtUserWaitForInputIdle, NtUserWindowFromDC, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 9a987045868..d4e4365ce23 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -1300,7 +1300,7 @@ @ stub NtUserUpdateWindowInputSinkHints @ stub NtUserUpdateWindowTrackingInfo @ stub NtUserUserHandleGrantAccess -@ stub NtUserValidateRect +@ stdcall -syscall NtUserValidateRect(long ptr) @ stub NtUserValidateTimerCallback @ stdcall -syscall NtUserVkKeyScanEx(long long) @ stub NtUserWOWCleanup diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 25d8d42e575..c2cd0b7bbf5 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -288,6 +288,7 @@ SYSCALL_ENTRY( NtUserUnregisterClass ) \ SYSCALL_ENTRY( NtUserUnregisterHotKey ) \ SYSCALL_ENTRY( NtUserUpdateInputContext ) \ + SYSCALL_ENTRY( NtUserValidateRect ) \ SYSCALL_ENTRY( NtUserVkKeyScanEx ) \ SYSCALL_ENTRY( NtUserWaitForInputIdle ) \ SYSCALL_ENTRY( NtUserWindowFromDC ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 78ffc34e68e..af77475e740 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -4102,6 +4102,14 @@ NTSTATUS WINAPI wow64_NtUserUpdateInputContext( UINT *args ) return NtUserUpdateInputContext( handle, attr, value ); } +NTSTATUS WINAPI wow64_NtUserValidateRect( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + const RECT *rect = get_ptr( &args ); + + return NtUserValidateRect( hwnd, rect ); +} + NTSTATUS WINAPI wow64_NtUserVkKeyScanEx( UINT *args ) { WCHAR chr = get_ulong( &args ); diff --git a/include/ntuser.h b/include/ntuser.h index cff2b6633a5..18718ea8a2c 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -892,6 +892,7 @@ BOOL WINAPI NtUserUpdateInputContext( HIMC handle, UINT attr, UINT_PTR value BOOL WINAPI NtUserUpdateLayeredWindow( HWND hwnd, HDC hdc_dst, const POINT *pts_dst, const SIZE *size, HDC hdc_src, const POINT *pts_src, COLORREF key, const BLENDFUNCTION *blend, DWORD flags, const RECT *dirty ); +BOOL WINAPI NtUserValidateRect( HWND hwnd, const RECT *rect ); WORD WINAPI NtUserVkKeyScanEx( WCHAR chr, HKL layout ); DWORD WINAPI NtUserWaitForInputIdle( HANDLE process, DWORD timeout, BOOL wow ); HWND WINAPI NtUserWindowFromDC( HDC hdc );
1
0
0
0
Jacek Caban : win32u: Move NtUserGetWindowDC implementation from user32.
by Alexandre Julliard
29 Nov '22
29 Nov '22
Module: wine Branch: master Commit: 8bdfe2be19eace13fff714256e451e0928aea4d1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/8bdfe2be19eace13fff714256e451e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 28 21:29:43 2022 +0100 win32u: Move NtUserGetWindowDC implementation from user32. --- dlls/user32/painting.c | 9 --------- dlls/user32/user32.spec | 2 +- dlls/win32u/dce.c | 8 ++++++++ dlls/win32u/defwnd.c | 6 +++--- dlls/win32u/syscall.c | 1 + dlls/win32u/win32u.spec | 2 +- dlls/wow64win/syscall.h | 1 + dlls/wow64win/user.c | 7 +++++++ include/ntuser.h | 1 + 9 files changed, 23 insertions(+), 14 deletions(-) diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c index a231dd68a3d..c962f0dccf2 100644 --- a/dlls/user32/painting.c +++ b/dlls/user32/painting.c @@ -22,15 +22,6 @@ #include "user_private.h" -/*********************************************************************** - * GetWindowDC (USER32.@) - */ -HDC WINAPI GetWindowDC( HWND hwnd ) -{ - return NtUserGetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW ); -} - - /*********************************************************************** * UpdateWindow (USER32.@) */ diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 464348201cb..e71370e9761 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -405,7 +405,7 @@ # @ stub GetWinStationInfo @ stdcall GetWindow(long long) @ stdcall GetWindowContextHelpId(long) -@ stdcall GetWindowDC(long) +@ stdcall GetWindowDC(long) NtUserGetWindowDC @ stdcall GetWindowDisplayAffinity(long ptr) @ stdcall GetWindowDpiAwarenessContext(long) @ stdcall GetWindowInfo(long ptr) diff --git a/dlls/win32u/dce.c b/dlls/win32u/dce.c index 360b985c339..9b5f87589c6 100644 --- a/dlls/win32u/dce.c +++ b/dlls/win32u/dce.c @@ -1038,6 +1038,14 @@ HDC WINAPI NtUserGetDC( HWND hwnd ) return NtUserGetDCEx( hwnd, 0, DCX_USESTYLE ); } +/*********************************************************************** + * NtUserGetWindowDC (win32u.@) + */ +HDC WINAPI NtUserGetWindowDC( HWND hwnd ) +{ + return NtUserGetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW ); +} + /********************************************************************** * NtUserWindowFromDC (win32u.@) */ diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c index 04953508cf2..e58d4e5a793 100644 --- a/dlls/win32u/defwnd.c +++ b/dlls/win32u/defwnd.c @@ -2067,7 +2067,7 @@ LRESULT handle_nc_hit_test( HWND hwnd, POINT pt ) static void track_min_max_box( HWND hwnd, WORD wparam ) { - HDC hdc = NtUserGetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW ); + HDC hdc = NtUserGetWindowDC( hwnd ); DWORD style = get_window_long( hwnd, GWL_STYLE ); HMENU sys_menu = NtUserGetSystemMenu(hwnd, FALSE); void (*paint_button)( HWND, HDC, BOOL, BOOL ); @@ -2141,7 +2141,7 @@ static void track_close_button( HWND hwnd, WPARAM wparam, LPARAM lparam ) /* If the close item of the sysmenu is disabled or not present do nothing */ if((state & MF_DISABLED) || (state & MF_GRAYED) || state == 0xFFFFFFFF) return; - hdc = NtUserGetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW ); + hdc = NtUserGetWindowDC( hwnd ); NtUserSetCapture( hwnd ); draw_close_button( hwnd, hdc, TRUE, FALSE ); @@ -2191,7 +2191,7 @@ static LRESULT handle_nc_lbutton_down( HWND hwnd, WPARAM wparam, LPARAM lparam ) case HTSYSMENU: if (style & WS_SYSMENU) { - HDC hdc = NtUserGetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW ); + HDC hdc = NtUserGetWindowDC( hwnd ); draw_nc_sys_button( hwnd, hdc, TRUE ); NtUserReleaseDC( hwnd, hdc ); send_message( hwnd, WM_SYSCOMMAND, SC_MOUSEMENU + HTSYSMENU, lparam ); diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 8c603dbf81e..3e029f413e5 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -209,6 +209,7 @@ static void * const syscalls[] = NtUserGetUpdateRect, NtUserGetUpdateRgn, NtUserGetUpdatedClipboardFormats, + NtUserGetWindowDC, NtUserGetWindowPlacement, NtUserGetWindowRgnEx, NtUserHideCaret, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 43d9b3904d0..9a987045868 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -1009,7 +1009,7 @@ @ stub NtUserGetWindowBand @ stub NtUserGetWindowCompositionAttribute @ stub NtUserGetWindowCompositionInfo -@ stub NtUserGetWindowDC +@ stdcall -syscall NtUserGetWindowDC(long) @ stub NtUserGetWindowDisplayAffinity @ stub NtUserGetWindowFeedbackSetting @ stub NtUserGetWindowGroupId diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 288dd593c2f..25d8d42e575 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -195,6 +195,7 @@ SYSCALL_ENTRY( NtUserGetUpdateRect ) \ SYSCALL_ENTRY( NtUserGetUpdateRgn ) \ SYSCALL_ENTRY( NtUserGetUpdatedClipboardFormats ) \ + SYSCALL_ENTRY( NtUserGetWindowDC ) \ SYSCALL_ENTRY( NtUserGetWindowPlacement ) \ SYSCALL_ENTRY( NtUserGetWindowRgnEx ) \ SYSCALL_ENTRY( NtUserHideCaret ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 934612dce8a..78ffc34e68e 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -2570,6 +2570,13 @@ NTSTATUS WINAPI wow64_NtUserGetUpdatedClipboardFormats( UINT *args ) return NtUserGetUpdatedClipboardFormats( formats, size, out_size ); } +NTSTATUS WINAPI wow64_NtUserGetWindowDC( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + + return HandleToUlong( NtUserGetWindowDC( hwnd )); +} + NTSTATUS WINAPI wow64_NtUserGetWindowPlacement( UINT *args ) { HWND hwnd = get_handle( &args ); diff --git a/include/ntuser.h b/include/ntuser.h index c27af731f29..cff2b6633a5 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -777,6 +777,7 @@ BOOL WINAPI NtUserGetTitleBarInfo( HWND hwnd, TITLEBARINFO *info ); INT WINAPI NtUserGetUpdateRgn( HWND hwnd, HRGN hrgn, BOOL erase ); BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size ); BOOL WINAPI NtUserGetUpdateRect( HWND hwnd, RECT *rect, BOOL erase ); +HDC WINAPI NtUserGetWindowDC( HWND hwnd ); BOOL WINAPI NtUserGetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *placement ); int WINAPI NtUserGetWindowRgnEx( HWND hwnd, HRGN hrgn, UINT unk ); BOOL WINAPI NtUserHideCaret( HWND hwnd );
1
0
0
0
Jacek Caban : win32u: Move NtUserGetDC implementation from user32.
by Alexandre Julliard
29 Nov '22
29 Nov '22
Module: wine Branch: master Commit: be6f5ed95ab24a8a1f5fd0bc0e74e566c717c83c URL:
https://gitlab.winehq.org/wine/wine/-/commit/be6f5ed95ab24a8a1f5fd0bc0e74e5…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 28 21:24:27 2022 +0100 win32u: Move NtUserGetDC implementation from user32. --- dlls/user32/button.c | 4 ++-- dlls/user32/clipboard.c | 6 +++--- dlls/user32/combo.c | 4 ++-- dlls/user32/dialog.c | 2 +- dlls/user32/edit.c | 10 +++++----- dlls/user32/icontitle.c | 2 +- dlls/user32/mdi.c | 2 +- dlls/user32/msgbox.c | 2 +- dlls/user32/painting.c | 16 ---------------- dlls/user32/static.c | 2 +- dlls/user32/user32.spec | 2 +- dlls/win32u/dce.c | 9 +++++++++ dlls/win32u/menu.c | 6 +++--- dlls/win32u/syscall.c | 1 + dlls/win32u/sysparams.c | 2 +- dlls/win32u/win32u.spec | 2 +- dlls/wow64win/syscall.h | 1 + dlls/wow64win/user.c | 7 +++++++ include/ntuser.h | 1 + 19 files changed, 42 insertions(+), 39 deletions(-)
1
0
0
0
Alex Henrie : wininet: Simplify memory allocation in HTTP_InsertCustomHeader.
by Alexandre Julliard
28 Nov '22
28 Nov '22
Module: wine Branch: master Commit: 6905b76b9400209ded97983ceca9f9c15de22d98 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6905b76b9400209ded97983ceca9f9…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Mon Nov 28 08:44:34 2022 -0700 wininet: Simplify memory allocation in HTTP_InsertCustomHeader. --- dlls/wininet/http.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 18f61f108fc..b42f823208c 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -6280,15 +6280,7 @@ static DWORD HTTP_InsertCustomHeader(http_request_t *request, LPHTTPHEADERW lpHd TRACE("--> %s: %s\n", debugstr_w(lpHdr->lpszField), debugstr_w(lpHdr->lpszValue)); count = request->nCustHeaders + 1; - if (count > 1) - { - lph = realloc(request->custHeaders, sizeof(HTTPHEADERW) * count); - memset(lph + request->nCustHeaders, 0, sizeof(HTTPHEADERW)); - } - else - { - lph = calloc(count, sizeof(HTTPHEADERW)); - } + lph = realloc(request->custHeaders, sizeof(HTTPHEADERW) * count); if (!lph) return ERROR_OUTOFMEMORY;
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
118
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Results per page:
10
25
50
100
200