Opening a swing frame after exiting fullscreen

Hi,

I have another question. I’m switching out of fullscreen, waiting for the drawthread to finish (always stops in <100ms) and then i show a normal swing frame. i have 2 problems.

when coming back to fullscreenmode i show the fullscreen window, hide the swing frame, and start the draw thread. for some reason, they fight eachother for focus first then the swing frame goes. even though i call a toFront on the fullscreen window

when i start up the swing frame, it usually takes ~4-5 seconds to show up, can i speed this up any. from my debug messages i see that it called it, and ~5secs it shows up, all that time, the desktop is visible.

and sometimes, it doesn’t refresh the swing frame, oddly enough, till you mouseover. but fullscreenmode has been already terminated.

I hope you do show/hide on the EDT - that way they have a better chance to
be sequential.

I would suggest not to mess with focus yourself (like doing toFront() and stuff) -
we do that already and you touching it may interfere.

Just hide your swing window (again, from the edt) - you can also dispose()
it and make visible later, then enter FS with your fullscreen frame.
To exit do the opposite, exit FS mode (either setFSW(null) or
fsw.dispose(), on the edt), then hide your fs window, then show
your swing frame.

You are using Frame’s, not windows, right?

Dmitri

Yes, i’ using Frames and now windows, I changed it to always work on the edt, but didn’t really make a difference. still see the flikkering of the desktop background when switching

it’s not worth having 2 different instances between FSmode and Wmode, one instance can be from either side switched back to the other side. Because if two different instances use the same resources on the EDT for graphics, occasional visual artefacts can arise. That’s the deal up to you to make switching FS-Win on the same peer component…

for instance, try with a simple JButton to display it on both peers and you can see the button disapears on either peer ! :-X