[Bug 27190] Incorrect focus and Alt+Tab order with Delphi MDI application

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Jul 3 11:40:14 CDT 2011


http://bugs.winehq.org/show_bug.cgi?id=27190

--- Comment #3 from Jarek <jarekczek at poczta.onet.pl> 2011-07-03 11:40:13 CDT ---
Mateus, together we're getting closer and closer to it :)
With your simple application and
WINEDEBUG=+message wine Project1.exe
I discovered that set_active_window (dlls/user32/focus.c) is called twice while
it should be called only once.

Here's the output of

CHAR szWnd[200];
GetWindowTextA(hwnd, szWnd, 199);
printf("//BS set_active_window %s %lu (prev %lu, prevAct %lu)\n", szWnd, hwnd,
prev ? *prev : 0, previous);

put at the beginning of set_active_window

Proper behaviour (mouse activation):
//BS set_active_window Form1 853072 (prev 0, prevAct 0)

Bogus behaviour (keyboard activation)
//BS set_active_window Project1 853094 (prev 0, prevAct 0)
//BS set_active_window Form1 853072 (prev 0, prevAct 853094)

When the second activation is executed, kill focus is send to Project1 window
and we're struck :(

And what's interesting even the initial sequence of activation creates ill
state with the main window out of focus. Here's the log:
//BS set_active_window Form1 853072 (prev 0, prevAct 0)
//BS set_active_window Form1 853072 (prev 0, prevAct 853072)
//BS set_active_window Project1 853094 (prev 0, prevAct 853072)
//BS set_active_window Form1 853072 (prev 0, prevAct 853094)

At the moment I'm tired and let up. I'll come to it back later if no one fixes
that.

What I'm afraid of is that it may be hard to correct. I remember Jack having
problems with getting out of visibility when switching windows through Alt-tab.
It was corrected like a year ago. If less windows get activated, some apps may
become invisible again.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list