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
May 2021
----- 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
2 participants
770 discussions
Start a n
N
ew thread
Jacek Caban : msvcrt: Add sincos to importlib.
by Alexandre Julliard
18 May '21
18 May '21
Module: wine Branch: master Commit: f0131276474997b9d4e593bbf8c5616b879d3bd5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f0131276474997b9d4e593bb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue May 18 18:08:43 2021 +0200 msvcrt: Add sincos to importlib. Fixes cross compilation with GCC 11, which may optimize a pair of sin(), cos() calls to a single sincos() call, which is not exported by any msvcrt version. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcr100/Makefile.in | 1 + dlls/msvcr110/Makefile.in | 1 + dlls/msvcr120/Makefile.in | 1 + dlls/msvcr70/Makefile.in | 1 + dlls/msvcr71/Makefile.in | 1 + dlls/msvcr80/Makefile.in | 1 + dlls/msvcr90/Makefile.in | 1 + dlls/msvcrt/Makefile.in | 1 + dlls/msvcrt/sincos.c | 40 ++++++++++++++++++++++++++++++++++++++++ dlls/ucrtbase/Makefile.in | 1 + 10 files changed, 49 insertions(+) diff --git a/dlls/msvcr100/Makefile.in b/dlls/msvcr100/Makefile.in index c5a7710ea41..edf4b4d4407 100644 --- a/dlls/msvcr100/Makefile.in +++ b/dlls/msvcr100/Makefile.in @@ -34,6 +34,7 @@ C_SRCS = \ process.c \ scanf.c \ scheduler.c \ + sincos.c \ string.c \ thread.c \ time.c \ diff --git a/dlls/msvcr110/Makefile.in b/dlls/msvcr110/Makefile.in index d2ba0ac29e3..c3ee2ca7e8e 100644 --- a/dlls/msvcr110/Makefile.in +++ b/dlls/msvcr110/Makefile.in @@ -34,6 +34,7 @@ C_SRCS = \ process.c \ scanf.c \ scheduler.c \ + sincos.c \ string.c \ thread.c \ time.c \ diff --git a/dlls/msvcr120/Makefile.in b/dlls/msvcr120/Makefile.in index 68a85c581d1..953e9760ca0 100644 --- a/dlls/msvcr120/Makefile.in +++ b/dlls/msvcr120/Makefile.in @@ -34,6 +34,7 @@ C_SRCS = \ process.c \ scanf.c \ scheduler.c \ + sincos.c \ string.c \ thread.c \ time.c \ diff --git a/dlls/msvcr70/Makefile.in b/dlls/msvcr70/Makefile.in index e6dd41b32a5..4c443ecd7f6 100644 --- a/dlls/msvcr70/Makefile.in +++ b/dlls/msvcr70/Makefile.in @@ -33,6 +33,7 @@ C_SRCS = \ onexit.c \ process.c \ scanf.c \ + sincos.c \ string.c \ thread.c \ time.c \ diff --git a/dlls/msvcr71/Makefile.in b/dlls/msvcr71/Makefile.in index 7795ce1ae24..6f51a326c6b 100644 --- a/dlls/msvcr71/Makefile.in +++ b/dlls/msvcr71/Makefile.in @@ -33,6 +33,7 @@ C_SRCS = \ onexit.c \ process.c \ scanf.c \ + sincos.c \ string.c \ thread.c \ time.c \ diff --git a/dlls/msvcr80/Makefile.in b/dlls/msvcr80/Makefile.in index 7d11f65b3a3..3e2da553562 100644 --- a/dlls/msvcr80/Makefile.in +++ b/dlls/msvcr80/Makefile.in @@ -33,6 +33,7 @@ C_SRCS = \ onexit.c \ process.c \ scanf.c \ + sincos.c \ string.c \ thread.c \ time.c \ diff --git a/dlls/msvcr90/Makefile.in b/dlls/msvcr90/Makefile.in index 9cb511bbe06..4a49fcfd254 100644 --- a/dlls/msvcr90/Makefile.in +++ b/dlls/msvcr90/Makefile.in @@ -33,6 +33,7 @@ C_SRCS = \ onexit.c \ process.c \ scanf.c \ + sincos.c \ string.c \ thread.c \ time.c \ diff --git a/dlls/msvcrt/Makefile.in b/dlls/msvcrt/Makefile.in index 486e6f5491b..16405262fca 100644 --- a/dlls/msvcrt/Makefile.in +++ b/dlls/msvcrt/Makefile.in @@ -38,6 +38,7 @@ C_SRCS = \ process.c \ scanf.c \ scheduler.c \ + sincos.c \ string.c \ thread.c \ time.c \ diff --git a/dlls/msvcrt/sincos.c b/dlls/msvcrt/sincos.c new file mode 100644 index 00000000000..1a34c50f034 --- /dev/null +++ b/dlls/msvcrt/sincos.c @@ -0,0 +1,40 @@ +/* + * sincos implementation + * + * Copyright 2021 Jacek Caban for CodeWeavers + * + * 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 + */ + +#if 0 +#pragma makedep implib +#endif + +#include <math.h> + +/* GCC may optimize a pair of sin(), cos() calls to a single sincos() call, + * which is not exported by any msvcrt version. */ + +void sincos(double x, double *s, double *c) +{ + *s = sin(x); + *c = cos(x); +} + +void sincosf(float x, float *s, float *c) +{ + *s = sinf(x); + *c = cosf(x); +} diff --git a/dlls/ucrtbase/Makefile.in b/dlls/ucrtbase/Makefile.in index a576cf0250b..2910016f29f 100644 --- a/dlls/ucrtbase/Makefile.in +++ b/dlls/ucrtbase/Makefile.in @@ -37,6 +37,7 @@ C_SRCS = \ printf.c \ process.c \ scanf.c \ + sincos.c \ string.c \ thread.c \ time.c \
1
0
0
0
Zhiyi Zhang : winex11.drv: Add a cache for querying XRandR 1.4 current modes.
by Alexandre Julliard
18 May '21
18 May '21
Module: wine Branch: master Commit: 7fabcf6fed93545cea5f8e4fdace4355bb5710ed URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7fabcf6fed93545cea5f8e4f…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Tue May 18 17:14:29 2021 +0800 winex11.drv: Add a cache for querying XRandR 1.4 current modes. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51047
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/xrandr.c | 120 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 104 insertions(+), 16 deletions(-) diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c index fa748c2af04..c3af35d8ec3 100644 --- a/dlls/winex11.drv/xrandr.c +++ b/dlls/winex11.drv/xrandr.c @@ -324,6 +324,32 @@ static LONG xrandr10_set_current_mode( ULONG_PTR id, DEVMODEW *mode ) #ifdef HAVE_XRRGETPROVIDERRESOURCES +static struct current_mode +{ + ULONG_PTR id; + BOOL loaded; + DEVMODEW mode; +} *current_modes; +static int current_mode_count; + +static CRITICAL_SECTION current_modes_section; +static CRITICAL_SECTION_DEBUG current_modes_critsect_debug = +{ + 0, 0, ¤t_modes_section, + {¤t_modes_critsect_debug.ProcessLocksList, ¤t_modes_critsect_debug.ProcessLocksList}, + 0, 0, {(DWORD_PTR)(__FILE__ ": current_modes_section")} +}; +static CRITICAL_SECTION current_modes_section = {¤t_modes_critsect_debug, -1, 0, 0, 0, 0}; + +static void xrandr14_invalidate_current_mode_cache(void) +{ + EnterCriticalSection( ¤t_modes_section ); + heap_free( current_modes); + current_modes = NULL; + current_mode_count = 0; + LeaveCriticalSection( ¤t_modes_section ); +} + static XRRScreenResources *xrandr_get_screen_resources(void) { XRRScreenResources *resources = pXRRGetScreenResourcesCurrent( gdi_display, root_window ); @@ -1115,6 +1141,7 @@ static void xrandr14_free_monitors( struct x11drv_monitor *monitors ) static BOOL xrandr14_device_change_handler( HWND hwnd, XEvent *event ) { + xrandr14_invalidate_current_mode_cache(); if (hwnd == GetDesktopWindow() && GetWindowThreadProcessId( hwnd, NULL ) == GetCurrentThreadId()) { /* Don't send a WM_DISPLAYCHANGE message here because this event may be a result from @@ -1148,7 +1175,8 @@ static void xrandr14_register_event_handlers(void) /* XRandR 1.4 display settings handler */ static BOOL xrandr14_get_id( const WCHAR *device_name, ULONG_PTR *id ) { - INT gpu_count, adapter_count, display_count = 0; + struct current_mode *tmp_modes, *new_current_modes = NULL; + INT gpu_count, adapter_count, new_current_mode_count = 0; INT gpu_idx, adapter_idx, display_idx; struct x11drv_adapter *adapters; struct x11drv_gpu *gpus; @@ -1159,31 +1187,60 @@ static BOOL xrandr14_get_id( const WCHAR *device_name, ULONG_PTR *id ) if (*end) return FALSE; - if (!xrandr14_get_gpus2( &gpus, &gpu_count, FALSE )) - return FALSE; - - for (gpu_idx = 0; gpu_idx < gpu_count; ++gpu_idx) + /* Update cache */ + EnterCriticalSection( ¤t_modes_section ); + if (!current_modes) { - if (!xrandr14_get_adapters( gpus[gpu_idx].id, &adapters, &adapter_count )) + if (!xrandr14_get_gpus2( &gpus, &gpu_count, FALSE )) { - xrandr14_free_gpus( gpus ); + LeaveCriticalSection( ¤t_modes_section ); return FALSE; } - adapter_idx = display_idx - display_count; - if (adapter_idx < adapter_count) + for (gpu_idx = 0; gpu_idx < gpu_count; ++gpu_idx) { - *id = adapters[adapter_idx].id; + if (!xrandr14_get_adapters( gpus[gpu_idx].id, &adapters, &adapter_count )) + break; + + if (!new_current_modes) + tmp_modes = heap_alloc( adapter_count * sizeof(*tmp_modes) ); + else + tmp_modes = heap_realloc( new_current_modes, (new_current_mode_count + adapter_count) * sizeof(*tmp_modes) ); + + if (!tmp_modes) + { + xrandr14_free_adapters( adapters ); + break; + } + new_current_modes = tmp_modes; + + for (adapter_idx = 0; adapter_idx < adapter_count; ++adapter_idx) + { + new_current_modes[new_current_mode_count + adapter_idx].id = adapters[adapter_idx].id; + new_current_modes[new_current_mode_count + adapter_idx].loaded = FALSE; + } + new_current_mode_count += adapter_count; xrandr14_free_adapters( adapters ); - xrandr14_free_gpus( gpus ); - return TRUE; } + xrandr14_free_gpus( gpus ); - display_count += adapter_count; - xrandr14_free_adapters( adapters ); + if (new_current_modes) + { + heap_free( current_modes ); + current_modes = new_current_modes; + current_mode_count = new_current_mode_count; + } } - xrandr14_free_gpus( gpus ); - return FALSE; + + if (display_idx >= current_mode_count) + { + LeaveCriticalSection( ¤t_modes_section ); + return FALSE; + } + + *id = current_modes[display_idx].id; + LeaveCriticalSection( ¤t_modes_section ); + return TRUE; } static void add_xrandr14_mode( DEVMODEW *mode, XRRModeInfo *info, DWORD depth, DWORD frequency, @@ -1342,6 +1399,21 @@ static BOOL xrandr14_get_current_mode( ULONG_PTR id, DEVMODEW *mode ) RECT primary; INT mode_idx; + EnterCriticalSection( ¤t_modes_section ); + for (mode_idx = 0; mode_idx < current_mode_count; ++mode_idx) + { + if (current_modes[mode_idx].id != id) + continue; + + if (!current_modes[mode_idx].loaded) + break; + + memcpy( mode, ¤t_modes[mode_idx].mode, sizeof(*mode) ); + LeaveCriticalSection( ¤t_modes_section ); + return TRUE; + } + LeaveCriticalSection( ¤t_modes_section ); + screen_resources = xrandr_get_screen_resources(); if (!screen_resources) goto done; @@ -1400,6 +1472,21 @@ static BOOL xrandr14_get_current_mode( ULONG_PTR id, DEVMODEW *mode ) mode->u1.s2.dmPosition.x = crtc_info->x - primary.left; mode->u1.s2.dmPosition.y = crtc_info->y - primary.top; ret = TRUE; + + EnterCriticalSection( ¤t_modes_section ); + for (mode_idx = 0; mode_idx < current_mode_count; ++mode_idx) + { + if (current_modes[mode_idx].id != id) + continue; + + memcpy( ¤t_modes[mode_idx].mode, mode, sizeof(*mode) ); + current_modes[mode_idx].mode.dmSize = sizeof(*mode); + current_modes[mode_idx].mode.dmDriverExtra = 0; + current_modes[mode_idx].loaded = TRUE; + break; + } + LeaveCriticalSection( ¤t_modes_section ); + done: if (crtc_info) pXRRFreeCrtcInfo( crtc_info ); @@ -1517,6 +1604,7 @@ done: if (output_info) pXRRFreeOutputInfo( output_info ); pXRRFreeScreenResources( screen_resources ); + xrandr14_invalidate_current_mode_cache(); return ret; }
1
0
0
0
Zhiyi Zhang : user32: Add a cache for EnumDisplayDevicesW().
by Alexandre Julliard
18 May '21
18 May '21
Module: wine Branch: master Commit: 095bdc6c43ea8ccb8d301b6fcf05baa776481bd3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=095bdc6c43ea8ccb8d301b6f…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Tue May 18 17:14:18 2021 +0800 user32: Add a cache for EnumDisplayDevicesW(). Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/sysparams.c | 313 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 218 insertions(+), 95 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=095bdc6c43ea8ccb8d30…
1
0
0
0
Zhiyi Zhang : user32: Use get_primary_monitor_rect() helper.
by Alexandre Julliard
18 May '21
18 May '21
Module: wine Branch: master Commit: 9b2f59cb94d5aa7b8fbe4e0373d933a630b51dc1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9b2f59cb94d5aa7b8fbe4e03…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Tue May 18 17:11:25 2021 +0800 user32: Use get_primary_monitor_rect() helper. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/input.c | 16 +++++++--------- dlls/user32/sysparams.c | 6 ++---- dlls/user32/user_private.h | 1 + dlls/user32/win.c | 3 +-- dlls/user32/winpos.c | 7 ++++--- 5 files changed, 15 insertions(+), 18 deletions(-) diff --git a/dlls/user32/input.c b/dlls/user32/input.c index ba0292c8f88..b4e3579f5e8 100644 --- a/dlls/user32/input.c +++ b/dlls/user32/input.c @@ -195,17 +195,15 @@ static void update_mouse_coords( INPUT *input ) if (input->u.mi.dwFlags & MOUSEEVENTF_ABSOLUTE) { DPI_AWARENESS_CONTEXT context = SetThreadDpiAwarenessContext( DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ); + RECT rc; + if (input->u.mi.dwFlags & MOUSEEVENTF_VIRTUALDESK) - { - RECT rc = get_virtual_screen_rect(); - input->u.mi.dx = rc.left + ((input->u.mi.dx * (rc.right - rc.left)) >> 16); - input->u.mi.dy = rc.top + ((input->u.mi.dy * (rc.bottom - rc.top)) >> 16); - } + rc = get_virtual_screen_rect(); else - { - input->u.mi.dx = (input->u.mi.dx * GetSystemMetrics( SM_CXSCREEN )) >> 16; - input->u.mi.dy = (input->u.mi.dy * GetSystemMetrics( SM_CYSCREEN )) >> 16; - } + rc = get_primary_monitor_rect(); + + input->u.mi.dx = rc.left + ((input->u.mi.dx * (rc.right - rc.left)) >> 16); + input->u.mi.dy = rc.top + ((input->u.mi.dy * (rc.bottom - rc.top)) >> 16); SetThreadDpiAwarenessContext( context ); } else diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index 3d0cb2a6566..015db0db50e 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -366,7 +366,7 @@ static BOOL CALLBACK get_primary_monitor_proc( HMONITOR monitor, HDC hdc, LPRECT return TRUE; } -static RECT get_primary_monitor_rect(void) +RECT get_primary_monitor_rect(void) { RECT rect = {0}; @@ -1818,9 +1818,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam, spi_idx = SPI_SETWORKAREA_IDX; if (!spi_loaded[spi_idx]) { - SetRect( &work_area, 0, 0, - GetSystemMetrics( SM_CXSCREEN ), - GetSystemMetrics( SM_CYSCREEN ) ); + work_area = get_primary_monitor_rect(); EnumDisplayMonitors( 0, NULL, enum_monitors, (LPARAM)&work_area ); spi_loaded[spi_idx] = TRUE; } diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 974d18be482..82cf376ef54 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -261,6 +261,7 @@ extern void update_window_state( HWND hwnd ) DECLSPEC_HIDDEN; extern void wait_graphics_driver_ready(void) DECLSPEC_HIDDEN; extern void *get_hook_proc( void *proc, const WCHAR *module, HMODULE *free_module ) DECLSPEC_HIDDEN; extern RECT get_virtual_screen_rect(void) DECLSPEC_HIDDEN; +extern RECT get_primary_monitor_rect(void) DECLSPEC_HIDDEN; extern LRESULT call_current_hook( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN; extern DWORD get_input_codepage( void ) DECLSPEC_HIDDEN; extern BOOL map_wparam_AtoW( UINT message, WPARAM *wparam, enum wm_char_mapping mapping ) DECLSPEC_HIDDEN; diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 680defc2071..86a1f50ca77 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -855,8 +855,7 @@ BOOL WIN_GetRectangles( HWND hwnd, enum coords_relative relative, RECT *rectWind } else { - rect.right = GetSystemMetrics(SM_CXSCREEN); - rect.bottom = GetSystemMetrics(SM_CYSCREEN); + rect = get_primary_monitor_rect(); } if (rectWindow) *rectWindow = rect; if (rectClient) *rectClient = rect; diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index de5d50d4c3a..5a2b8ccdfe8 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -740,7 +740,7 @@ MINMAXINFO WINPOS_GetMinMaxInfo( HWND hwnd ) if ((monitor = MonitorFromWindow( hwnd, MONITOR_DEFAULTTOPRIMARY ))) { - RECT rc_work; + RECT rc_work, rc_primary; MONITORINFO mon_info; mon_info.cbSize = sizeof(mon_info); @@ -754,8 +754,9 @@ MINMAXINFO WINPOS_GetMinMaxInfo( HWND hwnd ) rc_work = mon_info.rcWork; } - if (MinMax.ptMaxSize.x == GetSystemMetrics(SM_CXSCREEN) + 2 * xinc && - MinMax.ptMaxSize.y == GetSystemMetrics(SM_CYSCREEN) + 2 * yinc) + rc_primary = get_primary_monitor_rect(); + if (MinMax.ptMaxSize.x == (rc_primary.right - rc_primary.left) + 2 * xinc && + MinMax.ptMaxSize.y == (rc_primary.bottom - rc_primary.top) + 2 * yinc) { MinMax.ptMaxSize.x = (rc_work.right - rc_work.left) + 2 * xinc; MinMax.ptMaxSize.y = (rc_work.bottom - rc_work.top) + 2 * yinc;
1
0
0
0
Zhiyi Zhang : user32: Optimize getting virtual screen rectangle with GetSystemMetrics().
by Alexandre Julliard
18 May '21
18 May '21
Module: wine Branch: master Commit: 59e5a8d055f28bde9f53354cd250a641d84b9a51 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=59e5a8d055f28bde9f53354c…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Tue May 18 17:11:18 2021 +0800 user32: Optimize getting virtual screen rectangle with GetSystemMetrics(). This saves calls to GetMonitorInfo(). Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/sysparams.c | 49 +++++++++++++++---------------------------------- 1 file changed, 15 insertions(+), 34 deletions(-) diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index ab1c5af0c1b..3d0cb2a6566 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -337,38 +337,20 @@ static void SYSPARAMS_NonClientMetrics32ATo32W( const NONCLIENTMETRICSA* lpnm32A /* Helper functions to retrieve monitors info */ -struct monitor_info +static BOOL CALLBACK get_virtual_screen_proc( HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM lp ) { - int count; - RECT primary_rect; - RECT virtual_rect; -}; + RECT *virtual_rect = (RECT *)lp; -static BOOL CALLBACK monitor_info_proc( HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM lp ) -{ - MONITORINFO mi; - struct monitor_info *info = (struct monitor_info *)lp; - info->count++; - UnionRect( &info->virtual_rect, &info->virtual_rect, rect ); - mi.cbSize = sizeof(mi); - if (GetMonitorInfoW( monitor, &mi ) && (mi.dwFlags & MONITORINFOF_PRIMARY)) - info->primary_rect = mi.rcMonitor; + UnionRect( virtual_rect, virtual_rect, rect ); return TRUE; } -static void get_monitors_info( struct monitor_info *info ) -{ - info->count = 0; - SetRectEmpty( &info->primary_rect ); - SetRectEmpty( &info->virtual_rect ); - EnumDisplayMonitors( 0, NULL, monitor_info_proc, (LPARAM)info ); -} - RECT get_virtual_screen_rect(void) { - struct monitor_info info; - get_monitors_info( &info ); - return info.virtual_rect; + RECT rect = {0}; + + EnumDisplayMonitors( 0, NULL, get_virtual_screen_proc, (LPARAM)&rect ); + return rect; } static BOOL CALLBACK get_primary_monitor_proc( HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM lp ) @@ -2527,7 +2509,6 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam, */ INT WINAPI GetSystemMetrics( INT index ) { - struct monitor_info info; NONCLIENTMETRICSW ncm; MINIMIZEDMETRICS mm; ICONMETRICSW im; @@ -2743,17 +2724,17 @@ INT WINAPI GetSystemMetrics( INT index ) rect = get_primary_monitor_rect(); return rect.bottom - rect.top; case SM_XVIRTUALSCREEN: - get_monitors_info( &info ); - return info.virtual_rect.left; + rect = get_virtual_screen_rect(); + return rect.left; case SM_YVIRTUALSCREEN: - get_monitors_info( &info ); - return info.virtual_rect.top; + rect = get_virtual_screen_rect(); + return rect.top; case SM_CXVIRTUALSCREEN: - get_monitors_info( &info ); - return info.virtual_rect.right - info.virtual_rect.left; + rect = get_virtual_screen_rect(); + return rect.right - rect.left; case SM_CYVIRTUALSCREEN: - get_monitors_info( &info ); - return info.virtual_rect.bottom - info.virtual_rect.top; + rect = get_virtual_screen_rect(); + return rect.bottom - rect.top; case SM_CMONITORS: return get_monitor_count(); case SM_SAMEDISPLAYFORMAT:
1
0
0
0
Zhiyi Zhang : user32: Optimize getting primary monitor rectangle with GetSystemMetrics().
by Alexandre Julliard
18 May '21
18 May '21
Module: wine Branch: master Commit: ab431c70b4537ce62ead8d79939d801932327159 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ab431c70b4537ce62ead8d79…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Tue May 18 17:11:10 2021 +0800 user32: Optimize getting primary monitor rectangle with GetSystemMetrics(). This saves calls to GetMonitorInfo() and return from EnumDisplayMonitors() immediately after the primary monitor is found. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/sysparams.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index 7dc2a8df645..ab1c5af0c1b 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -371,6 +371,27 @@ RECT get_virtual_screen_rect(void) return info.virtual_rect; } +static BOOL CALLBACK get_primary_monitor_proc( HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM lp ) +{ + RECT *primary_rect = (RECT *)lp; + + if (!rect->top && !rect->left && rect->right && rect->bottom) + { + *primary_rect = *rect; + return FALSE; + } + + return TRUE; +} + +static RECT get_primary_monitor_rect(void) +{ + RECT rect = {0}; + + EnumDisplayMonitors( 0, NULL, get_primary_monitor_proc, (LPARAM)&rect ); + return rect; +} + static BOOL CALLBACK get_monitor_count_proc( HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM lp ) { INT *count = (INT *)lp; @@ -2510,6 +2531,7 @@ INT WINAPI GetSystemMetrics( INT index ) NONCLIENTMETRICSW ncm; MINIMIZEDMETRICS mm; ICONMETRICSW im; + RECT rect; UINT ret; HDC hdc; @@ -2715,11 +2737,11 @@ INT WINAPI GetSystemMetrics( INT index ) case SM_MOUSEWHEELPRESENT: return 1; case SM_CXSCREEN: - get_monitors_info( &info ); - return info.primary_rect.right - info.primary_rect.left; + rect = get_primary_monitor_rect(); + return rect.right - rect.left; case SM_CYSCREEN: - get_monitors_info( &info ); - return info.primary_rect.bottom - info.primary_rect.top; + rect = get_primary_monitor_rect(); + return rect.bottom - rect.top; case SM_XVIRTUALSCREEN: get_monitors_info( &info ); return info.virtual_rect.left;
1
0
0
0
Zhiyi Zhang : user32: Optimize getting monitor count with GetSystemMetrics().
by Alexandre Julliard
18 May '21
18 May '21
Module: wine Branch: master Commit: d7cd5587df5c0dfc6a5b0b9586b0feee28ee0de8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d7cd5587df5c0dfc6a5b0b95…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Tue May 18 17:11:02 2021 +0800 user32: Optimize getting monitor count with GetSystemMetrics(). This saves calls to GetMonitorInfo(). Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/sysparams.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index 0b4dbfc2d78..7dc2a8df645 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -371,6 +371,22 @@ RECT get_virtual_screen_rect(void) return info.virtual_rect; } +static BOOL CALLBACK get_monitor_count_proc( HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM lp ) +{ + INT *count = (INT *)lp; + + ++(*count); + return TRUE; +} + +static INT get_monitor_count(void) +{ + INT count = 0; + + EnumDisplayMonitors( 0, NULL, get_monitor_count_proc, (LPARAM)&count ); + return count; +} + static BOOL get_primary_adapter(WCHAR *name) { DISPLAY_DEVICEW dd; @@ -2717,8 +2733,7 @@ INT WINAPI GetSystemMetrics( INT index ) get_monitors_info( &info ); return info.virtual_rect.bottom - info.virtual_rect.top; case SM_CMONITORS: - get_monitors_info( &info ); - return info.count; + return get_monitor_count(); case SM_SAMEDISPLAYFORMAT: return 1; case SM_IMMENABLED:
1
0
0
0
Aurimas Fišeras : po: Update Lithuanian translation.
by Alexandre Julliard
18 May '21
18 May '21
Module: wine Branch: master Commit: 573d451b806ccae9633cc2b4e66a527b4cfdb1e4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=573d451b806ccae9633cc2b4…
Author: Aurimas Fišeras <aurimas(a)members.fsf.org> Date: Tue May 18 12:47:54 2021 +0300 po: Update Lithuanian translation. Signed-off-by: Aurimas Fišeras <aurimas(a)members.fsf.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/lt.po | 69 +++++++++++++++------------------------------------------------- 1 file changed, 16 insertions(+), 53 deletions(-) diff --git a/po/lt.po b/po/lt.po index 48fe76a4878..78c128b31a6 100644 --- a/po/lt.po +++ b/po/lt.po @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To:
https://bugs.winehq.org\n
" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2021-05-13 19:49+0300\n" +"PO-Revision-Date: 2021-05-18 12:44+0300\n" "Last-Translator: Aurimas Fišeras <aurimas(a)members.fsf.org>\n" "Language-Team: Lithuanian <komp_lt(a)konf.lt>\n" "Language: lt\n" @@ -14232,17 +14232,6 @@ msgid "Icons (*.ico)" msgstr "Piktogramos (*.ico)" #: programs/reg/reg.rc:35 -#, fuzzy -#| msgid "" -#| "Usage:\n" -#| " REG [operation] [parameters]\n" -#| "\n" -#| "Supported operations:\n" -#| " ADD | DELETE | EXPORT | IMPORT | QUERY\n" -#| "\n" -#| "For help on a specific operation, type:\n" -#| " REG [operation] /?\n" -#| "\n" msgid "" "Usage:\n" " REG [operation] [parameters]\n" @@ -14258,7 +14247,7 @@ msgstr "" " REG [operacija] [parametrai]\n" "\n" "Palaikomos operacijos:\n" -" ADD | DELETE | EXPORT | IMPORT | QUERY\n" +" ADD | COPY | DELETE | EXPORT | IMPORT | QUERY\n" "\n" "Pagalbai apie specifinę operaciją, įrašykite:\n" " REG [operacija] /?\n" @@ -14733,35 +14722,6 @@ msgid "reg: Unable to access or create the specified registry key\n" msgstr "reg: Nepavyko prieiti prie ar sukurti nurodyto registro rakto\n" #: programs/reg/reg.rc:202 -#, fuzzy -#| msgid "" -#| "REG EXPORT <key> <file> [/y]\n" -#| "\n" -#| " Exports a specified registry key (including all subkeys and values)\n" -#| " to a file.\n" -#| "\n" -#| " <key>\n" -#| " The registry key to export.\n" -#| "\n" -#| " Format: ROOT\\Subkey\n" -#| "\n" -#| " ROOT: A predefined registry key. This must be one of the following:\n" -#| "\n" -#| " HKEY_LOCAL_MACHINE | HKLM\n" -#| " HKEY_CURRENT_USER | HKCU\n" -#| " HKEY_CLASSES_ROOT | HKCR\n" -#| " HKEY_USERS | HKU\n" -#| " HKEY_CURRENT_CONFIG | HKCC\n" -#| "\n" -#| " Subkey: The full path to a registry key under a given ROOT key.\n" -#| "\n" -#| " <file>\n" -#| " The name and path of the registry file that will be created.\n" -#| " This file must have a .reg extension.\n" -#| "\n" -#| " /y\n" -#| " Overwrite <file> without prompting for confirmation.\n" -#| "\n" msgid "" "REG COPY <key1> <key2> [/s] [/f]\n" "\n" @@ -14795,14 +14755,15 @@ msgid "" "<key2>.\n" "\n" msgstr "" -"REG EXPORT <raktas> <failas> [/y]\n" +"REG COPY <raktas1> <raktas2> [/s] [/f]\n" "\n" -" Eksportuoja nurodytą registro raktą (įskaitant visus porakčius ir " -"reikšmes)\n" -" į failą\n" +" Kopijuoja nurodyto registro rakto turinį į kitą vietą\n" +" Standartiškai ši operacija kopijuoja tik registro reikšmes. Naudokite\n" +" [/s] rekursyviai nukopijuoti visus porakčius ir reikšmes.\n" "\n" -" <raktas>\n" -" Registro raktas eksportui.\n" +" <raktas1>,<raktas2>\n" +" Registro raktai nurodantys duomenų šaltinį (<raktas1>) ir\n" +" paskirtį (<raktas2>). Jei <raktas2> neegzistuoja, jis bus sukurtas.\n" "\n" " Formatas: ŠAKNIS\\Poraktis\n" "\n" @@ -14816,12 +14777,14 @@ msgstr "" "\n" " Poraktis: Pilnas kelias iki registro rakto po nurodytu ŠAKNIES raktu.\n" "\n" -" <failas>\n" -" Registro failo, kuris bus sukurtas, pavadinimas ir kelias.\n" -" Failas privalo turėti plėtinį .reg.\n" +" /s\n" +" Kopijuoti visus porakčius ir reikšmes iš <raktas1> į <raktas2>.\n" "\n" -" /y\n" -" Perrašyti <failas> be patvirtinimo klausimo.\n" +" /f\n" +" Perrašyti visus registro duomenis rakte <raktas2> be patvirtinimo " +"klausimo.\n" +" Šis parametras nemodifikuoja porakčių ir reikšmių, kurie yra tik " +"<raktas2>.\n" "\n" #: programs/regedit/regedit.rc:34
1
0
0
0
Hans Leidekker : webservices: Add async support in WsOpenChannel.
by Alexandre Julliard
18 May '21
18 May '21
Module: wine Branch: master Commit: 69fa6f21654544ad521da9484fc57970cb426d47 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=69fa6f21654544ad521da948…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue May 18 17:19:45 2021 +0200 webservices: Add async support in WsOpenChannel. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/channel.c | 48 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/dlls/webservices/channel.c b/dlls/webservices/channel.c index 458815ea7cc..bc65f0943bf 100644 --- a/dlls/webservices/channel.c +++ b/dlls/webservices/channel.c @@ -1177,18 +1177,52 @@ static HRESULT open_channel( struct channel *channel, const WS_ENDPOINT_ADDRESS return hr; } +struct open_channel +{ + struct task task; + struct channel *channel; + const WS_ENDPOINT_ADDRESS *endpoint; + WS_ASYNC_CONTEXT ctx; +}; + +static void open_channel_proc( struct task *task ) +{ + struct open_channel *o = (struct open_channel *)task; + HRESULT hr; + + hr = open_channel( o->channel, o->endpoint ); + + TRACE( "calling %p(%08x)\n", o->ctx.callback, hr ); + o->ctx.callback( hr, WS_LONG_CALLBACK, o->ctx.callbackState ); + TRACE( "%p returned\n", o->ctx.callback ); +} + +static HRESULT queue_open_channel( struct channel *channel, const WS_ENDPOINT_ADDRESS *endpoint, + const WS_ASYNC_CONTEXT *ctx ) +{ + struct open_channel *o; + + if (!(o = heap_alloc( sizeof(*o) ))) return E_OUTOFMEMORY; + o->task.proc = open_channel_proc; + o->channel = channel; + o->endpoint = endpoint; + o->ctx = *ctx; + return queue_task( &channel->send_q, &o->task ); +} + /************************************************************************** * WsOpenChannel [webservices.@] */ -HRESULT WINAPI WsOpenChannel( WS_CHANNEL *handle, const WS_ENDPOINT_ADDRESS *endpoint, - const WS_ASYNC_CONTEXT *ctx, WS_ERROR *error ) +HRESULT WINAPI WsOpenChannel( WS_CHANNEL *handle, const WS_ENDPOINT_ADDRESS *endpoint, const WS_ASYNC_CONTEXT *ctx, + WS_ERROR *error ) { struct channel *channel = (struct channel *)handle; + WS_ASYNC_CONTEXT ctx_local; + struct async async; HRESULT hr; TRACE( "%p %p %p %p\n", handle, endpoint, ctx, error ); if (error) FIXME( "ignoring error parameter\n" ); - if (ctx) FIXME( "ignoring ctx parameter\n" ); if (!channel || !endpoint) return E_INVALIDARG; @@ -1205,7 +1239,13 @@ HRESULT WINAPI WsOpenChannel( WS_CHANNEL *handle, const WS_ENDPOINT_ADDRESS *end return WS_E_INVALID_OPERATION; } - hr = open_channel( channel, endpoint ); + if (!ctx) async_init( &async, &ctx_local ); + hr = queue_open_channel( channel, endpoint, ctx ? ctx : &ctx_local ); + if (!ctx) + { + if (hr == WS_S_ASYNC) hr = async_wait( &async ); + CloseHandle( async.done ); + } LeaveCriticalSection( &channel->cs ); TRACE( "returning %08x\n", hr );
1
0
0
0
Hans Leidekker : webservices: Add async support in WsCloseChannel.
by Alexandre Julliard
18 May '21
18 May '21
Module: wine Branch: master Commit: 81bedbf661d9000b246856195a21f1500ebffef0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=81bedbf661d9000b24685619…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue May 18 17:19:44 2021 +0200 webservices: Add async support in WsCloseChannel. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/channel.c | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/dlls/webservices/channel.c b/dlls/webservices/channel.c index 539a7813605..458815ea7cc 100644 --- a/dlls/webservices/channel.c +++ b/dlls/webservices/channel.c @@ -894,17 +894,47 @@ static void close_channel( struct channel *channel ) channel->state = WS_CHANNEL_STATE_CLOSED; } +struct close_channel +{ + struct task task; + struct channel *channel; + WS_ASYNC_CONTEXT ctx; +}; + +static void close_channel_proc( struct task *task ) +{ + struct close_channel *c = (struct close_channel *)task; + + close_channel( c->channel ); + + TRACE( "calling %p(S_OK)\n", c->ctx.callback ); + c->ctx.callback( S_OK, WS_LONG_CALLBACK, c->ctx.callbackState ); + TRACE( "%p returned\n", c->ctx.callback ); +} + +static HRESULT queue_close_channel( struct channel *channel, const WS_ASYNC_CONTEXT *ctx ) +{ + struct close_channel *c; + + if (!(c = heap_alloc( sizeof(*c) ))) return E_OUTOFMEMORY; + c->task.proc = close_channel_proc; + c->channel = channel; + c->ctx = *ctx; + return queue_task( &channel->send_q, &c->task ); +} + /************************************************************************** * WsCloseChannel [webservices.@] */ HRESULT WINAPI WsCloseChannel( WS_CHANNEL *handle, const WS_ASYNC_CONTEXT *ctx, WS_ERROR *error ) { struct channel *channel = (struct channel *)handle; - HRESULT hr = S_OK; + WS_ASYNC_CONTEXT ctx_local; + struct async async; + HRESULT hr; TRACE( "%p %p %p\n", handle, ctx, error ); if (error) FIXME( "ignoring error parameter\n" ); - if (ctx) FIXME( "ignoring ctx parameter\n" ); if (!channel) return E_INVALIDARG; @@ -916,7 +946,13 @@ HRESULT WINAPI WsCloseChannel( WS_CHANNEL *handle, const WS_ASYNC_CONTEXT *ctx, return E_INVALIDARG; } - close_channel( channel ); + if (!ctx) async_init( &async, &ctx_local ); + hr = queue_close_channel( channel, ctx ? ctx : &ctx_local ); + if (!ctx) + { + if (hr == WS_S_ASYNC) hr = async_wait( &async ); + CloseHandle( async.done ); + } LeaveCriticalSection( &channel->cs ); TRACE( "returning %08x\n", hr );
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
77
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
Results per page:
10
25
50
100
200