When embedding a Java frame into system windows, using e.g. sun.awt.windows.WEmbeddedFrame or sun.awt.motif.MEmbeddedFrame, the resulting container can be sized, but not moved. That is, setPosSize() changes only the size of the embedded frame, not the position. And setLocation() does nothing at all.
Do I understand correctly that you need to call this method from outside of EmbeddedFrame(on its instace)
and when you know actuall class of the embedded frame(MEmbeddedFrame, for ex.)?
For backward compatibility I think we should create a protected method so that descendants are able to
make public method for changing location. I don't think changing setLocation is safe since the applet run
inside the frame might call setLocation. On other side, setLocation already works well in AppletViewer.
BTW, what is setPosSize method you mention? I don't see such a method in our code.
I tried to make necessary changes to XAWT to allow setLocation for EmbeddedFrame but it doesn't work
in Mozilla due to some reason. It looks like it bounces us back to the same location/size as we were initially.
And after that EF reports very strange size/location in Java. So it seems that solution should be made
specifically for the case of embedding into StarOffice, and later it might be extended to other cases.
Do you have a test we can use to work on the fix?
Yes, that's correct. A protected method will do for us, only that we need it also on WEmbeddedFrame. Sorry for the setPosSize confusion, meant setBounds (we've a setPosSize at an awt::XWindow, thus the error). Regarding a testcase: that will get rather involved, because one would need a full developer build of StarOffice. If you _really_ need one, I could mock something up, but this will of course require some effort on my side.
Ok, I have created a pretty decent testcase for this. Also I took out the code
from XAWT that prevents the location from being set for EmbeddedFrame. But I
suspect that this is not possible on Motif without causing a few regressions.
See 4652685 and 4419207. The testcase I have works great with XAWT. So It might
be that we can only fix this with XAWT. I also need to test on Windows.
I tested the setLocation on windows as well, it works well on windows as well.
I am attaching the testcases.
Informed submitter that the bug can only be fixed on XAWT and Win32. They are OK with it.