Bring Java windows into foreground when dragging over them
Mike Swingler
swingler at apple.com
Fri Jan 3 17:02:03 PST 2014
On Jan 3, 2014, at 10:13 AM, David DeHaven <david.dehaven at oracle.com> wrote:
>
>> when I drag something over a Finder window that is partially in the
>> background it automatically brings itself in the background after a
>> short delay. Is this something I have to specifically program into my
>> Java application or is there some global flag/property to activate
>> this behavior or anything else I have to know to achieve this
>> properly?
>
> I don't think that's a "free" behavior. It's possible the DnD handlers in Finder are just pushing the target window to the front after the delay.
>
> You should be able to do the same by calling Frame.toFront() after some delay.
This is not standard AppKit behavior, but rather, standard Carbon / Classic Mac OS behavior. At this point, Finder is simply emulating this behavior programmatically. As David says, Frame.toFront() should do the right thing in this case.
Regards,
Mike Swingler
Apple Inc.
More information about the macosx-port-dev
mailing list