-
Bug
-
Resolution: Fixed
-
P4
-
7
-
b27
-
x86
-
linux
-
Not verified
reading insets-related code I've noticed some minor issues which should be corrected to make the code a little bit
clearer.
- XDialogPeer and XFramePeer overrides guessInsets() to separatly handle undecorated case.
but recently isTargetUndecorated() has been moved to XDecoratedPeer, so this special case can be also moved
to XDecoratedPeer.
- XWindowPeer has field wm_set_insets and several methods to work with it. But it doesn't use this field,
only XDecoratedPeer uses. It looks like the only reason why we do have this field in XWindowPeer is that
XWindowPeer had overriden handlePropertyNotify(XEvent) method at the time the field was added.
So, I've moved this field and all methods which work with it to XDecoratedPeer.
- XWindowPeer has field insets, but it only initialize it to (0, 0, 0, 0) and create copy of it in getInsets()
only XDecoratedPeer uses this field. So we can safely move the field to XDecoratedPeer.
- after moving insets field to XDecoratedPeer I've noticed that there is another field "currentInsets" which keeps
the same value as insets. So I've removed insets (because it is easier to fined currentInsets :)
- as code clean up I've made private as many insets-related methods as possible (also I've mode some of them
static)
- also in handleCorrectInsets() I've noticed strange comment:
340 /*
341 * Actual insets account for menubar/warning label,
342 * so we can't assign directly but must adjust them.
343 */
but actually we do keep just insets (w/o menubar and warnign label)
So, I've removed it and simplified the code (now we can just assign insets instead of adjusting them)
- (this one is not about insets, but about unused code)
I've noticed atom resize_request (_SUN_AWT_RESIZE_REQUEST) which is used in handleClientMessage()
but we do not send such message at all. According the history it was added in early days of XAWT and
in those days we sent the message. But sending message had been removed long time ago, it looks like
it is a good time to reome rest of that stuff.
clearer.
- XDialogPeer and XFramePeer overrides guessInsets() to separatly handle undecorated case.
but recently isTargetUndecorated() has been moved to XDecoratedPeer, so this special case can be also moved
to XDecoratedPeer.
- XWindowPeer has field wm_set_insets and several methods to work with it. But it doesn't use this field,
only XDecoratedPeer uses. It looks like the only reason why we do have this field in XWindowPeer is that
XWindowPeer had overriden handlePropertyNotify(XEvent) method at the time the field was added.
So, I've moved this field and all methods which work with it to XDecoratedPeer.
- XWindowPeer has field insets, but it only initialize it to (0, 0, 0, 0) and create copy of it in getInsets()
only XDecoratedPeer uses this field. So we can safely move the field to XDecoratedPeer.
- after moving insets field to XDecoratedPeer I've noticed that there is another field "currentInsets" which keeps
the same value as insets. So I've removed insets (because it is easier to fined currentInsets :)
- as code clean up I've made private as many insets-related methods as possible (also I've mode some of them
static)
- also in handleCorrectInsets() I've noticed strange comment:
340 /*
341 * Actual insets account for menubar/warning label,
342 * so we can't assign directly but must adjust them.
343 */
but actually we do keep just insets (w/o menubar and warnign label)
So, I've removed it and simplified the code (now we can just assign insets instead of adjusting them)
- (this one is not about insets, but about unused code)
I've noticed atom resize_request (_SUN_AWT_RESIZE_REQUEST) which is used in handleClientMessage()
but we do not send such message at all. According the history it was added in early days of XAWT and
in those days we sent the message. But sending message had been removed long time ago, it looks like
it is a good time to reome rest of that stuff.
- relates to
-
JDK-6805897 Gap present between the choice and its drop down list in Jdk 7 build for a non resizable frame.
-
- Closed
-