Re: [ros-dev] [ros-diffs] 01/01: [WIN32SS] Fix NtUserGetClipboardData for text paste (#645)

2018-07-03 Thread Pierre Schweitzer
For the record, that commit seems to have broken ReactOS testing (see
testman, which records last successful test run for 2170901, ie,
previous commit).

Starting with that commit, any regression test run never ends.
It seems bug reports have been creating regarding regressions (timeouts)
in the tests but got ignored so far.

It would be great to fix these before pushing any other commits.

Cheers,
Pierre

Le 30/06/2018 à 17:12, Katayama Hirofumi MZ a écrit :
> https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6abc9f5b5af6cc7b7c57ff9c6bcc4a919cf85d1e
> 
> commit 6abc9f5b5af6cc7b7c57ff9c6bcc4a919cf85d1e
> Author: Katayama Hirofumi MZ 
> AuthorDate: Sun Jul 1 00:12:23 2018 +0900
> Commit: Hermès BÉLUSCA - MAÏTO 
> CommitDate: Sat Jun 30 17:12:23 2018 +0200
> 
> [WIN32SS] Fix NtUserGetClipboardData for text paste (#645)
> 
> Fix the NtUserGetClipboardData function for the synthesized text formats 
> (CF_TEXT, CF_OEMTEXT and CF_UNICODETEXT).
> CORE-11471
> ---
>  win32ss/user/ntuser/clipboard.c | 47 
> ++---
>  1 file changed, 30 insertions(+), 17 deletions(-)
> 
> diff --git a/win32ss/user/ntuser/clipboard.c b/win32ss/user/ntuser/clipboard.c
> index 92109953cc..04e5d22291 100644
> --- a/win32ss/user/ntuser/clipboard.c
> +++ b/win32ss/user/ntuser/clipboard.c
> @@ -294,8 +294,8 @@ IntAddSynthesizedFormats(PWINSTATION_OBJECT pWinStaObj)
>  bHaveBm = IntIsFormatAvailable(pWinStaObj, CF_BITMAP);
>  bHaveDib = IntIsFormatAvailable(pWinStaObj, CF_DIB);
>  
> -/* Add CF_LOCALE format if we have CF_TEXT */
> -if (!bHaveLocale && bHaveText)
> +/* Add CF_LOCALE format if we have CF_TEXT, CF_OEMTEXT or CF_UNICODETEXT 
> */
> +if (!bHaveLocale && (bHaveText || bHaveOemText || bHaveUniText))
>  {
>  PCLIPBOARDDATA pMemObj;
>  HANDLE hMem;
> @@ -881,6 +881,7 @@ NtUserGetClipboardData(UINT fmt, PGETCLIPBDATA pgcd)
>  HANDLE hRet = NULL;
>  PCLIP pElement;
>  PWINSTATION_OBJECT pWinStaObj;
> +UINT uSourceFmt = fmt;
>  
>  TRACE("NtUserGetClipboardData(%x, %p)\n", fmt, pgcd);
>  
> @@ -898,18 +899,7 @@ NtUserGetClipboardData(UINT fmt, PGETCLIPBDATA pgcd)
>  }
>  
>  pElement = IntGetFormatElement(pWinStaObj, fmt);
> -if (pElement && IS_DATA_DELAYED(pElement) && pWinStaObj->spwndClipOwner)
> -{
> -/* Send WM_RENDERFORMAT message */
> -pWinStaObj->fInDelayedRendering = TRUE;
> -co_IntSendMessage(pWinStaObj->spwndClipOwner->head.h, 
> WM_RENDERFORMAT, (WPARAM)fmt, 0);
> -pWinStaObj->fInDelayedRendering = FALSE;
> -
> -/* Data should be in clipboard now */
> -pElement = IntGetFormatElement(pWinStaObj, fmt);
> -}
> -
> -if (!pElement || IS_DATA_DELAYED(pElement))
> +if (!pElement)
>  goto cleanup;
>  
>  if (IS_DATA_SYNTHESIZED(pElement))
> @@ -921,20 +911,43 @@ NtUserGetClipboardData(UINT fmt, PGETCLIPBDATA pgcd)
>  case CF_UNICODETEXT:
>  case CF_TEXT:
>  case CF_OEMTEXT:
> -pElement = IntGetFormatElement(pWinStaObj, CF_UNICODETEXT);
> +uSourceFmt = CF_UNICODETEXT;
> +pElement = IntGetFormatElement(pWinStaObj, uSourceFmt);
>  if (IS_DATA_SYNTHESIZED(pElement))
> -pElement = IntGetFormatElement(pWinStaObj, CF_TEXT);
> +{
> +uSourceFmt = CF_TEXT;
> +pElement = IntGetFormatElement(pWinStaObj, uSourceFmt);
> +}
>  if (IS_DATA_SYNTHESIZED(pElement))
> -pElement = IntGetFormatElement(pWinStaObj, CF_OEMTEXT);
> +{
> +uSourceFmt = CF_OEMTEXT;
> +pElement = IntGetFormatElement(pWinStaObj, uSourceFmt);
> +}
>  break;
> +
>  case CF_BITMAP:
>  IntSynthesizeBitmap(pWinStaObj, pElement);
>  break;
> +
>  default:
>  ASSERT(FALSE);
>  }
>  }
>  
> +if (pElement && IS_DATA_DELAYED(pElement) && pWinStaObj->spwndClipOwner)
> +{
> +/* Send WM_RENDERFORMAT message */
> +pWinStaObj->fInDelayedRendering = TRUE;
> +co_IntSendMessage(pWinStaObj->spwndClipOwner->head.h, 
> WM_RENDERFORMAT, (WPARAM)uSourceFmt, 0);
> +pWinStaObj->fInDelayedRendering = FALSE;
> +
> +/* Data should be in clipboard now */
> +pElement = IntGetFormatElement(pWinStaObj, uSourceFmt);
> +}
> +
> +if (!pElement || IS_DATA_DELAYED(pElement))
> +goto cleanup;
> +
>  _SEH2_TRY
>  {
>  ProbeForWrite(pgcd, sizeof(*pgcd), 1);
> 


-- 
Pierre Schweitzer 
System & Network Administrator
Senior Kernel Developer
ReactOS Deutschland e.V.



signature.asc
Description: OpenPGP digital signature
___
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org

Re: [ros-dev] [ros-diffs] 01/01: [WIN32SS] Fix NtUserGetClipboardData for text paste (#645)

2018-07-07 Thread Hermès BÉLUSCA-MAÏTO
Hello,

This commit, as well as the following one: 
0a8cd95cad36e7518ddb7256b3af9169789285f7 - "[USERINIT][EXPLORER] Fix auto 
startup of Start Menu (#594)"
that caused the apparition of a strange timeout during the "kernel32 : 
ConsoleCP" test (has been investigated by Mark, see 
https://jira.reactos.org/browse/CORE-14763 )
seems to expose an already-existing bug in win32k related to window painting.

Indeed, the problems appear to be fixed by this PR: 
https://github.com/reactos/reactos/pull/674
and fixes the testbots as you can see:
https://build.reactos.org/builders/Test%20KVM/builds/20737
https://build.reactos.org/builders/Test%20KVM/builds/20738

If everything goes well, I will commit the PR during the weekend.

Best regards,
Hermès

> -Message d'origine-
> De : Ros-dev [mailto:ros-dev-boun...@reactos.org] De la part de Pierre
> Schweitzer
> Envoyé : mercredi 4 juillet 2018 07:41
> À : ros-dev@reactos.org; Katayama Hirofumi MZ
> Objet : Re: [ros-dev] [ros-diffs] 01/01: [WIN32SS] Fix NtUserGetClipboardData
> for text paste (#645)
> 
> For the record, that commit seems to have broken ReactOS testing (see
> testman, which records last successful test run for 2170901, ie, previous
> commit).
> 
> Starting with that commit, any regression test run never ends.
> It seems bug reports have been creating regarding regressions (timeouts) in
> the tests but got ignored so far.
> 
> It would be great to fix these before pushing any other commits.
> 
> Cheers,
> Pierre
> 
> Le 30/06/2018 à 17:12, Katayama Hirofumi MZ a écrit :
> > https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6abc9f5b5af6cc7b
> > 7c57ff9c6bcc4a919cf85d1e
> >
> > commit 6abc9f5b5af6cc7b7c57ff9c6bcc4a919cf85d1e
> > Author: Katayama Hirofumi MZ 
> > AuthorDate: Sun Jul 1 00:12:23 2018 +0900
> > Commit: Hermès BÉLUSCA - MAÏTO 
> > CommitDate: Sat Jun 30 17:12:23 2018 +0200
> >
> > [WIN32SS] Fix NtUserGetClipboardData for text paste (#645)
> >
> > Fix the NtUserGetClipboardData function for the synthesized text formats
> (CF_TEXT, CF_OEMTEXT and CF_UNICODETEXT).
> > CORE-11471
> > --- 
> 
> --
> Pierre Schweitzer  System & Network Administrator
> Senior Kernel Developer ReactOS Deutschland e.V.



___
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev