mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 21:56:40 +00:00
- Send the WM_ACTIVATE message with WA_INACTIVE when deactivating window to the window being deactivated (ie. revert last w3seek's change).
- Send the deactivation messages *before* setting the active window for message queue. svn path=/trunk/; revision=11808
This commit is contained in:
parent
1623a0079f
commit
077765450f
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Id: focus.c,v 1.25 2004/11/24 00:11:06 weiden Exp $
|
* $Id: focus.c,v 1.26 2004/11/25 22:18:59 navaraf Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <w32k.h>
|
#include <w32k.h>
|
||||||
|
@ -53,7 +53,7 @@ IntSendDeactivateMessages(HWND hWndPrev, HWND hWnd)
|
||||||
if (hWndPrev)
|
if (hWndPrev)
|
||||||
{
|
{
|
||||||
IntPostOrSendMessage(hWndPrev, WM_NCACTIVATE, FALSE, 0);
|
IntPostOrSendMessage(hWndPrev, WM_NCACTIVATE, FALSE, 0);
|
||||||
IntPostOrSendMessage(hWnd, WM_ACTIVATE,
|
IntPostOrSendMessage(hWndPrev, WM_ACTIVATE,
|
||||||
MAKEWPARAM(WA_INACTIVE, NtUserGetWindowLong(hWndPrev, GWL_STYLE, FALSE) & WS_MINIMIZE),
|
MAKEWPARAM(WA_INACTIVE, NtUserGetWindowLong(hWndPrev, GWL_STYLE, FALSE) & WS_MINIMIZE),
|
||||||
(LPARAM)hWnd);
|
(LPARAM)hWnd);
|
||||||
}
|
}
|
||||||
|
@ -174,6 +174,9 @@ IntSetForegroundAndFocusWindow(PWINDOW_OBJECT Window, PWINDOW_OBJECT FocusWindow
|
||||||
|
|
||||||
/* FIXME: Call hooks. */
|
/* FIXME: Call hooks. */
|
||||||
|
|
||||||
|
IntSendDeactivateMessages(hWndPrev, hWnd);
|
||||||
|
IntSendKillFocusMessages(hWndFocusPrev, hWndFocus);
|
||||||
|
|
||||||
IntSetFocusMessageQueue(Window->MessageQueue);
|
IntSetFocusMessageQueue(Window->MessageQueue);
|
||||||
IntLockMessageQueue(Window->MessageQueue);
|
IntLockMessageQueue(Window->MessageQueue);
|
||||||
if (Window->MessageQueue)
|
if (Window->MessageQueue)
|
||||||
|
@ -188,12 +191,11 @@ IntSetForegroundAndFocusWindow(PWINDOW_OBJECT Window, PWINDOW_OBJECT FocusWindow
|
||||||
}
|
}
|
||||||
IntUnLockMessageQueue(FocusWindow->MessageQueue);
|
IntUnLockMessageQueue(FocusWindow->MessageQueue);
|
||||||
|
|
||||||
IntSendDeactivateMessages(hWndPrev, hWnd);
|
|
||||||
IntSendKillFocusMessages(hWndFocusPrev, hWndFocus);
|
|
||||||
if (PrevForegroundQueue != Window->MessageQueue)
|
if (PrevForegroundQueue != Window->MessageQueue)
|
||||||
{
|
{
|
||||||
/* FIXME: Send WM_ACTIVATEAPP to all thread windows. */
|
/* FIXME: Send WM_ACTIVATEAPP to all thread windows. */
|
||||||
}
|
}
|
||||||
|
|
||||||
IntSendSetFocusMessages(hWndFocusPrev, hWndFocus);
|
IntSendSetFocusMessages(hWndFocusPrev, hWndFocus);
|
||||||
IntSendActivateMessages(hWndPrev, hWnd, MouseActivate);
|
IntSendActivateMessages(hWndPrev, hWnd, MouseActivate);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue