Rémi Bernon : winex11.drv: Don't assume that GenericEvent has a window.
Alexandre Julliard
julliard at winehq.org
Tue Feb 23 15:54:48 CST 2021
Module: wine
Branch: master
Commit: 4cb6334b1bd5de08a0e27d1c4f7feb33ae6c0dd9
URL: https://source.winehq.org/git/wine.git/?a=commit;h=4cb6334b1bd5de08a0e27d1c4f7feb33ae6c0dd9
Author: Rémi Bernon <rbernon at 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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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();
More information about the wine-cvs
mailing list