Ignore FocusOut event if there is no event window

Dmitry Timoshkov dmitry at baikal.ru
Wed Sep 29 04:28:16 CDT 2004


without this patch message test sometimes fails for me due to spurious
SetForegroundWindow(0) calls from EVENT_FocusOut(). In that case hwnd
in EVENT_FocusOut is equal to 0 and there is nothing to do. FocusIn event
handler already does this check.

    Dmitry Timoshkov <dmitry at codeweavers.com>
    Ignore FocusOut event if there is no event window.

--- cvs/hq/wine/dlls/x11drv/event.c	2004-08-15 17:11:17.000000000 +0900
+++ wine/dlls/x11drv/event.c	2004-09-29 18:06:17.000000000 +0900
@@ -532,6 +532,8 @@ static void EVENT_FocusOut( HWND hwnd, X
     int revert;
     XIC xic;
+    if (!hwnd) return;
     TRACE( "win %p xwin %lx detail=%s\n", hwnd, event->window, focus_details[event->detail] );
     if (event->detail == NotifyPointer) return;

More information about the wine-patches mailing list