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
March 2017
----- 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
717 discussions
Start a n
N
ew thread
Józef Kucia : wined3d: Exit early in shader_glsl_init_transform_feedback() if stream output is disabled.
by Alexandre Julliard
29 Mar '17
29 Mar '17
Module: wine Branch: master Commit: d58e44bfeb9a7125f62646e7426292707597d770 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d58e44bfeb9a7125f62646e74…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Wed Mar 29 15:11:06 2017 +0200 wined3d: Exit early in shader_glsl_init_transform_feedback() if stream output is disabled. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/glsl_shader.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 0eccaaa..b3cd500 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -840,6 +840,9 @@ static void shader_glsl_init_transform_feedback(const struct wined3d_context *co const char **varyings; char *strings; + if (!so_desc->element_count) + return; + if (!gl_info->supported[ARB_TRANSFORM_FEEDBACK3]) { FIXME("ARB_transform_feedback3 not supported by OpenGL implementation.\n");
1
0
0
0
Nikolay Sivov : comctl32/tests: Fully initialize message tests data.
by Alexandre Julliard
29 Mar '17
29 Mar '17
Module: wine Branch: master Commit: 1ec91f592e789248830f1eaeb4022a5dd9d2dd28 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1ec91f592e789248830f1eaeb…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Mar 29 11:11:39 2017 +0300 comctl32/tests: Fully initialize message tests data. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tests/button.c | 4 ++-- dlls/comctl32/tests/datetime.c | 3 +-- dlls/comctl32/tests/listview.c | 5 ++--- dlls/comctl32/tests/monthcal.c | 3 +-- dlls/comctl32/tests/pager.c | 3 +-- dlls/comctl32/tests/propsheet.c | 2 +- dlls/comctl32/tests/syslink.c | 3 +-- dlls/comctl32/tests/tab.c | 6 ++---- dlls/comctl32/tests/trackbar.c | 3 +-- dlls/comctl32/tests/treeview.c | 3 +-- dlls/comctl32/tests/updown.c | 7 +++---- 11 files changed, 16 insertions(+), 26 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=1ec91f592e789248830f1…
1
0
0
0
Jacek Caban : ntdll/tests: Added tests of partial reads and reads with invalid wait handle.
by Alexandre Julliard
29 Mar '17
29 Mar '17
Module: wine Branch: master Commit: e024094b75df417c9943a154c378d90bcf650f28 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e024094b75df417c9943a154c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Mar 29 14:05:47 2017 +0200 ntdll/tests: Added tests of partial reads and reads with invalid wait handle. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/pipe.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index cfff0e5..e242cb4 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -840,6 +840,43 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type) SleepEx( 1, TRUE ); /* alertable sleep */ ok( apc_count == 1, "apc not called\n" ); + /* now partial read with data ready */ + apc_count = 0; + U(iosb).Status = 0xdeadbabe; + iosb.Information = 0xdeadbeef; + ResetEvent( event ); + ret = WriteFile( write, buffer, 2, &written, NULL ); + ok(ret && written == 2, "WriteFile error %d\n", GetLastError()); + status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL ); + if (pipe_type & PIPE_READMODE_MESSAGE) + { + ok( status == STATUS_BUFFER_OVERFLOW, "wrong status %x\n", status ); + ok( U(iosb).Status == STATUS_BUFFER_OVERFLOW, "wrong status %x\n", U(iosb).Status ); + } + else + { + ok( status == STATUS_SUCCESS, "wrong status %x\n", status ); + ok( U(iosb).Status == 0, "wrong status %x\n", U(iosb).Status ); + } + ok( iosb.Information == 1, "wrong info %lu\n", iosb.Information ); + ok( is_signaled( event ), "event is not signaled\n" ); + ok( !apc_count, "apc was called\n" ); + SleepEx( 1, FALSE ); /* non-alertable sleep */ + ok( !apc_count, "apc was called\n" ); + SleepEx( 1, TRUE ); /* alertable sleep */ + ok( apc_count == 1, "apc not called\n" ); + apc_count = 0; + status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL ); + ok( status == STATUS_SUCCESS, "wrong status %x\n", status ); + ok( U(iosb).Status == 0, "wrong status %x\n", U(iosb).Status ); + ok( iosb.Information == 1, "wrong info %lu\n", iosb.Information ); + ok( is_signaled( event ), "event is not signaled\n" ); + ok( !apc_count, "apc was called\n" ); + SleepEx( 1, FALSE ); /* non-alertable sleep */ + ok( !apc_count, "apc was called\n" ); + SleepEx( 1, TRUE ); /* alertable sleep */ + ok( apc_count == 1, "apc not called\n" ); + /* try read with no data */ apc_count = 0; U(iosb).Status = 0xdeadbabe; @@ -877,6 +914,19 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type) ok( !apc_count, "apc was called\n" ); CloseHandle( read ); + /* read from disconnected pipe, with invalid event handle */ + apc_count = 0; + U(iosb).Status = 0xdeadbabe; + iosb.Information = 0xdeadbeef; + status = NtReadFile( read, (HANDLE)0xdeadbeef, apc, &apc_count, &iosb, buffer, 1, NULL, NULL ); + ok( status == STATUS_INVALID_HANDLE, "wrong status %x\n", status ); + ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status ); + ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information ); + ok( !apc_count, "apc was called\n" ); + SleepEx( 1, TRUE ); /* alertable sleep */ + ok( !apc_count, "apc was called\n" ); + CloseHandle( read ); + /* read from closed handle */ apc_count = 0; U(iosb).Status = 0xdeadbabe;
1
0
0
0
Jacek Caban : ntdll/tests: Run read tests in all modes and directions.
by Alexandre Julliard
29 Mar '17
29 Mar '17
Module: wine Branch: master Commit: 0d6b783c8045e63b9e801366589c9cf77c5c8bf8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d6b783c8045e63b9e8013665…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Mar 29 14:05:37 2017 +0200 ntdll/tests: Run read tests in all modes and directions. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/pipe.c | 57 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 13 deletions(-) diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index 2ed695d..cfff0e5 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -726,19 +726,39 @@ static void WINAPI apc( void *arg, IO_STATUS_BLOCK *iosb, ULONG reserved ) #define PIPENAME "\\\\.\\pipe\\ntdll_tests_pipe.c" -static BOOL create_pipe_pair( HANDLE *read, HANDLE *write, ULONG flags, ULONG size ) +static BOOL create_pipe_pair( HANDLE *read, HANDLE *write, ULONG flags, ULONG type, ULONG size ) { - *read = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_INBOUND | flags, PIPE_TYPE_BYTE | PIPE_WAIT, - 1, size, size, NMPWAIT_USE_DEFAULT_WAIT, NULL); - ok(*read != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n"); + const BOOL server_reader = flags & PIPE_ACCESS_INBOUND; + HANDLE client, server; - *write = CreateFileA(PIPENAME, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - ok(*write != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError()); + server = CreateNamedPipeA(PIPENAME, flags, PIPE_WAIT | type, + 1, size, size, NMPWAIT_USE_DEFAULT_WAIT, NULL); + ok(server != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n"); + client = CreateFileA(PIPENAME, server_reader ? GENERIC_WRITE : GENERIC_READ | FILE_WRITE_ATTRIBUTES, 0, + NULL, OPEN_EXISTING, flags & FILE_FLAG_OVERLAPPED, 0); + ok(client != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError()); + + if(server_reader) + { + *read = server; + *write = client; + } + else + { + if(type & PIPE_READMODE_MESSAGE) + { + DWORD read_mode = PIPE_READMODE_MESSAGE; + ok(SetNamedPipeHandleState(client, &read_mode, NULL, NULL), "Change mode\n"); + } + + *read = client; + *write = server; + } return TRUE; } -static void test_pipe_read(void) +static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type) { IO_STATUS_BLOCK iosb, iosb2; HANDLE handle, read, write; @@ -749,7 +769,7 @@ static void test_pipe_read(void) BOOL ret; NTSTATUS status; - if (!create_pipe_pair( &read, &write, FILE_FLAG_OVERLAPPED, 4096 )) return; + if (!create_pipe_pair( &read, &write, FILE_FLAG_OVERLAPPED | pipe_flags, pipe_type, 4096 )) return; /* try read with no data */ U(iosb).Status = 0xdeadbabe; @@ -872,7 +892,7 @@ static void test_pipe_read(void) ok( !apc_count, "apc was called\n" ); /* disconnect while async read is in progress */ - if (!create_pipe_pair( &read, &write, FILE_FLAG_OVERLAPPED, 4096 )) return; + if (!create_pipe_pair( &read, &write, FILE_FLAG_OVERLAPPED | pipe_flags, pipe_type, 4096 )) return; apc_count = 0; U(iosb).Status = 0xdeadbabe; iosb.Information = 0xdeadbeef; @@ -884,6 +904,7 @@ static void test_pipe_read(void) ok( !apc_count, "apc was called\n" ); CloseHandle( write ); Sleep(1); /* FIXME: needed for wine to run the i/o apc */ + todo_wine_if(!(pipe_type & PIPE_TYPE_MESSAGE) && (pipe_flags & PIPE_ACCESS_OUTBOUND)) ok( U(iosb).Status == STATUS_PIPE_BROKEN, "wrong status %x\n", U(iosb).Status ); ok( iosb.Information == 0, "wrong info %lu\n", iosb.Information ); ok( is_signaled( event ), "event is not signaled\n" ); @@ -892,7 +913,7 @@ static void test_pipe_read(void) ok( apc_count == 1, "apc was not called\n" ); CloseHandle( read ); - if (!create_pipe_pair( &read, &write, FILE_FLAG_OVERLAPPED, 4096 )) return; + if (!create_pipe_pair( &read, &write, FILE_FLAG_OVERLAPPED | pipe_flags, pipe_type, 4096 )) return; ret = DuplicateHandle(GetCurrentProcess(), read, GetCurrentProcess(), &handle, 0, TRUE, DUPLICATE_SAME_ACCESS); ok(ret, "Failed to duplicate handle: %d\n", GetLastError()); @@ -947,7 +968,7 @@ static void test_pipe_read(void) if (pNtCancelIoFileEx) { /* Basic Cancel Ex */ - if (!create_pipe_pair( &read, &write, FILE_FLAG_OVERLAPPED, 4096 )) return; + if (!create_pipe_pair( &read, &write, FILE_FLAG_OVERLAPPED | pipe_flags, pipe_type, 4096 )) return; apc_count = 0; U(iosb).Status = 0xdeadbabe; @@ -1030,6 +1051,16 @@ START_TEST(pipe) trace("starting cancelio tests\n"); test_cancelio(); - trace("starting read tests\n"); - test_pipe_read(); + trace("starting byte read in byte mode client -> server\n"); + read_pipe_test(PIPE_ACCESS_INBOUND, PIPE_TYPE_BYTE); + trace("starting byte read in message mode client -> server\n"); + read_pipe_test(PIPE_ACCESS_INBOUND, PIPE_TYPE_MESSAGE); + trace("starting message read in message mode client -> server\n"); + read_pipe_test(PIPE_ACCESS_INBOUND, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE); + trace("starting byte read in byte mode server -> client\n"); + read_pipe_test(PIPE_ACCESS_OUTBOUND, PIPE_TYPE_BYTE); + trace("starting byte read in message mode server -> client\n"); + read_pipe_test(PIPE_ACCESS_OUTBOUND, PIPE_TYPE_MESSAGE); + trace("starting message read in message mode server -> client\n"); + read_pipe_test(PIPE_ACCESS_OUTBOUND, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE); }
1
0
0
0
Huw Davies : user32: Scale the scroll arrows with the menu's font size.
by Alexandre Julliard
29 Mar '17
29 Mar '17
Module: wine Branch: master Commit: 6abb7db763ef1d343c00a1a36b2c439421ea9ef6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6abb7db763ef1d343c00a1a36…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Mar 29 10:42:06 2017 +0100 user32: Scale the scroll arrows with the menu's font size. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/menu.c | 147 +++++++++++++++++++++++++---------------------------- 1 file changed, 69 insertions(+), 78 deletions(-) diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index 58bfe68..79bef64 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -362,56 +362,9 @@ static HBITMAP get_arrow_bitmap(void) return arrow_bitmap; } -/*********************************************************************** - * get_down_arrow_bitmap - */ -static HBITMAP get_down_arrow_bitmap(void) -{ - static HBITMAP arrow_bitmap; - - if (!arrow_bitmap) arrow_bitmap = LoadBitmapW(0, MAKEINTRESOURCEW(OBM_DNARROW)); - return arrow_bitmap; -} - -/*********************************************************************** - * get_down_arrow_inactive_bitmap - */ -static HBITMAP get_down_arrow_inactive_bitmap(void) -{ - static HBITMAP arrow_bitmap; - - if (!arrow_bitmap) arrow_bitmap = LoadBitmapW(0, MAKEINTRESOURCEW(OBM_DNARROWI)); - return arrow_bitmap; -} - -/*********************************************************************** - * get_up_arrow_bitmap - */ -static HBITMAP get_up_arrow_bitmap(void) -{ - static HBITMAP arrow_bitmap; - - if (!arrow_bitmap) arrow_bitmap = LoadBitmapW(0, MAKEINTRESOURCEW(OBM_UPARROW)); - return arrow_bitmap; -} - -/*********************************************************************** - * get_up_arrow_inactive_bitmap - */ -static HBITMAP get_up_arrow_inactive_bitmap(void) -{ - static HBITMAP arrow_bitmap; - - if (!arrow_bitmap) arrow_bitmap = LoadBitmapW(0, MAKEINTRESOURCEW(OBM_UPARROWI)); - return arrow_bitmap; -} - static inline UINT get_scroll_arrow_height(const POPUPMENU *menu) { - BITMAP bmp; - - GetObjectW(get_up_arrow_bitmap(), sizeof(bmp), &bmp); - return bmp.bmHeight; + return menucharsize.cy + 4; } /*********************************************************************** @@ -1227,6 +1180,8 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop ) * of the bitmaps */ if( !textandbmp) lppop->textOffset = 0; + lppop->nTotalHeight = lppop->items_rect.bottom; + /* space for the border */ OffsetRect(&lppop->items_rect, MENU_MARGIN, MENU_MARGIN); lppop->Height = lppop->items_rect.bottom + MENU_MARGIN; @@ -1234,12 +1189,12 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop ) /* Adjust popup height if it exceeds maximum */ maxHeight = MENU_GetMaxPopupHeight(lppop); - lppop->nTotalHeight = lppop->Height - MENU_MARGIN; if (lppop->Height >= maxHeight) { lppop->Height = maxHeight; - lppop->items_rect.top += get_scroll_arrow_height(lppop); - lppop->items_rect.bottom = lppop->Height - MENU_MARGIN - get_scroll_arrow_height(lppop); + /* When the scroll arrows are present, don't add the top/bottom margin as well */ + lppop->items_rect.top += get_scroll_arrow_height(lppop) - MENU_MARGIN; + lppop->items_rect.bottom = lppop->Height - get_scroll_arrow_height(lppop); lppop->bScrolling = TRUE; } else @@ -1326,6 +1281,42 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect, } } +static void draw_scroll_arrow(HDC hdc, int x, int top, int height, BOOL up, BOOL enabled) +{ + RECT rect, light_rect; + HBRUSH brush = GetSysColorBrush( enabled ? COLOR_BTNTEXT : COLOR_BTNSHADOW ); + HBRUSH light = GetSysColorBrush( COLOR_3DLIGHT ); + + if (!up) + { + top = top + height; + if (!enabled) + { + SetRect( &rect, x + 1, top, x + 2, top + 1); + FillRect( hdc, &rect, light ); + } + top--; + } + + SetRect( &rect, x, top, x + 1, top + 1); + while (height--) + { + FillRect( hdc, &rect, brush ); + if (!enabled && !up && height) + { + SetRect( &light_rect, rect.right, rect.top, rect.right + 2, rect.bottom ); + FillRect( hdc, &light_rect, light ); + } + InflateRect( &rect, 1, 0 ); + OffsetRect( &rect, 0, up ? 1 : -1 ); + } + + if (!enabled && up) + { + rect.left += 2; + FillRect( hdc, &rect, light ); + } +} /*********************************************************************** * MENU_DrawScrollArrows @@ -1333,33 +1324,16 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect, * Draw scroll arrows. */ static void -MENU_DrawScrollArrows(const POPUPMENU *lppop, HDC hdc) +MENU_DrawScrollArrows(const POPUPMENU *menu, HDC hdc) { - HDC hdcMem = CreateCompatibleDC(hdc); - HBITMAP hOrigBitmap; - UINT arrow_bitmap_width, arrow_bitmap_height; - BITMAP bmp; + UINT full_height = get_scroll_arrow_height( menu ); + UINT arrow_height = full_height / 3; + BOOL at_end = menu->nScrollPos + menu->items_rect.bottom - menu->items_rect.top == menu->nTotalHeight; - GetObjectW(get_down_arrow_bitmap(), sizeof(bmp), &bmp); - arrow_bitmap_width = bmp.bmWidth; - arrow_bitmap_height = bmp.bmHeight; - - - if (lppop->nScrollPos) - hOrigBitmap = SelectObject(hdcMem, get_up_arrow_bitmap()); - else - hOrigBitmap = SelectObject(hdcMem, get_up_arrow_inactive_bitmap()); - BitBlt(hdc, (lppop->Width - arrow_bitmap_width) / 2, 0, - arrow_bitmap_width, arrow_bitmap_height, hdcMem, 0, 0, SRCCOPY); - if (lppop->nScrollPos < lppop->nTotalHeight - (MENU_GetMaxPopupHeight(lppop) - 2 * arrow_bitmap_height)) - SelectObject(hdcMem, get_down_arrow_bitmap()); - else - SelectObject(hdcMem, get_down_arrow_inactive_bitmap()); - BitBlt(hdc, (lppop->Width - arrow_bitmap_width) / 2, - lppop->Height - arrow_bitmap_height, - arrow_bitmap_width, arrow_bitmap_height, hdcMem, 0, 0, SRCCOPY); - SelectObject(hdcMem, hOrigBitmap); - DeleteDC(hdcMem); + draw_scroll_arrow( hdc, menu->Width / 3, arrow_height, arrow_height, + TRUE, menu->nScrollPos != 0); + draw_scroll_arrow( hdc, menu->Width / 3, menu->Height - 2 * arrow_height, arrow_height, + FALSE, !at_end ); } @@ -1957,13 +1931,30 @@ MENU_EnsureMenuItemVisible(LPPOPUPMENU lppop, UINT wIndex, HDC hdc) { lppop->nScrollPos = item->rect.bottom - scroll_height; ScrollWindow(lppop->hWnd, 0, nOldPos - lppop->nScrollPos, rc, rc); - MENU_DrawScrollArrows(lppop, hdc); } else if (item->rect.top < lppop->nScrollPos) { lppop->nScrollPos = item->rect.top; ScrollWindow(lppop->hWnd, 0, nOldPos - lppop->nScrollPos, rc, rc); - MENU_DrawScrollArrows(lppop, hdc); + } + + /* Invalidate the scroll arrows if necessary */ + if (nOldPos != lppop->nScrollPos) + { + RECT arrow_rect = lppop->items_rect; + if (nOldPos == 0 || lppop->nScrollPos == 0) + { + arrow_rect.top = 0; + arrow_rect.bottom = lppop->items_rect.top; + InvalidateRect(lppop->hWnd, &arrow_rect, FALSE); + } + if (nOldPos + scroll_height == lppop->nTotalHeight || + lppop->nScrollPos + scroll_height == lppop->nTotalHeight) + { + arrow_rect.top = lppop->items_rect.bottom; + arrow_rect.bottom = lppop->Height; + InvalidateRect(lppop->hWnd, &arrow_rect, FALSE); + } } } }
1
0
0
0
Huw Davies : user32: Don' t fill the background when drawing the scroll arrows.
by Alexandre Julliard
29 Mar '17
29 Mar '17
Module: wine Branch: master Commit: bd785a5ac0de154099dc9be959d23b8500132c84 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bd785a5ac0de154099dc9be95…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Mar 29 10:42:05 2017 +0100 user32: Don't fill the background when drawing the scroll arrows. This is done, in the correct colour, in MENU_DrawPopupMenu(). Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/menu.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index 28222dc..58bfe68 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -1339,7 +1339,6 @@ MENU_DrawScrollArrows(const POPUPMENU *lppop, HDC hdc) HBITMAP hOrigBitmap; UINT arrow_bitmap_width, arrow_bitmap_height; BITMAP bmp; - RECT rect; GetObjectW(get_down_arrow_bitmap(), sizeof(bmp), &bmp); arrow_bitmap_width = bmp.bmWidth; @@ -1350,13 +1349,8 @@ MENU_DrawScrollArrows(const POPUPMENU *lppop, HDC hdc) hOrigBitmap = SelectObject(hdcMem, get_up_arrow_bitmap()); else hOrigBitmap = SelectObject(hdcMem, get_up_arrow_inactive_bitmap()); - SetRect(&rect, 0, 0, lppop->Width, arrow_bitmap_height); - FillRect(hdc, &rect, GetSysColorBrush(COLOR_MENU)); BitBlt(hdc, (lppop->Width - arrow_bitmap_width) / 2, 0, arrow_bitmap_width, arrow_bitmap_height, hdcMem, 0, 0, SRCCOPY); - rect.top = lppop->Height - arrow_bitmap_height; - rect.bottom = lppop->Height; - FillRect(hdc, &rect, GetSysColorBrush(COLOR_MENU)); if (lppop->nScrollPos < lppop->nTotalHeight - (MENU_GetMaxPopupHeight(lppop) - 2 * arrow_bitmap_height)) SelectObject(hdcMem, get_down_arrow_bitmap()); else
1
0
0
0
Huw Davies : user32: Clip painting to the items_rect.
by Alexandre Julliard
29 Mar '17
29 Mar '17
Module: wine Branch: master Commit: 79bdeceab44fdea31dd67c03baf13e786001f96d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79bdeceab44fdea31dd67c03b…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Mar 29 10:42:04 2017 +0100 user32: Clip painting to the items_rect. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/menu.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index da0e54b..28222dc 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -1402,6 +1402,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc, UINT arrow_bitmap_width = 0, arrow_bitmap_height = 0; POPUPMENU *menu = MENU_GetMenu(hmenu); RECT bmprc; + HRGN old_clip = NULL, clip; debug_print_menuitem("MENU_DrawMenuItem: ", lpitem, ""); @@ -1450,6 +1451,16 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc, rect = lpitem->rect; MENU_AdjustMenuItemRect(MENU_GetMenu(hmenu), &rect); + old_clip = CreateRectRgn( 0, 0, 0, 0 ); + if (GetClipRgn( hdc, old_clip ) <= 0) + { + DeleteObject( old_clip ); + old_clip = NULL; + } + clip = CreateRectRgnIndirect( &menu->items_rect ); + ExtSelectClipRgn( hdc, clip, RGN_AND ); + DeleteObject( clip ); + if (lpitem->fType & MF_OWNERDRAW) { /* @@ -1489,10 +1500,10 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc, if (lpitem->fType & MF_POPUP) draw_popup_arrow( hdc, rect, arrow_bitmap_width, arrow_bitmap_height); - return; + goto done; } - if (menuBar && (lpitem->fType & MF_SEPARATOR)) return; + if (menuBar && (lpitem->fType & MF_SEPARATOR)) goto done; if (lpitem->fState & MF_HILITE) { @@ -1554,7 +1565,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc, } else DrawEdge (hdc, &rc, EDGE_ETCHED, BF_TOP); - return; + goto done; } /* helper lines for debugging */ @@ -1736,6 +1747,10 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc, if (hfontOld) SelectObject (hdc, hfontOld); } + +done: + ExtSelectClipRgn( hdc, old_clip, RGN_COPY ); + if (old_clip) DeleteObject( old_clip ); }
1
0
0
0
Huw Davies : user32: Store the item rects as relative to the items_rect.
by Alexandre Julliard
29 Mar '17
29 Mar '17
Module: wine Branch: master Commit: 1bdd12f493f3eee56033f5d730a57b6122ed2854 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1bdd12f493f3eee56033f5d73…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Mar 29 10:42:03 2017 +0100 user32: Store the item rects as relative to the items_rect. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/menu.c | 82 ++++++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 42 deletions(-) diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index dafa996..da0e54b 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -76,7 +76,8 @@ typedef struct { LPWSTR dwTypeData; /* depends on fMask */ HBITMAP hbmpItem; /* bitmap */ /* ----------- Wine stuff ----------- */ - RECT rect; /* Item area (relative to menu window) */ + RECT rect; /* Item area (relative to the items_rect). + * See MENU_AdjustMenuItemRect(). */ UINT xTab; /* X position of text after Tab */ SIZE bmpsize; /* size needed for the HBMMENU_CALLBACK * bitmap */ @@ -706,13 +707,9 @@ static void MENU_FreeItemData( MENUITEM* item ) static void MENU_AdjustMenuItemRect(const POPUPMENU *menu, LPRECT rect) { - if (menu->bScrolling) - { - UINT arrow_height; + INT scroll_offset = menu->bScrolling ? menu->nScrollPos : 0; - arrow_height = get_scroll_arrow_height( menu ); - OffsetRect( rect, 0, arrow_height - menu->nScrollPos ); - } + OffsetRect( rect, menu->items_rect.left, menu->items_rect.top - scroll_offset ); } @@ -1174,7 +1171,7 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop ) int orgX, orgY, maxTab, maxTabWidth, maxHeight; lppop->Width = lppop->Height = 0; - SetRect(&lppop->items_rect, MENU_MARGIN, MENU_MARGIN, MENU_MARGIN, MENU_MARGIN); + SetRectEmpty(&lppop->items_rect); if (lppop->nItems == 0) return; hdc = GetDC( 0 ); @@ -1230,7 +1227,8 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop ) * of the bitmaps */ if( !textandbmp) lppop->textOffset = 0; - /* space for 3d border */ + /* space for the border */ + OffsetRect(&lppop->items_rect, MENU_MARGIN, MENU_MARGIN); lppop->Height = lppop->items_rect.bottom + MENU_MARGIN; lppop->Width = lppop->items_rect.right + MENU_MARGIN; @@ -1267,22 +1265,22 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect, { MENUITEM *lpitem; UINT start, i, helpPos; - int orgX, orgY, maxY; + int orgX, orgY; if ((lprect == NULL) || (lppop == NULL)) return; if (lppop->nItems == 0) return; TRACE("lprect %p %s\n", lprect, wine_dbgstr_rect( lprect)); - lppop->Width = lprect->right - lprect->left; - lppop->Height = 0; - maxY = lprect->top+1; + /* Start with a 1 pixel top border. + This corresponds to the difference between SM_CYMENU and SM_CYMENUSIZE. */ + SetRect(&lppop->items_rect, 0, 0, lprect->right - lprect->left, 1); start = 0; helpPos = ~0U; lppop->textOffset = 0; while (start < lppop->nItems) { lpitem = &lppop->items[start]; - orgX = lprect->left; - orgY = maxY; + orgX = lppop->items_rect.left; + orgY = lppop->items_rect.bottom; /* Parse items until line break or end of menu */ for (i = start; i < lppop->nItems; i++, lpitem++) @@ -1295,29 +1293,30 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect, debug_print_menuitem (" item: ", lpitem, ""); MENU_CalcItemSize( hdc, lpitem, hwndOwner, orgX, orgY, TRUE, lppop ); - if (lpitem->rect.right > lprect->right) + if (lpitem->rect.right > lppop->items_rect.right) { if (i != start) break; - else lpitem->rect.right = lprect->right; + else lpitem->rect.right = lppop->items_rect.right; } - maxY = max( maxY, lpitem->rect.bottom ); + lppop->items_rect.bottom = max( lppop->items_rect.bottom, lpitem->rect.bottom ); orgX = lpitem->rect.right; } /* Finish the line (set all items to the largest height found) */ - while (start < i) lppop->items[start++].rect.bottom = maxY; + while (start < i) lppop->items[start++].rect.bottom = lppop->items_rect.bottom; } - lprect->bottom = maxY; - lppop->Height = lprect->bottom - lprect->top; - lppop->items_rect = *lprect; + OffsetRect(&lppop->items_rect, lprect->left, lprect->top); + lppop->Width = lppop->items_rect.right - lppop->items_rect.left; + lppop->Height = lppop->items_rect.bottom - lppop->items_rect.top; + lprect->bottom = lppop->items_rect.bottom; /* Flush right all items between the MF_RIGHTJUSTIFY and */ /* the last item (if several lines, only move the last line) */ if (helpPos == ~0U) return; lpitem = &lppop->items[lppop->nItems-1]; orgY = lpitem->rect.top; - orgX = lprect->right; + orgX = lprect->right - lprect->left; for (i = lppop->nItems - 1; i >= helpPos; i--, lpitem--) { if (lpitem->rect.top != orgY) break; /* Other line */ if (lpitem->rect.right >= orgX) break; /* Too far right already */ @@ -1945,17 +1944,15 @@ MENU_EnsureMenuItemVisible(LPPOPUPMENU lppop, UINT wIndex, HDC hdc) const RECT *rc = &lppop->items_rect; UINT scroll_height = rc->bottom - rc->top; - /* NB the item rects include the MENU_MARGIN offset (so the first rect has - top == MENU_TOP_MARGIN) */ - if (item->rect.bottom - MENU_MARGIN > lppop->nScrollPos + scroll_height) + if (item->rect.bottom > lppop->nScrollPos + scroll_height) { - lppop->nScrollPos = item->rect.bottom - MENU_MARGIN - scroll_height; + lppop->nScrollPos = item->rect.bottom - scroll_height; ScrollWindow(lppop->hWnd, 0, nOldPos - lppop->nScrollPos, rc, rc); MENU_DrawScrollArrows(lppop, hdc); } - else if (item->rect.top - MENU_MARGIN < lppop->nScrollPos) + else if (item->rect.top < lppop->nScrollPos) { - lppop->nScrollPos = item->rect.top - MENU_MARGIN; + lppop->nScrollPos = item->rect.top; ScrollWindow(lppop->hWnd, 0, nOldPos - lppop->nScrollPos, rc, rc); MENU_DrawScrollArrows(lppop, hdc); } @@ -2360,32 +2357,32 @@ static HMENU MENU_ShowSubPopup( HWND hwndOwner, HMENU hmenu, } else { + RECT item_rect = item->rect; + + MENU_AdjustMenuItemRect(menu, &item_rect); GetWindowRect( menu->hWnd, &rect ); + if (menu->wFlags & MF_POPUP) { - RECT rc = item->rect; - - MENU_AdjustMenuItemRect(menu, &rc); - /* The first item in the popup menu has to be at the same y position as the focused menu item */ if (wFlags & TPM_LAYOUTRTL) rect.left += GetSystemMetrics(SM_CXBORDER); else - rect.left += rc.right - GetSystemMetrics(SM_CXBORDER); - rect.top += rc.top - MENU_MARGIN; - rect.right = rc.left - rc.right + GetSystemMetrics(SM_CXBORDER); - rect.bottom = rc.top - rc.bottom - 2 * MENU_MARGIN; + rect.left += item_rect.right - GetSystemMetrics(SM_CXBORDER); + rect.top += item_rect.top - MENU_MARGIN; + rect.right = item_rect.left - item_rect.right + GetSystemMetrics(SM_CXBORDER); + rect.bottom = item_rect.top - item_rect.bottom - 2 * MENU_MARGIN; } else { if (wFlags & TPM_LAYOUTRTL) - rect.left = rect.right - item->rect.left; + rect.left = rect.right - item_rect.left; else - rect.left += item->rect.left; - rect.top += item->rect.bottom; - rect.right = item->rect.right - item->rect.left; - rect.bottom = item->rect.bottom - item->rect.top; + rect.left += item_rect.left; + rect.top += item_rect.bottom; + rect.right = item_rect.right - item_rect.left; + rect.bottom = item_rect.bottom - item_rect.top; } } @@ -5118,6 +5115,7 @@ BOOL WINAPI GetMenuItemRect(HWND hwnd, HMENU hMenu, UINT uItem, RECT *rect) *rect = item->rect; + OffsetRect(rect, menu->items_rect.left, menu->items_rect.top); MapWindowPoints(hwnd, 0, (POINT *)rect, 2); return TRUE;
1
0
0
0
Hans Leidekker : webservices: Implement WsResetMessage.
by Alexandre Julliard
29 Mar '17
29 Mar '17
Module: wine Branch: master Commit: 6f3afc1a1ca24edf51ed70dc1a7d1ec1586127d9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6f3afc1a1ca24edf51ed70dc1…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 29 11:14:49 2017 +0200 webservices: Implement WsResetMessage. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/msg.c | 63 ++++++++++++++++++++++++++++++++++++--- dlls/webservices/tests/msg.c | 38 +++++++++++++++++++++++ dlls/webservices/webservices.spec | 2 +- include/webservices.h | 1 + 4 files changed, 99 insertions(+), 5 deletions(-) diff --git a/dlls/webservices/msg.c b/dlls/webservices/msg.c index ae021cc..9e94d7c 100644 --- a/dlls/webservices/msg.c +++ b/dlls/webservices/msg.c @@ -123,15 +123,44 @@ static void free_header( struct header *header ) heap_free( header ); } -static void free_msg( struct msg *msg ) +static void reset_msg( struct msg *msg ) { ULONG i; - WsFreeWriter( msg->writer ); - WsFreeHeap( msg->heap ); + msg->state = WS_MESSAGE_STATE_EMPTY; + msg->init = 0; + UuidCreate( &msg->id ); + msg->is_addressed = FALSE; heap_free( msg->addr.chars ); + msg->addr.chars = NULL; + msg->addr.length = 0; + heap_free( msg->action.chars ); - for (i = 0; i < msg->header_count; i++) free_header( msg->header[i] ); + msg->action.chars = NULL; + msg->action.length = 0; + + WsResetHeap( msg->heap, NULL ); + msg->buf = NULL; /* allocated on msg->heap */ + msg->writer_body = NULL; /* owned by caller */ + msg->reader_body = NULL; /* owned by caller */ + + for (i = 0; i < msg->header_count; i++) + { + free_header( msg->header[i] ); + msg->header[i] = NULL; + } + msg->header_count = 0; + + memset( &msg->ctx_send, 0, sizeof(msg->ctx_send) ); + memset( &msg->ctx_receive, 0, sizeof(msg->ctx_receive) ); +} + +static void free_msg( struct msg *msg ) +{ + reset_msg( msg ); + + WsFreeWriter( msg->writer ); + WsFreeHeap( msg->heap ); heap_free( msg->header ); msg->cs.DebugInfo->Spare[0] = 0; @@ -246,6 +275,32 @@ void WINAPI WsFreeMessage( WS_MESSAGE *handle ) } /************************************************************************** + * WsResetMessage [webservices.@] + */ +HRESULT WINAPI WsResetMessage( WS_MESSAGE *handle, WS_ERROR *error ) +{ + struct msg *msg = (struct msg *)handle; + + TRACE( "%p %p\n", handle, error ); + if (error) FIXME( "ignoring error parameter\n" ); + + if (!msg) return E_INVALIDARG; + + EnterCriticalSection( &msg->cs ); + + if (msg->magic != MSG_MAGIC) + { + LeaveCriticalSection( &msg->cs ); + return E_INVALIDARG; + } + + reset_msg( msg ); + + LeaveCriticalSection( &msg->cs ); + return S_OK; +} + +/************************************************************************** * WsGetMessageProperty [webservices.@] */ HRESULT WINAPI WsGetMessageProperty( WS_MESSAGE *handle, WS_MESSAGE_PROPERTY_ID id, void *buf, diff --git a/dlls/webservices/tests/msg.c b/dlls/webservices/tests/msg.c index b13a97e..f6a6ba1 100644 --- a/dlls/webservices/tests/msg.c +++ b/dlls/webservices/tests/msg.c @@ -1105,6 +1105,43 @@ static void test_WsReadBody(void) WsFreeHeap( heap ); } +static void test_WsResetMessage(void) +{ + WS_MESSAGE *msg; + WS_MESSAGE_STATE state; + WS_ENVELOPE_VERSION env_version; + WS_ADDRESSING_VERSION addr_version; + HRESULT hr; + + hr = WsCreateMessage( WS_ENVELOPE_VERSION_SOAP_1_1, WS_ADDRESSING_VERSION_0_9, NULL, 0, &msg, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + + hr = WsInitializeMessage( msg, WS_REQUEST_MESSAGE, NULL, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + + hr = WsResetMessage( msg, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + + state = 0xdeadbeef; + hr = WsGetMessageProperty( msg, WS_MESSAGE_PROPERTY_STATE, &state, sizeof(state), NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( state == WS_MESSAGE_STATE_EMPTY, "got %u\n", state ); + + env_version = 0xdeadbeef; + hr = WsGetMessageProperty( msg, WS_MESSAGE_PROPERTY_ENVELOPE_VERSION, &env_version, + sizeof(env_version), NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( env_version == WS_ENVELOPE_VERSION_SOAP_1_1, "got %u\n", env_version ); + + addr_version = 0xdeadbeef; + hr = WsGetMessageProperty( msg, WS_MESSAGE_PROPERTY_ADDRESSING_VERSION, &addr_version, + sizeof(addr_version), NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( addr_version == WS_ADDRESSING_VERSION_0_9, "got %u\n", addr_version ); + + WsFreeMessage( msg ); +} + START_TEST(msg) { test_WsCreateMessage(); @@ -1123,4 +1160,5 @@ START_TEST(msg) test_WsReadEnvelopeStart(); test_WsReadEnvelopeEnd(); test_WsReadBody(); + test_WsResetMessage(); } diff --git a/dlls/webservices/webservices.spec b/dlls/webservices/webservices.spec index 074f612..fd4a831 100644 --- a/dlls/webservices/webservices.spec +++ b/dlls/webservices/webservices.spec @@ -137,7 +137,7 @@ @ stdcall WsResetError(ptr) @ stdcall WsResetHeap(ptr ptr) @ stub WsResetListener -@ stub WsResetMessage +@ stdcall WsResetMessage(ptr ptr) @ stub WsResetMetadata @ stub WsResetServiceHost @ stub WsResetServiceProxy diff --git a/include/webservices.h b/include/webservices.h index 3274082..532275b 100644 --- a/include/webservices.h +++ b/include/webservices.h @@ -1488,6 +1488,7 @@ HRESULT WINAPI WsRemoveHeader(WS_MESSAGE*, WS_HEADER_TYPE, WS_ERROR*); HRESULT WINAPI WsRemoveMappedHeader(WS_MESSAGE*, const WS_XML_STRING*, WS_ERROR*); HRESULT WINAPI WsRemoveNode(const WS_XML_NODE_POSITION*, WS_ERROR*); HRESULT WINAPI WsResetChannel(WS_CHANNEL*, WS_ERROR*); +HRESULT WINAPI WsResetMessage(WS_MESSAGE*, WS_ERROR*); HRESULT WINAPI WsResetError(WS_ERROR*); HRESULT WINAPI WsResetHeap(WS_HEAP*, WS_ERROR*); HRESULT WINAPI WsResetMessage(WS_MESSAGE*, WS_ERROR*);
1
0
0
0
Hans Leidekker : webservices: Don' t allocate an XML buffer until it is needed.
by Alexandre Julliard
29 Mar '17
29 Mar '17
Module: wine Branch: master Commit: 4f1c7dc19528708cdf5cc644b26f008397d338ba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4f1c7dc19528708cdf5cc644b…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 29 11:14:48 2017 +0200 webservices: Don't allocate an XML buffer until it is needed. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/msg.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dlls/webservices/msg.c b/dlls/webservices/msg.c index d15ab85..ae021cc 100644 --- a/dlls/webservices/msg.c +++ b/dlls/webservices/msg.c @@ -171,11 +171,6 @@ static HRESULT create_msg( WS_ENVELOPE_VERSION env_version, WS_ADDRESSING_VERSIO free_msg( msg ); return hr; } - if ((hr = WsCreateXmlBuffer( msg->heap, NULL, 0, &msg->buf, NULL )) != S_OK) - { - free_msg( msg ); - return hr; - } UuidCreate( &msg->id ); msg->version_env = env_version;
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
72
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
Results per page:
10
25
50
100
200