[PATCH] winex11.drv: Redraw window on Expose event if window surface has no region set.

Paul Gofman gofmanp at gmail.com
Fri Apr 3 07:45:16 CDT 2020


I am attaching a standalone test program which reliably shows a problem
that the patch is solving in case I enable virtual desktop. Without
virtual desktop the problem in this test is either visible or not
depending on window manager used. The similar problem can also be
reproduced with, e. g., destroying window instead of moving it.

On 4/3/20 15:34, Paul Gofman wrote:
> Otherwise the window (partially) obscured by the other window sometimes fails
> to update when the obscuring window is moved or destroyed.
>
> Signed-off-by: Paul Gofman <gofmanp at gmail.com>
> ---
>  dlls/winex11.drv/bitblt.c | 5 +++++
>  dlls/winex11.drv/event.c  | 1 +
>  2 files changed, 6 insertions(+)
>
> diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c
> index b530ba7ba6..ac430ef4c0 100644
> --- a/dlls/winex11.drv/bitblt.c
> +++ b/dlls/winex11.drv/bitblt.c
> @@ -2106,6 +2106,11 @@ HRGN expose_surface( struct window_surface *window_surface, const RECT *rect )
>              region = 0;
>          }
>      }
> +    else
> +    {
> +        region = (HRGN)1;
> +    }
> +
>      window_surface->funcs->unlock( window_surface );
>      return region;
>  }
> diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
> index 10d71c2cb4..6424790a62 100644
> --- a/dlls/winex11.drv/event.c
> +++ b/dlls/winex11.drv/event.c
> @@ -941,6 +941,7 @@ static BOOL X11DRV_Expose( HWND hwnd, XEvent *xev )
>          {
>              surface_region = expose_surface( data->surface, &rect );
>              if (!surface_region) flags = 0;
> +            else if(surface_region == (HRGN)1) surface_region = NULL;
>              else OffsetRgn( surface_region, data->whole_rect.left - data->client_rect.left,
>                              data->whole_rect.top - data->client_rect.top );
>  


-------------- next part --------------
A non-text attachment was scrubbed...
Name: expose_redraw_test.c
Type: text/x-csrc
Size: 8563 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20200403/24db65f9/attachment.c>


More information about the wine-devel mailing list