JDK-2192229 : switching TAB in a browser doesn't deactivate EmbeddedFrame
  • Type: Backport
  • Backport of: JDK-6867293
  • Component: client-libs
  • Sub-Component: java.awt
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2010-04-27
  • Updated: 2011-05-17
  • Resolved: 2011-05-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u18Fixed 7 b112Fixed
Description
See main CR.

Comments
SUGGESTED FIX --- a/src/windows/native/sun/windows/awt_Window.h Thu Sep 02 12:17:21 2010 -0700 +++ b/src/windows/native/sun/windows/awt_Window.h Fri Sep 03 11:08:41 2010 +0400 @@ -1,5 +1,5 @@ /* - * 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. * * This code is free software; you can redistribute it and/or modify it @@ -193,12 +193,17 @@ public: // Execute on Toolkit only. INLINE static LRESULT SynthesizeWmActivate(BOOL doActivate, HWND targetHWnd, HWND oppositeHWnd) { - if (::IsWindowVisible(targetHWnd)) { - return ::SendMessage(targetHWnd, WM_ACTIVATE, - MAKEWPARAM(doActivate ? WA_ACTIVE : WA_INACTIVE, FALSE), - (LPARAM) oppositeHWnd); + if (doActivate && + (!::IsWindowVisible(targetHWnd) || ::IsIconic(::GetAncestor(targetHWnd, GA_ROOT)))) + { + // 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 */
03-09-2010

EVALUATION The fix should be very similar to the fix in the main CR. The only difference is in SynthesizeWmActivate that was transferred to awt_Window.h
27-04-2010