提交 efdd622b 编写于 作者: A ant

6867293: switching TAB in a browser doesn't deactivate EmbeddedFrame

Reviewed-by: dcherepanov, art
上级 f01e9ecf
/* /*
* Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -193,12 +193,17 @@ public: ...@@ -193,12 +193,17 @@ public:
// Execute on Toolkit only. // Execute on Toolkit only.
INLINE static LRESULT SynthesizeWmActivate(BOOL doActivate, HWND targetHWnd, HWND oppositeHWnd) { INLINE static LRESULT SynthesizeWmActivate(BOOL doActivate, HWND targetHWnd, HWND oppositeHWnd) {
if (::IsWindowVisible(targetHWnd)) { if (doActivate &&
return ::SendMessage(targetHWnd, WM_ACTIVATE, (!::IsWindowVisible(targetHWnd) || ::IsIconic(::GetAncestor(targetHWnd, GA_ROOT))))
MAKEWPARAM(doActivate ? WA_ACTIVE : WA_INACTIVE, FALSE), {
(LPARAM) oppositeHWnd); // The activation is rejected if either:
// - The toplevel is not visible
// - The toplevel (or its embedder) is minimised
return 1;
} }
return 1; // if not processed return ::SendMessage(targetHWnd, WM_ACTIVATE,
MAKEWPARAM(doActivate ? WA_ACTIVE : WA_INACTIVE, FALSE),
(LPARAM) oppositeHWnd);
} }
void moveToDefaultLocation(); /* moves Window to X,Y specified by Window Manger */ void moveToDefaultLocation(); /* moves Window to X,Y specified by Window Manger */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册