Rémi Bernon : winex11.drv: Don't assume that GenericEvent has a window.
Module: wine Branch: master Commit: 4cb6334b1bd5de08a0e27d1c4f7feb33ae6c0dd9 URL: https://source.winehq.org/git/wine.git/?a=commit;h=4cb6334b1bd5de08a0e27d1c4... Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Feb 15 12:38:27 2021 +0100 winex11.drv: Don't assume that GenericEvent has a window. It doesn't, and we then lookup HWND from an invalid Window value. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/event.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index d21d2a7fb1b..99943478729 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -390,6 +390,9 @@ static inline BOOL call_event_handler( Display *display, XEvent *event ) return FALSE; /* no handler, ignore it */ } +#ifdef GenericEvent + if (event->type == GenericEvent) hwnd = 0; else +#endif if (XFindContext( display, event->xany.window, winContext, (char **)&hwnd ) != 0) hwnd = 0; /* not for a registered window */ if (!hwnd && event->xany.window == root_window) hwnd = GetDesktopWindow();
participants (1)
-
Alexandre Julliard