Waow, thanks for the quick response !
Yes it seems like to obvious cause. I have added a JIRA, PIVOT-781 as
you suggested.
Cheers,
Tomas
On 07/31/2011 02:55 PM, Chris Bartlett wrote:
Java bug 6365898 - fixed in Java 7
http://download.java.net/jdk7/changes/jdk7-b14.html
This looks like it should be the right URL, but it is not bringing anything up
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6365898
Google has it cached though
http://www.google.com/search?q=site%3Abugs.sun.com+6365898
If the workaround is as simple as it seems to be, then I think it
would be worth including along with a reference to the bug and a TODO
to remove it once Java 7 is more established, or if Pivot later
requires Java 7.
On 31 July 2011 19:32, Chris Bartlett<[email protected]> wrote:
The problem seems to be because the call to
Frame.setExtendedState(int) happens before the Frame is visible.
This doesn't seem to have an effect on my Ubuntu test system, but it
does with my Windows one. (Not sure if it is the OS or the JRE)
Feel free to add a new ticket to JIRA
https://issues.apache.org/jira/browse/PIVOT
A simple fix might just be to make 2 calls to Frame.setExtendedState(int)
The first call would occur before the Frame is made visible. This is
the current behaviour and could remain unchanged. This works on
Windows and possibly other OSes, and means that the Frame starts in a
maximized state rather than opening and then resizing.
The second call could occur after after the Frame has been made
visible. This should have no effect on a Frame that is already
maximized (as appears to be the case when running on Windows), but
would ensure that the --maximized startup property works.
Chris
On 31 July 2011 18:56, Chris Bartlett<[email protected]> wrote:
Tomas,
I see the same thing when on a virtual machine running the same
version of Ubuntu& JRE as you.
All of the other Pivot desktop properties seem to be read and parsed
OK, so I don't think that side of things is a problem.
Once Pivot has parsed the '--maximized' property as 'true' it will
attempt to make the AWT Frame maximized using
http://download.oracle.com/javase/6/docs/api/java/awt/Frame.html#setExtendedState(int)
In the Javadocs for that method it states ...
'Note that if the state is not supported on a given platform, nothing
will happen. The application may determine if a specific state is
available via the java.awt.Toolkit#isFrameStateSupported(int state)
method.'
I'll try to have a look shortly to see what this combination of Ubuntu
& JRE actually returns when passed
Toolkit.isFrameStateSupported(java.awt.Frame.MAXIMIZED_BOTH);
Chris
Chris
On 31 July 2011 17:24, Tomas Stenlund<[email protected]> wrote:
Hi everyone,
I'm having trouble with the --maximized=true flag when running my Pivot
(Pivot 2.0) Application as a desktop application. The maximized flag does
not seem to take any effect when I run it on Ubuntu but it works on Windows
7. The fullScreen flag works in both environments. Is this a known issue, or
am I missing something here ?
I was trying to search for something in the issue database but it only shows
the addition of this parameter.
I'm running on Ubuntu 11.04 (2.6.38-10-generic) on java-6-sun-1.6.0.26. On
Windows 7 I'm using the same version of the JVM.
Cheers,
Tomas