[PATCH] winex11.drv: Stop assuming that GenericEvent has a window.

Dmitry Timoshkov dmitry at baikal.ru
Mon Feb 15 05:26:24 CST 2021


Rémi Bernon <rbernon at codeweavers.com> wrote:

> On 2/15/21 11:25 AM, Dmitry Timoshkov wrote:
> > Rémi Bernon <rbernon at codeweavers.com> wrote:
> > 
> >> -    if (XFindContext( display, event->xany.window, winContext, (char **)&hwnd ) != 0)
> >> -        hwnd = 0;  /* not for a registered window */
> >> +    if (event->type == GenericEvent || XFindContext( display, event->xany.window, winContext, (char **)&hwnd ))
> >> +        hwnd = NULL;  /* not for a registered window */
> > 
> > Changing 0 to NULL looks gratuitous.
> > 
> 
> Sure, and the != 0 removal too. I think HWND are set with NULL 
> elsewhere. I took the opportunity of the change to make things a bit 
> more consistent.

Window handles are not pointers, please avoid gratuitous changes in the diffs.

-- 
Dmitry.



More information about the wine-devel mailing list