[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [PATCH 3/5] winex11.drv: Don't remap root_window relative coordinates.
From:       Alexandre Julliard <julliard () winehq ! org>
Date:       2021-03-31 19:23:44
Message-ID: 8735wb6san.fsf () wine
[Download RAW message or body]

Rémi Bernon <rbernon@codeweavers.com> writes:

> On 3/31/21 7:52 PM, Alexandre Julliard wrote:
> > Rémi Bernon <rbernon@codeweavers.com> writes:
> > 
> > > @@ -599,15 +599,15 @@ static void map_event_coords( HWND hwnd, Window window, \
> > > struct x11drv_win_data * TRACE( "hwnd %p, window %lx, data %p, input %p\n", \
> > > hwnd, window, data, input ); if (window == root_window) pt = \
> > > root_to_virtual_screen( pt.x, pt.y );
> > > -    if (window == data->whole_window)
> > > +    else if (window == data->whole_window)
> > > {
> > > pt.x += data->whole_rect.left - data->client_rect.left;
> > > pt.y += data->whole_rect.top - data->client_rect.top;
> > > -    }
> > > -    if (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL)
> > > -        pt.x = data->client_rect.right - data->client_rect.left - 1 - pt.x;
> > > -    MapWindowPoints( hwnd, 0, &pt, 1 );
> > > +        if (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL)
> > > +            pt.x = data->client_rect.right - data->client_rect.left - 1 - \
> > > pt.x; +        MapWindowPoints( hwnd, 0, &pt, 1 );
> > > +    }
> > This is wrong, you'd still need to map them for the client window.
> 
> Can this happen? I don't think we register input for the client windows.
> 
> As far as I can see the event's window is always the whole_window, for
> which we selected pointer motion events, and that received input.

It was happening at some point. I think we might as well keep the check
in case we change things and get client window events again, but
otherwise the if() should be removed.

-- 
Alexandre Julliard
julliard@winehq.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic