http://bugs.winehq.org/show_bug.cgi?id=11026
--- Comment #5 from Dmitry Timoshkov dmitry@codeweavers.com 2008-01-04 22:48:14 --- (In reply to comment #4)
win 0x10024 is the parent window, and 0x10028 is the tool window. In either case, the parent window has focus, so it's correctly receiving the WM_DELETE_WINDOW event.
You said that when "you start typing, the letters go into the keywords window", that means that the keyboard input focus is set to the tool window. But on Alt+F4 key presses (which should be sent to the tool window as well) WM sends WM_DELETE_WINDOW to a parent.