JDK-6761532 : Request for API to determine if requesting focus across windows is supported.
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2008-10-20
  • Updated: 2011-01-21
  • Resolved: 2008-10-23
Related Reports
Relates :  
Description
The second paragraph of the "Requesting Focus" section of the Focus Spec at http://java.sun.com/javase/6/docs/api/java/awt/doc-files/FocusSpec.html#RequestingFocus states: "The request will also be denied if the Component's top-level Window is not the focused Window and the platform does not support requesting focus across Windows."

We would like to see an API added to JDK 7 to determine if requesting focus across windows is supported.

Comments
EVALUATION Some clarification. Restrictions on requesting focus may rather concern some particular cases defined by a platform. For instance, MS Window 2K and higher doesn't allow to request focus to a window not belonging to the process the requesting thread belongs to. Thus, with this in mind I think that the API in question doesn't make sense. FYI, the officially supported platforms (Windows, Linux+Gnome, Solaris+Gnome) do allow to transfer focus b/w toplevels belonging to _the same process_.
23-10-2008

EVALUATION This is an interesting RFE but AFAIK there is no reliable ways to query if the underlying OS can or can not transfer focus between two separate windows. Moreover, Windows can't do that so the FocusSpec sounds a bit obsolete. We already have a CR against that statement: 6693961: cross-window focus transfer ability in the Focus Spec should be revised That implies spec change only. I'd say this RFE should be closed with because of the existance of 6693961 and assumed technical restrictions.
22-10-2008