http://bugs.winehq.org/show_bug.cgi?id=18571
Summary: Top level window loses focus when selecting a menu item Product: Wine Version: 1.1.21 Platform: Other OS/Version: other Status: NEW Severity: normal Priority: P2 Component: user32 AssignedTo: wine-bugs@winehq.org ReportedBy: thunderbird2k@gmail.com
Hi,
For a couple of days I have been trying to locate a bug in a program I'm working. The program itself is written in Smalltalk using Visualworks. Under the hood Visualworks is doing all win32 gui drawing itself (it also works on other platforms).
The program in question has a top level window on which a win32 interface is drawn including a menu bar. Clicking on the menu bar inactivates the top level window. I have been debugging it for some days and I think it is somehow related to SetFocus. Disabling all SetFocus / SetForegroundWindow calls in user32 appears to make the issue disappear. The app itself only calls SetFocus but Wine itself makes SetForegroundWindow calls.
The menu window has WS_POPUP and WS_DISABLED set (the top level window also has WS_DISABLED set). Further Alexandre suspects there is something wrong with the focus handling code in case of WM_MOUSEACTIVATE.
I have uploaded a test app which illustrates the problem to: (note the server isn't always online) http://roderick.student.utwente.nl/menutest.tar.gz I have also attached a log of +win,+msg to here. The app window is called 'vwnt'.
Regards, Roderick