Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI - Jaguar "invisible window" problem solved



"Adam Wilt" <email@hidden> wrote:

> setLocation(-999, -999); // so we don't see it flash onscreen

That may not be off-screen if there's more than one display connected. I
mention this because a friend has a dual-monitor setup (dual-headed
video-card) with a couple of big LCD displays scanning at 1152 x
someBigHeight.


>What I found was happening on OS X 10.2 was that even though the
>centerWindow() call succeeded -- asking the window for its coordinates
>showed to be centered on screen -- the actual window was still at
>-999,-999 as far as the OS was concerned. If I changed the setLocation
>call to 0,0, that's where the window often appeared, even though it still
>claimed to be centered.
>
>Moving the centerWindow() call outside of the constructor, to just before
>the show() call, seems to keep Java and the OS in sync.

Interesting bug. I'd definitely file a bug-report for it. Be sure to
mention the work-around, as it might help an Apple engineer trace down
exactly where the problem lies.

One thing I've noticed with 10.2 Java's default of hwaccel enabled is that
it seems to cause certain kinds of problems in initialization of
Components. Specifically, in constructors or Applet.start(), method-calls
that should result in certain things happening are not happening. In my
case, an Applet.start() implementation creates and starts a daemon Thread
that triggers repaints using repaint(). On 10.2 with hwaccel enabled, that
initial repaint() is frequently lost in the Twilight Zone, but with hwaccel
disabled it never gets lost. Losing that repaint request can cause
deadlock for my applet because the daemon producer thread is synchronized
to the update() method called from the event-dispatch thread. I ended up
adding a failsafe timeout to the producer's wait() call.

This isn't the only thing I've seen that didn't do it's initial display
correctly in 10.2 Java. It's just an example (from Miasma) where I was
able to compensate for something that can't happen.

Anyway, I was just thinking:
Did you try your invisible window problematic code with hwaccel disabled?

-- GG
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.