[PROBLEM REPORT] Focus problem for mdi children
Michael Cardenas
michaelc at lindows.com
Thu Nov 29 23:35:31 CST 2001
*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 at winehq.com/
<mailto:julliard at winehq.com?Subject=Re:%20%5BPROBLEM%20REPORT%5D%20Focus%20problem%20for%20mdi%20children&In-Reply-To=%3C87wv129jiq.fsf at mail.wine.dyndns.org%3E>
)
*Date:* Wed Nov 07 2001 - 19:46:37 EST
*
**
Gerard Patel <gerard.patel at nerim.net <mailto:gerard.patel at nerim.net?Subject=Re:%20%5BPROBLEM%20REPORT%5D%20Focus%20problem%20for%20mdi%20children&In-Reply-To=%3C87wv129jiq.fsf at 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 at winehq.com <mailto:julliard at winehq.com?Subject=Re:%20%5BPROBLEM%20REPORT%5D%20Focus%20problem%20for%20mdi%20children&In-Reply-To=%3C87wv129jiq.fsf at mail.wine.dyndns.org%3E>
--
//------------------------------------------
Michael Cardenas
Software Engineer
Lindows.com, Inc.
http://www.lindows.com
858-410-5950
619-972-8153
//-------------------------------------------
--
More information about the wine-devel
mailing list