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
October 2020
----- 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
796 discussions
Start a n
N
ew thread
Michael Stefaniuc : dpvoice: Use wide-char string literals.
by Alexandre Julliard
09 Oct '20
09 Oct '20
Module: wine Branch: master Commit: 9301a644ecf77140c6e660d7dfddc52faf0d9552 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9301a644ecf77140c6e660d7…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Thu Oct 8 23:28:00 2020 +0200 dpvoice: Use wide-char string literals. Simplify the calculation of the size of a WCHAR array too. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dpvoice/server.c | 3 +-- dlls/dpvoice/tests/voice.c | 9 ++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/dlls/dpvoice/server.c b/dlls/dpvoice/server.c index 714863f6b2..a476a2e585 100644 --- a/dlls/dpvoice/server.c +++ b/dlls/dpvoice/server.c @@ -43,8 +43,7 @@ HRESULT DPVOICE_GetCompressionTypes(DVCOMPRESSIONINFO *pData, DWORD *pdwDataSize { static const DVCOMPRESSIONINFO pcm_type = {80, {0x8de12fd4,0x7cb3,0x48ce,{0xa7,0xe8,0x9c,0x47,0xa2,0x2e,0x8a,0xc5}}, NULL, NULL, 0, 64000}; - static const WCHAR pcm_name[] = - {'M','S','-','P','C','M',' ','6','4',' ','k','b','i','t','/','s',0}; + static const WCHAR pcm_name[] = L"MS-PCM 64 kbit/s"; HRESULT ret; LPWSTR string_loc; diff --git a/dlls/dpvoice/tests/voice.c b/dlls/dpvoice/tests/voice.c index 2d77049a9b..4b44e1e108 100644 --- a/dlls/dpvoice/tests/voice.c +++ b/dlls/dpvoice/tests/voice.c @@ -37,8 +37,7 @@ static DWORD port = 8888; static HANDLE connected = NULL; static const GUID appguid = { 0xcd0c3d4b, 0xe15e, 0x4cf2, { 0x9e, 0xa8, 0x6e, 0x1d, 0x65, 0x48, 0xc5, 0xa6 } }; -static WCHAR sessionname[] = {'w','i','n','e','g','a','m','e','s','s','e','r','v','e','r',0}; -static WCHAR localhost[] = {'l','o','c','a','l','h','o','s','t',0}; +static WCHAR sessionname[] = L"winegamesserver"; static HRESULT WINAPI DirectPlayMessageHandler(void *lpvUserContext, DWORD dwMessageId, void *lpMessage) @@ -102,7 +101,7 @@ static BOOL test_init_dpvoice_server(void) hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP); ok(hr == S_OK, "SetSP with 0x%08x\n", hr); - hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, localhost, (lstrlenW(localhost)+1)*sizeof(WCHAR), + hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, L"localhost", sizeof(L"localhost"), DPNA_DATATYPE_STRING ); ok(hr == S_OK, "AddComponent(addr) with 0x%08x\n", hr); @@ -150,7 +149,7 @@ static BOOL test_init_dpvoice_server(void) static BOOL test_init_dpvoice_client(void) { HRESULT hr; - WCHAR player[] = {'w','i','n','e','u','s','e','r',0}; + WCHAR player[] = L"wineuser"; hr = CoCreateInstance(&CLSID_DirectPlayVoiceClient, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlayVoiceClient, (void **)&vclient); if(hr == S_OK) @@ -183,7 +182,7 @@ static BOOL test_init_dpvoice_client(void) hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP); ok(hr == S_OK, "SetSP with 0x%08x\n", hr); - hr = IDirectPlay8Address_AddComponent(hostaddr, DPNA_KEY_HOSTNAME, localhost, (lstrlenW(localhost)+1)*sizeof(WCHAR), + hr = IDirectPlay8Address_AddComponent(hostaddr, DPNA_KEY_HOSTNAME, L"localhost", sizeof(L"localhost"), DPNA_DATATYPE_STRING ); ok(hr == S_OK, "AddComponent(addr) with 0x%08x\n", hr);
1
0
0
0
Michael Stefaniuc : credui: Use wide-char string literals.
by Alexandre Julliard
09 Oct '20
09 Oct '20
Module: wine Branch: master Commit: 840afcbb4c53f44a3e5b746ae68e30aa8e82fd00 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=840afcbb4c53f44a3e5b746a…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Thu Oct 8 23:27:59 2020 +0200 credui: Use wide-char string literals. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/credui/credui_main.c | 9 +++------ dlls/credui/tests/credui.c | 30 ++++++++++-------------------- 2 files changed, 13 insertions(+), 26 deletions(-) diff --git a/dlls/credui/credui_main.c b/dlls/credui/credui_main.c index 93ccdc20de..f08d1406f9 100644 --- a/dlls/credui/credui_main.c +++ b/dlls/credui/credui_main.c @@ -868,9 +868,6 @@ ULONG SEC_ENTRY SspiPromptForCredentialsW( PCWSTR target, void *info, PSEC_WINNT_AUTH_IDENTITY_OPAQUE *output_id, BOOL *save, DWORD sspi_flags ) { - static const WCHAR basicW[] = {'B','a','s','i','c',0}; - static const WCHAR ntlmW[] = {'N','T','L','M',0}; - static const WCHAR negotiateW[] = {'N','e','g','o','t','i','a','t','e',0}; WCHAR username[CREDUI_MAX_USERNAME_LENGTH + 1] = {0}; WCHAR password[CREDUI_MAX_PASSWORD_LENGTH + 1] = {0}; DWORD len_username = ARRAY_SIZE(username); @@ -883,8 +880,8 @@ ULONG SEC_ENTRY SspiPromptForCredentialsW( PCWSTR target, void *info, error, debugstr_w(package), input_id, output_id, save, sspi_flags ); if (!target) return ERROR_INVALID_PARAMETER; - if (!package || (wcsicmp( package, basicW ) && wcsicmp( package, ntlmW ) && - wcsicmp( package, negotiateW ))) + if (!package || (wcsicmp( package, L"Basic" ) && wcsicmp( package, L"NTLM" ) && + wcsicmp( package, L"Negotiate" ))) { FIXME( "package %s not supported\n", debugstr_w(package) ); return ERROR_NO_SUCH_PACKAGE; @@ -923,7 +920,7 @@ ULONG SEC_ENTRY SspiPromptForCredentialsW( PCWSTR target, void *info, { user = ptr + 1; len_username = lstrlenW( user ); - if (!wcsicmp( package, ntlmW ) || !wcsicmp( package, negotiateW )) + if (!wcsicmp( package, L"NTLM" ) || !wcsicmp( package, L"Negotiate" )) { domain = username; len_domain = ptr - username; diff --git a/dlls/credui/tests/credui.c b/dlls/credui/tests/credui.c index 13fbd41c07..f2b71d603c 100644 --- a/dlls/credui/tests/credui.c +++ b/dlls/credui/tests/credui.c @@ -36,7 +36,7 @@ static ULONG (SEC_ENTRY *pSspiPromptForCredentialsW) static void test_CredUIPromptForCredentials(void) { - static const WCHAR wszServerName[] = {'W','i','n','e','T','e','s','t',0}; + static const WCHAR wszServerName[] = L"WineTest"; DWORD ret; WCHAR username[256]; WCHAR password[256]; @@ -77,14 +77,6 @@ static void test_CredUIPromptForCredentials(void) if (winetest_interactive) { - static const WCHAR wszCaption1[] = {'C','R','E','D','U','I','_','F','L','A','G','S','_','E','X','P','E','C','T','_','C','O','N','F','I','R','M','A','T','I','O','N',0}; - static const WCHAR wszCaption2[] = {'C','R','E','D','U','I','_','F','L','A','G','S','_','I','N','C','O','R','R','E','C','T','_','P','A','S','S','W','O','R','D','|', - 'C','R','E','D','U','I','_','F','L','A','G','S','_','E','X','P','E','C','T','_','C','O','N','F','I','R','M','A','T','I','O','N',0}; - static const WCHAR wszCaption3[] = {'C','R','E','D','U','I','_','F','L','A','G','S','_','D','O','_','N','O','T','_','P','E','R','S','I','S','T','|', - 'C','R','E','D','U','I','_','F','L','A','G','S','_','E','X','P','E','C','T','_','C','O','N','F','I','R','M','A','T','I','O','N',0}; - static const WCHAR wszCaption4[] = {'C','R','E','D','U','I','_','F','L','A','G','S','_','P','E','R','S','I','S','T','|', - 'C','R','E','D','U','I','_','F','L','A','G','S','_','E','X','P','E','C','T','_','C','O','N','F','I','R','M','A','T','I','O','N',0}; - ret = CredUIPromptForCredentialsW(NULL, wszServerName, NULL, 0, username, ARRAY_SIZE(username), password, ARRAY_SIZE(password), @@ -96,7 +88,7 @@ static void test_CredUIPromptForCredentials(void) ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %d\n", ret); } - credui_info.pszCaptionText = wszCaption1; + credui_info.pszCaptionText = L"CREDUI_FLAGS_EXPECT_CONFIRMATION"; ret = CredUIPromptForCredentialsW(&credui_info, wszServerName, NULL, ERROR_ACCESS_DENIED, username, ARRAY_SIZE(username), password, ARRAY_SIZE(password), @@ -108,7 +100,7 @@ static void test_CredUIPromptForCredentials(void) ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %d\n", ret); } - credui_info.pszCaptionText = wszCaption2; + credui_info.pszCaptionText = L"CREDUI_FLAGS_INCORRECT_PASSWORD|CREDUI_FLAGS_EXPECT_CONFIRMATION"; ret = CredUIPromptForCredentialsW(&credui_info, wszServerName, NULL, 0, username, ARRAY_SIZE(username), password, ARRAY_SIZE(password), @@ -122,7 +114,7 @@ static void test_CredUIPromptForCredentials(void) save = TRUE; - credui_info.pszCaptionText = wszCaption3; + credui_info.pszCaptionText = L"CREDUI_FLAGS_DO_NOT_PERSIST|CREDUI_FLAGS_EXPECT_CONFIRMATION"; ret = CredUIPromptForCredentialsW(&credui_info, wszServerName, NULL, 0, username, ARRAY_SIZE(username), password, ARRAY_SIZE(password), @@ -131,7 +123,7 @@ static void test_CredUIPromptForCredentials(void) ok(save, "save flag should have been untouched\n"); save = FALSE; - credui_info.pszCaptionText = wszCaption4; + credui_info.pszCaptionText = L"CREDUI_FLAGS_PERSIST|CREDUI_FLAGS_EXPECT_CONFIRMATION"; ret = CredUIPromptForCredentialsW(&credui_info, wszServerName, NULL, 0, username, ARRAY_SIZE(username), password, ARRAY_SIZE(password), @@ -149,8 +141,6 @@ static void test_CredUIPromptForCredentials(void) static void test_SspiPromptForCredentials(void) { - static const WCHAR targetW[] = {'S','s','p','i','T','e','s','t',0}; - static const WCHAR basicW[] = {'b','a','s','i','c',0}; ULONG ret; SECURITY_STATUS status; CREDUI_INFOW info; @@ -166,20 +156,20 @@ static void test_SspiPromptForCredentials(void) info.cbSize = sizeof(info); info.hwndParent = NULL; - info.pszMessageText = targetW; - info.pszCaptionText = basicW; + info.pszMessageText = L"SspiTest"; + info.pszCaptionText = L"basic"; info.hbmBanner = NULL; - ret = pSspiPromptForCredentialsW( NULL, &info, 0, basicW, NULL, &id, &save, 0 ); + ret = pSspiPromptForCredentialsW( NULL, &info, 0, L"basic", NULL, &id, &save, 0 ); ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret ); - ret = pSspiPromptForCredentialsW( targetW, &info, 0, NULL, NULL, &id, &save, 0 ); + ret = pSspiPromptForCredentialsW( L"SspiTest", &info, 0, NULL, NULL, &id, &save, 0 ); ok( ret == ERROR_NO_SUCH_PACKAGE, "got %u\n", ret ); if (winetest_interactive) { id = NULL; save = -1; - ret = pSspiPromptForCredentialsW( targetW, &info, 0, basicW, NULL, &id, &save, 0 ); + ret = pSspiPromptForCredentialsW( L"SspiTest", &info, 0, L"basic", NULL, &id, &save, 0 ); ok( ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "got %u\n", ret ); if (ret == ERROR_SUCCESS) {
1
0
0
0
Michael Stefaniuc : eject: Use wide-char string literals.
by Alexandre Julliard
09 Oct '20
09 Oct '20
Module: wine Branch: master Commit: 17c6e28513afe07f592f9d816faea1369a427c65 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=17c6e28513afe07f592f9d81…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Thu Oct 8 23:27:58 2020 +0200 eject: Use wide-char string literals. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/eject/eject.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/programs/eject/eject.c b/programs/eject/eject.c index 0a081cfdf5..e6416eacff 100644 --- a/programs/eject/eject.c +++ b/programs/eject/eject.c @@ -37,17 +37,15 @@ static BOOL eject_all; /* wrapper for GetDriveTypeW */ static DWORD get_drive_type( WCHAR drive ) { - static const WCHAR rootW[] = {'a',':','\\',0}; WCHAR path[16]; - memcpy( path, rootW, sizeof(rootW) ); + lstrcpyW( path, L"a:\\" ); path[0] = drive; return GetDriveTypeW( path ); } static BOOL eject_cd( WCHAR drive ) { - static const WCHAR deviceW[] = {'\\','\\','.','\\','a',':',0}; PREVENT_MEDIA_REMOVAL removal; WCHAR buffer[16]; HANDLE handle; @@ -59,7 +57,7 @@ static BOOL eject_cd( WCHAR drive ) return FALSE; } - memcpy( buffer, deviceW, sizeof(deviceW) ); + lstrcpyW( buffer, L"\\\\.\\a:" ); buffer[4] = drive; handle = CreateFileW( buffer, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0 );
1
0
0
0
Gabriel Ivăncescu : qedit/nullrenderer: Wait in Receive() while paused.
by Alexandre Julliard
08 Oct '20
08 Oct '20
Module: wine Branch: master Commit: 412db7789379549c4f821acb11c92f7aabab71c9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=412db7789379549c4f821acb…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Thu Oct 8 11:52:29 2020 -0500 qedit/nullrenderer: Wait in Receive() while paused. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qedit/nullrenderer.c | 24 ++++++++++++++++++++++++ dlls/qedit/tests/nullrenderer.c | 10 +++++----- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/dlls/qedit/nullrenderer.c b/dlls/qedit/nullrenderer.c index c64d5e2987..a8594eade8 100644 --- a/dlls/qedit/nullrenderer.c +++ b/dlls/qedit/nullrenderer.c @@ -29,6 +29,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qedit); struct null_renderer { struct strmbase_renderer renderer; + HANDLE run_event; }; static struct null_renderer *impl_from_strmbase_renderer(struct strmbase_renderer *iface) @@ -41,7 +42,14 @@ static HRESULT WINAPI NullRenderer_DoRenderSample(struct strmbase_renderer *ifac struct null_renderer *filter = impl_from_strmbase_renderer(iface); if (filter->renderer.filter.state == State_Paused) + { + const HANDLE events[2] = {filter->run_event, filter->renderer.flush_event}; + SetEvent(filter->renderer.state_event); + LeaveCriticalSection(&filter->renderer.csRenderLock); + WaitForMultipleObjects(2, events, FALSE, INFINITE); + EnterCriticalSection(&filter->renderer.csRenderLock); + } return S_OK; } @@ -56,14 +64,29 @@ static void null_renderer_destroy(struct strmbase_renderer *iface) { struct null_renderer *filter = impl_from_strmbase_renderer(iface); + CloseHandle(filter->run_event); strmbase_renderer_cleanup(&filter->renderer); free(filter); } +static void null_renderer_start_stream(struct strmbase_renderer *iface) +{ + struct null_renderer *filter = impl_from_strmbase_renderer(iface); + SetEvent(filter->run_event); +} + +static void null_renderer_stop_stream(struct strmbase_renderer *iface) +{ + struct null_renderer *filter = impl_from_strmbase_renderer(iface); + ResetEvent(filter->run_event); +} + static const struct strmbase_renderer_ops renderer_ops = { .pfnCheckMediaType = NullRenderer_CheckMediaType, .pfnDoRenderSample = NullRenderer_DoRenderSample, + .renderer_start_stream = null_renderer_start_stream, + .renderer_stop_stream = null_renderer_stop_stream, .renderer_destroy = null_renderer_destroy, }; @@ -75,6 +98,7 @@ HRESULT null_renderer_create(IUnknown *outer, IUnknown **out) return E_OUTOFMEMORY; strmbase_renderer_init(&object->renderer, outer, &CLSID_NullRenderer, L"In", &renderer_ops); + object->run_event = CreateEventW(NULL, TRUE, FALSE, NULL); TRACE("Created null renderer %p.\n", object); *out = &object->renderer.filter.IUnknown_inner; diff --git a/dlls/qedit/tests/nullrenderer.c b/dlls/qedit/tests/nullrenderer.c index 3285e22e5c..754228d770 100644 --- a/dlls/qedit/tests/nullrenderer.c +++ b/dlls/qedit/tests/nullrenderer.c @@ -615,7 +615,7 @@ static void test_filter_state(IMemInputPin *input, IFilterGraph2 *graph) hr = IMediaControl_GetState(control, 1000, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); + ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); hr = IMediaControl_Stop(control); ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -648,7 +648,7 @@ static void test_filter_state(IMemInputPin *input, IFilterGraph2 *graph) hr = IMediaControl_GetState(control, 1000, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); + ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); hr = IMediaControl_Run(control); ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -674,7 +674,7 @@ static void test_filter_state(IMemInputPin *input, IFilterGraph2 *graph) hr = IMediaControl_GetState(control, 1000, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); + ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); hr = IMediaControl_Run(control); ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -742,7 +742,7 @@ static void test_flushing(IPin *pin, IMemInputPin *input, IFilterGraph2 *graph) ok(hr == S_FALSE, "Got hr %#x.\n", hr); thread = send_frame(input); - todo_wine ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); + ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); hr = IMediaControl_GetState(control, 0, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -766,7 +766,7 @@ static void test_flushing(IPin *pin, IMemInputPin *input, IFilterGraph2 *graph) todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); thread = send_frame(input); - todo_wine ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); + ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); hr = IMediaControl_Run(control); ok(hr == S_OK, "Got hr %#x.\n", hr);
1
0
0
0
Zebediah Figura : qedit/tests: Add some basic tests for null renderer connection and streaming.
by Alexandre Julliard
08 Oct '20
08 Oct '20
Module: wine Branch: master Commit: 944f91b1475a701c75e2fc0dd43112a4192a7e80 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=944f91b1475a701c75e2fc0d…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Oct 8 11:52:28 2020 -0500 qedit/tests: Add some basic tests for null renderer connection and streaming. Adapted from the video renderer tests. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qedit/tests/nullrenderer.c | 464 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 464 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=944f91b1475a701c75e2…
1
0
0
0
Hans Leidekker : dssenh: Register the DSS provider.
by Alexandre Julliard
08 Oct '20
08 Oct '20
Module: wine Branch: master Commit: 3ae2dd164c2e8134af573e4dc9643317d30c758e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3ae2dd164c2e8134af573e4d…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Oct 8 18:02:44 2020 +0200 dssenh: Register the DSS provider. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dssenh/Makefile.in | 2 ++ dlls/dssenh/dssenh.rgs | 56 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/dssenh/main.c | 22 ++++++++++-------- dlls/dssenh/rsrc.rc | 22 ++++++++++++++++++ dlls/dssenh/tests/dssenh.c | 5 ++--- 5 files changed, 95 insertions(+), 12 deletions(-) diff --git a/dlls/dssenh/Makefile.in b/dlls/dssenh/Makefile.in index 4f05beee51..8015768f99 100644 --- a/dlls/dssenh/Makefile.in +++ b/dlls/dssenh/Makefile.in @@ -4,3 +4,5 @@ EXTRADLLFLAGS = -mno-cygwin C_SRCS = \ main.c + +RC_SRCS = rsrc.rc diff --git a/dlls/dssenh/dssenh.rgs b/dlls/dssenh/dssenh.rgs new file mode 100644 index 0000000000..0e9bad7c17 --- /dev/null +++ b/dlls/dssenh/dssenh.rgs @@ -0,0 +1,56 @@ +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Cryptography + { + NoRemove Defaults + { + NoRemove Provider + { + ForceRemove 'Microsoft Base DSS Cryptographic Provider' + { + val 'Image Path' = s '%MODULE%' + val 'Type' = d 3 + } + ForceRemove 'Microsoft Base DSS and Diffie-Hellman Cryptographic Provider' + { + val 'Image Path' = s '%MODULE%' + val 'Type' = d 13 + } + ForceRemove 'Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider' + { + val 'Image Path' = s '%MODULE%' + val 'Type' = d 13 + } + ForceRemove 'Microsoft DH SChannel Cryptographic Provider' + { + val 'Image Path' = s '%MODULE%' + val 'Type' = d 18 + } + } + NoRemove 'Provider Types' + { + ForceRemove 'Type 003' + { + val 'Name' = s 'Microsoft Base DSS Cryptographic Provider' + val 'TypeName' = s 'DSS Signature' + } + ForceRemove 'Type 013' + { + val 'Name' = s 'Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider' + val 'TypeName' = s 'DSS Signature with Diffie-Hellman Key Exchange' + } + ForceRemove 'Type 018' + { + val 'Name' = s 'Microsoft DH SChannel Cryptographic Provider' + val 'TypeName' = s 'Diffie-Hellman SChannel' + } + } + } + } + } + } +} diff --git a/dlls/dssenh/main.c b/dlls/dssenh/main.c index 80551cf578..5aa885c8b8 100644 --- a/dlls/dssenh/main.c +++ b/dlls/dssenh/main.c @@ -22,8 +22,13 @@ #include "windef.h" #include "winbase.h" #include "wincrypt.h" +#include "objbase.h" +#include "rpcproxy.h" + #include "wine/debug.h" +static HINSTANCE instance; + WINE_DEFAULT_DEBUG_CHANNEL(dssenh); BOOL WINAPI CPAcquireContext( HCRYPTPROV *ret_prov, LPSTR container, DWORD flags, PVTableProvStruc vtable ) @@ -106,11 +111,12 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) switch (fdwReason) { - case DLL_WINE_PREATTACH: - return FALSE; /* prefer native version */ - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hinstDLL); - break; + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + instance = hinstDLL; + DisableThreadLibraryCalls(hinstDLL); + break; } return TRUE; } @@ -120,8 +126,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) */ HRESULT WINAPI DllRegisterServer(void) { - FIXME("Not implemented.\n"); - return E_UNEXPECTED; + return __wine_register_resources( instance ); } /***************************************************** @@ -129,6 +134,5 @@ HRESULT WINAPI DllRegisterServer(void) */ HRESULT WINAPI DllUnregisterServer(void) { - FIXME("Not implemented.\n"); - return E_UNEXPECTED; + return __wine_unregister_resources( instance ); } diff --git a/dlls/dssenh/rsrc.rc b/dlls/dssenh/rsrc.rc new file mode 100644 index 0000000000..ac5ba6258e --- /dev/null +++ b/dlls/dssenh/rsrc.rc @@ -0,0 +1,22 @@ +/* + * Resources for dssenh + * + * Copyright 2020 Hans Leidekker 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 + */ + +/* @makedep: dssenh.rgs */ +1 WINE_REGISTRY dssenh.rgs diff --git a/dlls/dssenh/tests/dssenh.c b/dlls/dssenh/tests/dssenh.c index 7a16acc679..c88fcd1466 100644 --- a/dlls/dssenh/tests/dssenh.c +++ b/dlls/dssenh/tests/dssenh.c @@ -54,7 +54,6 @@ static void test_acquire_context(void) /* cannot acquire along with PROV_RSA_SIG, not compatible */ SetLastError(0xdeadbeef); result = CryptAcquireContextA(&hProv, NULL, MS_DEF_DSS_PROV_A, PROV_RSA_SIG, 0); - todo_wine ok(!result && GetLastError() == NTE_PROV_TYPE_NO_MATCH, "Expected NTE_PROV_TYPE_NO_MATCH, got %08x\n", GetLastError()); @@ -574,7 +573,7 @@ static void test_data_encryption(const struct encrypt_test *tests, int testLen) SetLastError(0xdeadbeef); result = CryptAcquireContextA( &hProv, NULL, MS_ENH_DSS_DH_PROV_A, PROV_DSS_DH, CRYPT_VERIFYCONTEXT); - if(!result && GetLastError() == NTE_KEYSET_NOT_DEF) + if (!result) { skip("DSSENH is currently not available, skipping encryption tests.\n"); return; @@ -665,7 +664,7 @@ static void test_cipher_modes(const struct ciphermode_test *tests, int testLen) SetLastError(0xdeadbeef); result = CryptAcquireContextA( &hProv, NULL, MS_ENH_DSS_DH_PROV_A, PROV_DSS_DH, CRYPT_VERIFYCONTEXT); - if(!result && GetLastError() == NTE_KEYSET_NOT_DEF) + if (!result) { skip("DSSENH is currently not available, skipping block cipher mode tests.\n"); return;
1
0
0
0
Hans Leidekker : dssenh: Add stub implementations for a couple of functions.
by Alexandre Julliard
08 Oct '20
08 Oct '20
Module: wine Branch: master Commit: c690a31acf55bea967336504d81237b475ee5a4d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c690a31acf55bea967336504…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Oct 8 18:02:43 2020 +0200 dssenh: Add stub implementations for a couple of functions. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dssenh/dssenh.spec | 28 +++++++++--------- dlls/dssenh/main.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 14 deletions(-) diff --git a/dlls/dssenh/dssenh.spec b/dlls/dssenh/dssenh.spec index c5c2545281..2d93a98796 100644 --- a/dlls/dssenh/dssenh.spec +++ b/dlls/dssenh/dssenh.spec @@ -1,27 +1,27 @@ -@ stub CPAcquireContext -@ stub CPCreateHash +@ stdcall CPAcquireContext(ptr str long ptr) +@ stdcall CPCreateHash(ptr long ptr long ptr) @ stub CPDecrypt -@ stub CPDeriveKey -@ stub CPDestroyHash -@ stub CPDestroyKey +@ stdcall CPDeriveKey(ptr long ptr long ptr) +@ stdcall CPDestroyHash(ptr ptr) +@ stdcall CPDestroyKey(ptr ptr) @ stub CPDuplicateHash @ stub CPDuplicateKey @ stub CPEncrypt -@ stub CPExportKey -@ stub CPGenKey +@ stdcall CPExportKey(ptr ptr ptr long long ptr ptr) +@ stdcall CPGenKey(ptr long long ptr) @ stub CPGenRandom -@ stub CPGetHashParam +@ stdcall CPGetHashParam(ptr ptr long ptr ptr long) @ stub CPGetKeyParam -@ stub CPGetProvParam +@ stdcall CPGetProvParam(ptr long ptr ptr long) @ stub CPGetUserKey -@ stub CPHashData +@ stdcall CPHashData(ptr ptr ptr long long) @ stub CPHashSessionKey -@ stub CPImportKey -@ stub CPReleaseContext +@ stdcall CPImportKey(ptr ptr long ptr long ptr) +@ stdcall CPReleaseContext(ptr long) @ stub CPSetHashParam @ stub CPSetKeyParam @ stub CPSetProvParam -@ stub CPSignHash -@ stub CPVerifySignature +@ stdcall CPSignHash(ptr ptr long wstr long ptr ptr) +@ stdcall CPVerifySignature(ptr ptr ptr long ptr wstr long) @ stdcall -private DllRegisterServer() @ stdcall -private DllUnregisterServer() diff --git a/dlls/dssenh/main.c b/dlls/dssenh/main.c index b60b3447a3..80551cf578 100644 --- a/dlls/dssenh/main.c +++ b/dlls/dssenh/main.c @@ -21,10 +21,85 @@ #include "windef.h" #include "winbase.h" +#include "wincrypt.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(dssenh); +BOOL WINAPI CPAcquireContext( HCRYPTPROV *ret_prov, LPSTR container, DWORD flags, PVTableProvStruc vtable ) +{ + return FALSE; +} + +BOOL WINAPI CPReleaseContext( HCRYPTPROV hprov, DWORD flags ) +{ + return FALSE; +} + +BOOL WINAPI CPGetProvParam( HCRYPTPROV hprov, DWORD param, BYTE *data, DWORD *len, DWORD flags ) +{ + return FALSE; +} + +BOOL WINAPI CPGenKey( HCRYPTPROV hprov, ALG_ID algid, DWORD flags, HCRYPTKEY *ret_key ) +{ + return FALSE; +} + +BOOL WINAPI CPDestroyKey( HCRYPTPROV hprov, HCRYPTKEY hkey ) +{ + return FALSE; +} + +BOOL WINAPI CPImportKey( HCRYPTPROV hprov, const BYTE *data, DWORD len, HCRYPTKEY hpubkey, DWORD flags, + HCRYPTKEY *ret_key ) +{ + return FALSE; +} + +BOOL WINAPI CPExportKey( HCRYPTPROV hprov, HCRYPTKEY hkey, HCRYPTKEY hexpkey, DWORD blobtype, DWORD flags, + BYTE *data, DWORD *len ) +{ + return FALSE; +} + +BOOL WINAPI CPCreateHash( HCRYPTPROV hprov, ALG_ID algid, HCRYPTKEY hkey, DWORD flags, HCRYPTHASH *ret_hash ) +{ + return FALSE; +} + +BOOL WINAPI CPDestroyHash( HCRYPTPROV hprov, HCRYPTHASH hhash ) +{ + return FALSE; +} + +BOOL WINAPI CPHashData( HCRYPTPROV hprov, HCRYPTHASH hhash, const BYTE *data, DWORD len, DWORD flags ) +{ + return FALSE; +} + +BOOL WINAPI CPGetHashParam( HCRYPTPROV hprov, HCRYPTHASH hhash, DWORD param, BYTE *data, DWORD *len, DWORD flags ) +{ + return FALSE; +} + +BOOL WINAPI CPDeriveKey( HCRYPTPROV hprov, ALG_ID algid, HCRYPTHASH hhash, DWORD flags, HCRYPTKEY *ret_key ) +{ + return FALSE; +} + +BOOL WINAPI CPSignHash( HCRYPTPROV hprov, HCRYPTHASH hhash, DWORD keyspec, const WCHAR *desc, DWORD flags, BYTE *sig, + DWORD *siglen ) +{ + return FALSE; +} + +BOOL WINAPI CPVerifySignature( HCRYPTPROV hprov, HCRYPTHASH hhash, const BYTE *sig, DWORD siglen, HCRYPTKEY hpubkey, + const WCHAR *desc, DWORD flags ) +{ + return FALSE; +} + BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
1
0
0
0
Jacek Caban : conhost: Support painting screen buffer.
by Alexandre Julliard
08 Oct '20
08 Oct '20
Module: wine Branch: master Commit: 3a6da8defa65e6615e9f29e5c600e62cea0a9bd4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3a6da8defa65e6615e9f29e5…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Oct 8 17:30:57 2020 +0200 conhost: Support painting screen buffer. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/conhost/conhost.c | 12 ++++++++++-- programs/conhost/conhost.h | 1 + programs/conhost/window.c | 26 ++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c index ac7508ed8e..68e27f74b8 100644 --- a/programs/conhost/conhost.c +++ b/programs/conhost/conhost.c @@ -318,10 +318,18 @@ static void update_output( struct screen_buffer *screen_buffer, RECT *rect ) char_info_t *ch; char buf[8]; - if (!is_active( screen_buffer ) || !screen_buffer->console->tty_output) return; - if (rect->top > rect->bottom || rect->right < rect->left) return; + if (!is_active( screen_buffer ) || rect->top > rect->bottom || rect->right < rect->left) + return; + TRACE( "%s\n", wine_dbgstr_rect( rect )); + if (screen_buffer->console->win) + { + update_window_region( screen_buffer->console, rect ); + return; + } + if (!screen_buffer->console->tty_output) return; + hide_tty_cursor( screen_buffer->console ); for (y = rect->top; y <= rect->bottom; y++) diff --git a/programs/conhost/conhost.h b/programs/conhost/conhost.h index 690472dcc7..c47253a755 100644 --- a/programs/conhost/conhost.h +++ b/programs/conhost/conhost.h @@ -131,6 +131,7 @@ struct screen_buffer }; BOOL init_window( struct console *console ); +void update_window_region( struct console *console, const RECT *update ); void update_window_config( struct console *console ); NTSTATUS change_screen_buffer_size( struct screen_buffer *screen_buffer, int new_width, int new_height ); diff --git a/programs/conhost/window.c b/programs/conhost/window.c index 7d9b416e25..2e94eb5969 100644 --- a/programs/conhost/window.c +++ b/programs/conhost/window.c @@ -933,6 +933,22 @@ static LRESULT WINAPI window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp update_window( console ); break; + case WM_PAINT: + { + PAINTSTRUCT ps; + + BeginPaint( console->win, &ps ); + BitBlt( ps.hdc, 0, 0, + (console->active->win.right - console->active->win.left + 1) * console->active->font.width, + (console->active->win.bottom - console->active->win.top + 1) * console->active->font.height, + console->window->mem_dc, + console->active->win.left * console->active->font.width, + console->active->win.top * console->active->font.height, + SRCCOPY ); + EndPaint( console->win, &ps ); + break; + } + default: return DefWindowProcW( hwnd, msg, wparam, lparam ); } @@ -947,6 +963,16 @@ void update_window_config( struct console *console ) PostMessageW( console->win, WM_UPDATE_CONFIG, 0, 0 ); } +void update_window_region( struct console *console, const RECT *update ) +{ + RECT *window_rect = &console->window->update; + window_rect->left = min( window_rect->left, update->left ); + window_rect->top = min( window_rect->top, update->top ); + window_rect->right = max( window_rect->right, update->right ); + window_rect->bottom = max( window_rect->bottom, update->bottom ); + update_window_config( console ); +} + BOOL init_window( struct console *console ) { struct console_config config;
1
0
0
0
Jacek Caban : conhost: Update window config in ioctl handlers when needed.
by Alexandre Julliard
08 Oct '20
08 Oct '20
Module: wine Branch: master Commit: c2ffbe5d364d07971e0c893c6d52e5606dfbaef7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c2ffbe5d364d07971e0c893c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Oct 8 17:30:48 2020 +0200 conhost: Update window config in ioctl handlers when needed. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/conhost/conhost.c | 13 ++++++++++--- programs/conhost/conhost.h | 2 ++ programs/conhost/window.c | 13 +++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c index 5c5f184e6e..ac7508ed8e 100644 --- a/programs/conhost/conhost.c +++ b/programs/conhost/conhost.c @@ -1162,6 +1162,7 @@ static void update_read_output( struct console *console ) if (console->is_unix) set_tty_cursor_relative( screen_buffer->console, screen_buffer->cursor_x, screen_buffer->cursor_y ); tty_sync( screen_buffer->console ); + update_window_config( screen_buffer->console ); } static NTSTATUS process_console_input( struct console *console ) @@ -1632,9 +1633,10 @@ static NTSTATUS screen_buffer_activate( struct screen_buffer *screen_buffer ) RECT update_rect; TRACE( "%p\n", screen_buffer ); screen_buffer->console->active = screen_buffer; - SetRect( &update_rect, 0, 0, screen_buffer->width - 1, screen_buffer->height - 1); + SetRect( &update_rect, 0, 0, screen_buffer->width - 1, screen_buffer->height - 1 ); update_output( screen_buffer, &update_rect ); tty_sync( screen_buffer->console ); + update_window_config( screen_buffer->console ); return STATUS_SUCCESS; } @@ -1840,7 +1842,11 @@ static NTSTATUS set_output_info( struct screen_buffer *screen_buffer, } } - if (is_active( screen_buffer )) tty_sync( screen_buffer->console ); + if (is_active( screen_buffer )) + { + tty_sync( screen_buffer->console ); + update_window_config( screen_buffer->console ); + } return STATUS_SUCCESS; } @@ -1898,6 +1904,7 @@ static NTSTATUS write_console( struct screen_buffer *screen_buffer, const WCHAR scroll_to_cursor( screen_buffer ); update_output( screen_buffer, &update_rect ); tty_sync( screen_buffer->console ); + update_window_config( screen_buffer->console ); return STATUS_SUCCESS; } @@ -2384,7 +2391,7 @@ static NTSTATUS console_input_ioctl( struct console *console, unsigned int code, blocking = in_size && *(unsigned int *)in_data; if (blocking && !console->record_count && *out_size) { - TRACE( "pending read" ); + TRACE( "pending read\n" ); console->read_ioctl = IOCTL_CONDRV_READ_INPUT; console->pending_read = *out_size; return STATUS_PENDING; diff --git a/programs/conhost/conhost.h b/programs/conhost/conhost.h index 49c3cccbce..690472dcc7 100644 --- a/programs/conhost/conhost.h +++ b/programs/conhost/conhost.h @@ -131,6 +131,8 @@ struct screen_buffer }; BOOL init_window( struct console *console ); +void update_window_config( struct console *console ); + NTSTATUS change_screen_buffer_size( struct screen_buffer *screen_buffer, int new_width, int new_height ); static inline void empty_update_rect( struct screen_buffer *screen_buffer, RECT *rect ) diff --git a/programs/conhost/window.c b/programs/conhost/window.c index 4085fd7a57..7d9b416e25 100644 --- a/programs/conhost/window.c +++ b/programs/conhost/window.c @@ -29,6 +29,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(conhost); +#define WM_UPDATE_CONFIG (WM_USER + 1) + enum update_state { UPDATE_NONE, @@ -927,6 +929,10 @@ static LRESULT WINAPI window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp PostQuitMessage( 0 ); break; + case WM_UPDATE_CONFIG: + update_window( console ); + break; + default: return DefWindowProcW( hwnd, msg, wparam, lparam ); } @@ -934,6 +940,13 @@ static LRESULT WINAPI window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp return 0; } +void update_window_config( struct console *console ) +{ + if (!console->win || console->window->update_state != UPDATE_NONE) return; + console->window->update_state = UPDATE_PENDING; + PostMessageW( console->win, WM_UPDATE_CONFIG, 0, 0 ); +} + BOOL init_window( struct console *console ) { struct console_config config;
1
0
0
0
Jacek Caban : conhost: Import window state update from wineconsole.
by Alexandre Julliard
08 Oct '20
08 Oct '20
Module: wine Branch: master Commit: 632676d071a936199d6d91d804f2e62321c870f7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=632676d071a936199d6d91d8…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Oct 8 17:30:41 2020 +0200 conhost: Import window state update from wineconsole. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/conhost/conhost.c | 5 - programs/conhost/conhost.h | 5 + programs/conhost/window.c | 259 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 264 insertions(+), 5 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=632676d071a936199d6d…
1
0
0
0
← Newer
1
...
50
51
52
53
54
55
56
...
80
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
Results per page:
10
25
50
100
200