Skip to main content

panoramic background problem...

13 replies [Last post]
ccamacho
Offline
Joined: 2006-06-06

Dear All,

I don't know if I have something going wrong here or if there is something wrong on LG3D, but when I use the panoramic background and I open 2 or more windows in the same "desktop" I can't move the window from behind to the front and vice versa (it seems to be something wrong with the bringToFront funtion) , besides I can't park the windows using the small arrows on the right top corner of my windows. This happens to any part of the background (left or right of the main one) of the panoramic view that is not the default one (the one where the LG3D starts when I select some image as background). Is anyone experimenting this behaviour? Is it possible to solve this?

Thank you for your help.

Cheers,

ccamacho

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
amirsadig
Offline
Joined: 2004-07-01

I have install a fresh linux (elive) and installed jdk (latest) and java3d (latest) daily build

and then download LG3D 1.0 linux binary (without jdk+java3d)

I can't reproduce those issue no more. but moving window to front is not working propebly.
example
open 2 xterm and if the move one to the top it will interface with other one. so you see like it hasn't move.
after small investigation. it appear to be in the Zspace of the ZLayeredMovableLayout which is set on StandardAppContainer. increasing Zspacing let this issue disappear.
this a Java3D issue I think.

if you tried CVS, try to download the branch/version rel_1-0-0 as HEAD include some deronj HACKS for Wonderland.

-Amir

Message was edited by: amirsadig

ccamacho
Offline
Joined: 2006-06-06

I have followed what you said and installed jdk (latest) and java3d (latest) daily build and the problems are still there. None of the issues disappear for me.

I have also checked the Zspacing that you mentioned before, but no changes happened after increasing it.

Could you be a little bit more explicit about the CVS version that you recommend to download. I couldn't find any rel_1-0-0 branch.

I think that the problem is something else. Why does it just appears on the sections of the panoramic background that are not the main one (the one where LG3D starts).

Thanks for you help.

Amir Bukhari

can you describe how do you reproduce this issue?

i will try to investigate on it on sunday.

for cvs I use normaly eclipse and I can choose which branch or version
to use. with command line I don't use it for getting branch as I use
the HEAD directly.

here you can browse:
https://lg3d-core.dev.java.net/source/browse/lg3d-core/?only_with_tag=re...

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
For additional commands, e-mail: interest-help@lg3d.dev.java.net

Amir Bukhari

moving 3D App like CDviewer or Help to front, does it work allways. or
this issue occure only with X11 Apps?

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
For additional commands, e-mail: interest-help@lg3d.dev.java.net

Amir Bukhari

OK i found something which case why on panorama background the move to
front not working .
to understand this:
for each backgounds a StandardAppContainer is create and initialized.
oninitialization it register listener to MouseClickEvents and so it
can move Frame3D to front.
##################################################################
connector.addListener(Frame3D.class,
new MouseClickedEventAdapter(
new GenericEventPostAction(Component3DToFrontEvent.class)));

connector.addListener(Thumbnail.class,
new MouseClickedEventAdapter(
new ActionNoArg() {
public void performAction(LgEventSource source) {
assert(source instanceof Thumbnail);
Thumbnail thumbnail = (Thumbnail)source;
Frame3D body = thumbnail.getBody();
assert(body != null);
body.postEvent(new Component3DToFrontEvent());
}
}));

connector.addListener(Frame3D.class,
new Component3DToFrontEventAdapter(
new ActionComponent3D() {
public void performAction(LgEventSource source,
Component3D sibling) {
assert(source instanceof Frame3D);
// FIXME -- the sibling argument is not
treated fully yet.
// The following condifion check is for fixing
Issue 418.
if (sibling == null) {
// perform the migration only when a "strong"
// to-front event is issued.
migrationAction.performAction(source);
}
Frame3D f3d = (Frame3D)source;
if (mainContainer.rearrangeChildLayout(f3d, null)) {
// do nothing for now...
}
}
}));

connector.addListener(Frame3D.class,
new GenericEventAdapter(Component3DToBackEvent.class,
new ActionNoArg() {
public void performAction(LgEventSource source) {
assert(source instanceof Frame3D);
Frame3D f3d = (Frame3D)source;
if (mainContainer.rearrangeChildLayout(f3d,
Integer.MAX_VALUE)) {
// do nothing for now...
}
}
}));
################################

now someone (I don't know who) define this static boolean:
private static boolean first = true;

to avoid reinitializing the event registering more than one on the
same AppContainer. the SceneManager call initialize() on each
getAppContainer() when the returned Appcontainer not is the current
one.

################
// FIXME -- be careful when adding global listeners to this
// container, since this container can get instantiated multiple times,
// that can result in duplicated actions. This 'first' static boolean
// is a short-term workaround to avoid such a situation.
if (first) {
first = false;
#################

this cased the other StandardAppContainer, which get created after the
first when, not to register events on the system and this cased the
issue with moveToFront not to work.

I cleaner way is to define the boolea not as static, so each instance
of AppContainer register its eventadapter.
we see in the source that those event listner use the global variables
like "mainContainer" ... thus each instance need to register those
listener.

try to remove static from first and compile it again.
IT WORKED WITH ME.

this only for the MoveToFront issue.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
For additional commands, e-mail: interest-help@lg3d.dev.java.net

Amir Bukhari

soryy:
the SceneManager call initialize() only on the first time the
AppContainer created.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
For additional commands, e-mail: interest-help@lg3d.dev.java.net

ccamacho
Offline
Joined: 2006-06-06

I have followed your suggestion and now it works.

Thanks a lot

ccamacho

Amir Bukhari

cool.

I will fix this issue in a cleaner we. can you file an issue on this.
so that I can use it when i commit the new code

-Amir

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
For additional commands, e-mail: interest-help@lg3d.dev.java.net

Amir Bukhari

here is patch which I will commit tomorrow:

#####################

Index: StandardAppContainer.java
===================================================================
RCS file: /cvs/lg3d-core/src/classes/org/jdesktop/lg3d/scenemanager/utils/appcontainer/StandardAppContainer.java,v
retrieving revision 1.29
diff -r1.29 StandardAppContainer.java
22a23,24
> import java.util.Enumeration;
>
76c78
< private static final float zSpacing = 0.02f;
---
> private static final float zSpacing = 0.05f;
100a103,108
> private Component3DManualMoveEventAdapter component3DManualMoveEventAdapter = null;
> private Component3DToFrontEventAdapter moveToFrontAdapter = null;
> private GenericEventAdapter moveToBackAdapter = null;
> private GenericEventAdapter component3DSideMigrationLeft = null;
> private GenericEventAdapter component3DGestureMoveRight = null;
>
114a123,183
> private void initEvenitListeners () {
> LgEventConnector connector = LgEventConnector.getLgEventConnector();
> /** Handle Gesture events */
> component3DSideMigrationLeft = new GenericEventAdapter(Component3DGestureMoveLeftEvent.class,
> new Component3DSideMigrationLeftAction(this,
> leftsideContainer));
>
> component3DGestureMoveRight = new GenericEventAdapter(Component3DGestureMoveRightEvent.class,
> new Component3DSideMigrationRightAction(this,
> rightsideContainer));
> /** End Gesture events */
>
>
>
> final Component3DMigrationAction migrationAction = new Component3DMigrationAction(
> new Container3D[] {
> shelfViewContainerL,
> shelfViewContainerR,
> leftsideContainer,
> rightsideContainer },
> this);
>
> if (parkAtSideByMoving) {
> component3DManualMoveEventAdapter = new Component3DManualMoveEventAdapter(
> new BooleanToNoArgConverter(false,
> new ComponentSideMigrationAction(this,
> leftsideContainer, rightsideContainer)));
> }
>
>
> moveToFrontAdapter = new Component3DToFrontEventAdapter(
> new ActionComponent3D() {
> public void performAction(LgEventSource source, Component3D sibling) {
> assert(source instanceof Frame3D);
> // FIXME -- the sibling argument is not treated fully yet.
> // The following condifion check is for fixing Issue 418.
> if (sibling == null) {
> // perform the migration only when a "strong"
> // to-front event is issued.
> migrationAction.performAction(source);
> }
> Frame3D f3d = (Frame3D)source;
> if (StandardAppContainer.this.rearrangeChildLayout(f3d, null)) {
> // do nothing for now...
> }
> }
> });
>
> moveToBackAdapter = new GenericEventAdapter(Component3DToBackEvent.class,
> new ActionNoArg() {
> public void performAction(LgEventSource source) {
> assert(source instanceof Frame3D);
> Frame3D f3d = (Frame3D)source;
> if (StandardAppContainer.this.rearrangeChildLayout(f3d, Integer.MAX_VALUE)) {
> // do nothing for now...
> }
> }
> });
>
> }
>
173,176c242,246
< // FIXME -- be careful when adding global listeners to this
< // container, since this container can get instantiated
multiple times,
< // that can result in duplicated actions. This 'first' static boolean
< // is a short-term workaround to avoid such a situation.
---
> connector.addListener(Frame3D.class,
> new MouseClickedEventAdapter(
> new GenericEventPostAction(Component3DToFrontEvent.class)));
>
> // the following event need to be registered only once as they post events into the system.
178c248
< first = false;
---
> first = false;
180c250,260
< if (parkAtSideByMoving) {
---
> connector.addListener(Thumbnail.class,
> new MouseClickedEventAdapter(
> new ActionNoArg() {
> public void performAction(LgEventSource source) {
> assert(source instanceof Thumbnail);
> Thumbnail thumbnail = (Thumbnail)source;
> Frame3D body = thumbnail.getBody();
> assert(body != null);
> body.postEvent(new Component3DToFrontEvent());
> }
> }));
182,185c262,275
< new Component3DManualMoveEventAdapter(
< new BooleanToNoArgConverter(false,
< new ComponentSideMigrationAction(mainContainer,
< leftsideContainer, rightsideContainer))));
---
> new MouseEnteredEventAdapter(
> new ActionBoolean() {
> public void performAction(LgEventSource source, boolean flag) {
> assert(source instanceof Frame3D);
> Frame3D f3d = (Frame3D)source;
> VisualAppearanceType appearance
> = (flag)?(VisualAppearanceType.HIGHLIGHT):(VisualAppearanceType.NORMAL);
> f3d.postEvent(new Component3DVisualAppearanceEvent(appearance));
> Thumbnail tn = f3d.getThumbnail();
> if (tn != null) {
> tn.postEvent(new Component3DVisualAppearanceEvent(appearance));
> }
> }
> }));
186a277
> initEvenitListeners ();
188,273d278
< /** Handle Gesture events */
< connector.addListener(Frame3D.class,
< new GenericEventAdapter(Component3DGestureMoveLeftEvent.class,
< new Component3DSideMigrationLeftAction(mainContainer,
< leftsideContainer)));
<
< connector.addListener(Frame3D.class,
< new GenericEventAdapter(Component3DGestureMoveRightEvent.class,
< new Component3DSideMigrationRightAction(mainContainer,
< rightsideContainer)));
< /** End Gesture events */
<
< connector.addListener(Frame3D.class,
< new MouseClickedEventAdapter(
< new GenericEventPostAction(Component3DToFrontEvent.class)));
<
< connector.addListener(Thumbnail.class,
< new MouseClickedEventAdapter(
< new ActionNoArg() {
< public void performAction(LgEventSource source) {
< assert(source instanceof Thumbnail);
< Thumbnail thumbnail = (Thumbnail)source;
< Frame3D body = thumbnail.getBody();
< assert(body != null);
< body.postEvent(new Component3DToFrontEvent());
< }
< }));
<
< final Component3DMigrationAction migrationAction
< = new Component3DMigrationAction(
< new Container3D[] {
< shelfViewContainerL,
< shelfViewContainerR,
< leftsideContainer,
< rightsideContainer},
< mainContainer);
<
< connector.addListener(Frame3D.class,
< new Component3DToFrontEventAdapter(
< new ActionComponent3D() {
< public void performAction(LgEventSource source,
Component3D sibling) {
< assert(source instanceof Frame3D);
< // FIXME -- the sibling argument is not
treated fully yet.
< // The following condifion check is for
fixing Issue 418.
< if (sibling == null) {
< // perform the migration only when a "strong"
< // to-front event is issued.
< migrationAction.performAction(source);
< }
< Frame3D f3d = (Frame3D)source;
< if (mainContainer.rearrangeChildLayout(f3d, null)) {
< // do nothing for now...
< }
< }
< }));
<
< connector.addListener(Frame3D.class,
< new GenericEventAdapter(Component3DToBackEvent.class,
< new ActionNoArg() {
< public void performAction(LgEventSource source) {
< assert(source instanceof Frame3D);
< Frame3D f3d = (Frame3D)source;
< if (mainContainer.rearrangeChildLayout(f3d,
Integer.MAX_VALUE)) {
< // do nothing for now...
< }
< }
< }));
<
< connector.addListener(Frame3D.class,
< new MouseEnteredEventAdapter(
< new ActionBoolean() {
< public void performAction(LgEventSource source,
boolean flag) {
< assert(source instanceof Frame3D);
< Frame3D f3d = (Frame3D)source;
< VisualAppearanceType appearance
< =
(flag)?(VisualAppearanceType.HIGHLIGHT):(VisualAppearanceType.NORMAL);
< f3d.postEvent(new
Component3DVisualAppearanceEvent(appearance));
< Thumbnail tn = f3d.getThumbnail();
< if (tn != null) {
< tn.postEvent(new
Component3DVisualAppearanceEvent(appearance));
< }
< }
< }));
<
< } // end of if (first)
<
322a328,335
> LgEventConnector connector = LgEventConnector.getLgEventConnector();
> if (parkAtSideByMoving) {
> connector.addListener(frame3d, component3DManualMoveEventAdapter);
> }
> connector.addListener(frame3d, component3DSideMigrationLeft);
> connector.addListener(frame3d, component3DGestureMoveRight);
> connector.addListener(frame3d, moveToFrontAdapter);
> connector.addListener(frame3d, moveToBackAdapter);
334a348,365
> Enumeration enumeration = this.getAllChildren();
> if (enumeration.hasMoreElements()) {
> Component3D c3d = (Component3D)enumeration.nextElement();
> }
>
> LgEventConnector connector = LgEventConnector.getLgEventConnector();
> if (parkAtSideByMoving) {
> connector.removeListener(frame3d, component3DManualMoveEventAdapter);
> }
> connector.removeListener(frame3d, component3DSideMigrationLeft);
> connector.removeListener(frame3d, component3DGestureMoveRight);
> connector.removeListener(frame3d, moveToFrontAdapter);
> connector.removeListener(frame3d, moveToBackAdapter);
>
> if (this.getAllChildren().hasMoreElements()) {
> Component3D c3d = (Component3D)this.getAllChildren().nextElement();
> rearrangeChildLayout(c3d, null);
> }

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
For additional commands, e-mail: interest-help@lg3d.dev.java.net

Amir Bukhari

Yes,
I can reproduce this.

>Is it possible to solve this?
surely it is possible. I got time I will see what happend, but you can
try also. this will give you a good start on LG3D source code.

-Amir

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
For additional commands, e-mail: interest-help@lg3d.dev.java.net

hideya
Offline
Joined: 2003-07-22

Hi Amir,

> surely it is possible. I got time I will see what happened, but you can
> try also. this will give you a good start on LG3D source code.

Thanks always for your willingness to help out the project!

ccamacho,

If you are a developer, it would be great if you could collaborate with Amir.
He especially has deep understanding of the X11 integration and the Scene Manager
(== 3D Window Manager).

hideya

ccamacho
Offline
Joined: 2006-06-06

Sure, I have been trying, but without any success till now... lately I have been a little bit busy, but I'll try to work on this on my free time...

ccamacho

hideya
Offline
Joined: 2003-07-22

Hi ccamacho,

Thanks for reporting the issue.

LG3Ders,

Can you folks reproduce the issue?

I just changed the company I work for and spending a bit hectic days. Because of tricky complicated situation, I lost my LG3D build environment and it will take some time for me to build one (first of all, I need to buy a machine!). I would appreciate any support from LG3D forum members to help out ccamacho.
Thanks in advance!

hideya