[PROBLEM REPORT] Focus problem for mdi children
Mdi child window activation is broken since ChangeSet ID: 10050857000162942344322801 CVSROOT: /opt/cvs-commit Module name: wine Changes by: julliard(a)wine2. 01/11/06 17:28:20 Modified files: dlls/ttydrv : wnd.c dlls/x11drv : winpos.c include : winpos.h windows : message.c winpos.c Log message: Window activation cleanups. The change that broke it is : --- /opt/cvs-commit/wine/dlls/x11drv/winpos.c 2001/10/22 19:08:34 1.31 +++ /opt/cvs-commit/wine/dlls/x11drv/winpos.c 2001/11/06 22:28:19 1.32 @@ -955,8 +955,7 @@ ShowCaret(winpos->hwnd); } - if (!(winpos->flags & SWP_NOACTIVATE)) - WINPOS_ChangeActiveWindow( winpos->hwnd, FALSE ); + if (!(winpos->flags & SWP_NOACTIVATE)) SetActiveWindow( winpos->hwnd ); /* And last, send the WM_WINDOWPOSCHANGED message */ Cause of the problem : the WM_CHILDACTIVATE message is not sent anymore, so the mdi children are not activated (caption does not change color, more annoyingly the active child is not set). The problem can be seen with Eudora or ForteFreeAgent. 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 :-) Gerard
participants (1)
-
Gerard Patel