Hi, Alexander.
The fix looks fine.
On 20.05.15 18:59, Alexander Scherbatiy wrote:
On 5/15/2015 2:30 PM, Sergey Bylokhov wrote:
Hi, Alexander.
A few notes:
- _peer.setMaximizedBounds(_peer.getMaximizedBounds()); this line
looks odd, probably we can call updateMaximizedBounds in
LWWindowPeer. initializeImpl()?
- Do we need to call maximize(); in the initialize() or we can leave
it in the setVisible()? It seems that after we set
NSWindowStandardFrame isZoomed should work properly in the callback?
- Why we cannot return DefaultMaximizedBounds from the
getMaximizedBounds if it was not set? Then it will not be necessary
to check it to null everywhere.
- Can we call updateMaximizedBounds(); in
LWWindowPeer.displayChanged() only in case of new device?
Could you review the updated fix:
http://cr.openjdk.java.net/~alexsch/8065739/webrev.05
The fix has been updated according to the comments.
Thanks,
Alexandr.
On 14.05.15 12:40, Alexander Scherbatiy wrote:
On 5/12/2015 4:44 PM, Alexander Scherbatiy wrote:
Could you review the updated fix:
- maximized bounds are updated after switching to new screen if
they are not set by a user
- the test for the maximized window moved from one screen to
another is added
Sorry. Just forgot to add the webrev link:
http://cr.openjdk.java.net/~alexsch/8065739/webrev.04/
Thanks,
Alexandr.
Thanks,
Alexandr.
On 5/8/2015 3:42 PM, Sergey Bylokhov wrote:
Hi, Alexander.
Does the new tests cover all corner cases which we discussed offline?
On 08.05.15 15:28, Alexander Scherbatiy wrote:
Hello,
Could you review the updated fix:
http://cr.openjdk.java.net/~alexsch/8065739/webrev.03
- The -windowWillUseStandardFrame:defaultFrame: method is
implemented in AWTWindow to correctly get and check a size of the
maximized window.
After that the -isZoomed method correctly defines the zoomed
state for both visible and not visible window.
Thanks,
Alexandr.
On 4/29/2015 7:03 PM, Alexander Scherbatiy wrote:
Hello,
Could you review the updated fix:
http://cr.openjdk.java.net/~alexsch/8065739/webrev.02
- the zoom state is applied after NSWindow creation if Frame
has MAXIMIZED_BOTH state.
Thanks,
Alexandr.
On 4/15/2015 10:57 PM, Sergey Bylokhov wrote:
Hi, Alexander.
As far as I understand the main issue is that we get a native
notifications during window initialization(after nswindows was
created and before zoom method will be called)? Probably we can
apply the zoom state when we create a window in one appkit call?
On 08.04.15 17:54, Alexander Scherbatiy wrote:
Hello,
Could you review the fix:
bug: https://bugs.openjdk.java.net/browse/JDK-8065739
webrev: http://cr.openjdk.java.net/~alexsch/8065739/webrev.00
Use case:
------------
Frame frame = new Frame();
frame.pack();
frame.setBounds(screenBounds);
frame.setVisible(true);
------------
The frame is in the normal state but Mac OS X treats a frame
with screen bounds as zoomed.
The setVisible() method calls unmaximize() method to return
the zoomed window to the normal state.
The native zoom() method sets the initial sizes for the
window which are zero because of the pack() call.
There is already checkZoom() method which synchronizes
native window zoom state and and the frame extended state when
a frame is resized by mouse.
However it can't be always used for the synchronization
between native window zoom state and setBounds() call because
of the following case:
-----------------
Frame frame = new Frame();
frame.setBounds(smallBounds);
frame.setExtendedState(Frame.MAXIMIZED_BOTH);
frame.setVisible(true);
-----------------
This is the valid scenario where the frame should be maximized.
The solution synchronizes the zoom and the frame state only
when the native window is zoomed.
In opposite case we need to return from the zoomed sizes to
previous sizes which are the same as for the zoomed window.
Thanks,
Alexandr.
--
Best regards, Sergey.
--
Best regards, Sergey.