Re: [PROBLEM REPORT] Focus problem for mdi children
*Doesn't this fix the problem in Word where if you have multiple documents open and you switch between them, you can't use the menu bar any longer?* ------------------------------------------------------------------------------- * From:* Alexandre Julliard (/ julliard(a)winehq.com/ <mailto:julliard(a)winehq.com?Subject=Re:%20%5BPROBLEM%20REPORT%5D%20Focus%20problem%20for%20mdi%20children&In-Reply-To=%3C87wv129jiq.fsf(a)mail.wine.dyndns.org%3E> ) *Date:* Wed Nov 07 2001 - 19:46:37 EST * ** Gerard Patel <gerard.patel(a)nerim.net <mailto:gerard.patel(a)nerim.net?Subject=Re:%20%5BPROBLEM%20REPORT%5D%20Focus%20problem%20for%20mdi%20children&In-Reply-To=%3C87wv129jiq.fsf(a)mail.wine.dyndns.org%3E>> writes:
Using this patch : --- winpos.c.orig Wed Nov 7 10:41:32 2001 +++ winpos.c Thu Nov 8 00:44:29 2001 @@ -955,7 +955,20 @@ ShowCaret(winpos->hwnd); }
- if (!(winpos->flags & SWP_NOACTIVATE)) SetActiveWindow( winpos->hwnd ); + if (!(winpos->flags & SWP_NOACTIVATE)) + { + SetActiveWindow( winpos->hwnd ); + if (!(wndPtr = WIN_FindWndPtr(winpos->hwnd))) return FALSE; + + /* child windows get WM_CHILDACTIVATE message */ + if( (wndPtr->dwStyle & (WS_CHILD | WS_POPUP)) == WS_CHILD ) + { + WIN_ReleaseWndPtr(wndPtr); + SendMessageA(winpos->hwnd, WM_CHILDACTIVATE, 0, 0L); + } + else + WIN_ReleaseWndPtr(wndPtr); + }
/* And last, send the WM_WINDOWPOSCHANGED message */
seems to fix the problem. It may be too simple though :-)
No actually it's pretty much the right thing. I have applied a slightly simplified version of your patch, thanks for the report. -- Alexandre Julliard julliard(a)winehq.com <mailto:julliard(a)winehq.com?Subject=Re:%20%5BPROBLEM%20REPORT%5D%20Focus%20problem%20for%20mdi%20children&In-Reply-To=%3C87wv129jiq.fsf(a)mail.wine.dyndns.org%3E> -- //------------------------------------------ Michael Cardenas Software Engineer Lindows.com, Inc. http://www.lindows.com 858-410-5950 619-972-8153 //------------------------------------------- --
participants (1)
-
Michael Cardenas