[PATCH v2] winex11.drv: Stop assuming that GenericEvent has a window.
Rémi Bernon
rbernon at codeweavers.com
Mon Feb 15 05:38:27 CST 2021
It doesn't, and we then lookup HWND from an invalid Window value.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
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();
--
2.30.0
More information about the wine-devel
mailing list