Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jdk17u
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
einsteinathome
openjdk
jdk17u
Commits
dfd8fdc3
Commit
dfd8fdc3
authored
Mar 15, 2016
by
Semyon Sadetsky
Browse files
Options
Downloads
Patches
Plain Diff
8143295: Validating issue in AWT
Reviewed-by: serb, alexsch
parent
01983638
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java
+0
-3
0 additions, 3 deletions
jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java
jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java
+25
-17
25 additions, 17 deletions
...rc/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java
with
25 additions
and
20 deletions
jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java
+
0
−
3
View file @
dfd8fdc3
...
@@ -1008,13 +1008,10 @@ class XWindow extends XBaseWindow implements X11ComponentPeer {
...
@@ -1008,13 +1008,10 @@ class XWindow extends XBaseWindow implements X11ComponentPeer {
// if ( Check if it's a resize, a move, or a stacking order change )
// if ( Check if it's a resize, a move, or a stacking order change )
// {
// {
Rectangle
bounds
=
getBounds
();
Rectangle
bounds
=
getBounds
();
final
ComponentAccessor
acc
=
AWTAccessor
.
getComponentAccessor
();
if
(!
bounds
.
getSize
().
equals
(
oldBounds
.
getSize
()))
{
if
(!
bounds
.
getSize
().
equals
(
oldBounds
.
getSize
()))
{
acc
.
setSize
(
target
,
bounds
.
width
,
bounds
.
height
);
postEventToEventQueue
(
new
ComponentEvent
(
getEventSource
(),
ComponentEvent
.
COMPONENT_RESIZED
));
postEventToEventQueue
(
new
ComponentEvent
(
getEventSource
(),
ComponentEvent
.
COMPONENT_RESIZED
));
}
}
if
(!
bounds
.
getLocation
().
equals
(
oldBounds
.
getLocation
()))
{
if
(!
bounds
.
getLocation
().
equals
(
oldBounds
.
getLocation
()))
{
acc
.
setLocation
(
target
,
bounds
.
x
,
bounds
.
y
);
postEventToEventQueue
(
new
ComponentEvent
(
getEventSource
(),
ComponentEvent
.
COMPONENT_MOVED
));
postEventToEventQueue
(
new
ComponentEvent
(
getEventSource
(),
ComponentEvent
.
COMPONENT_MOVED
));
}
}
// }
// }
...
...
This diff is collapsed.
Click to expand it.
jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java
+
25
−
17
View file @
dfd8fdc3
/*
/*
* Copyright (c) 2002, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 201
5
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -803,23 +803,31 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
...
@@ -803,23 +803,31 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
*/
*/
@Override
@Override
public
void
handleConfigureNotifyEvent
(
XEvent
xev
)
{
public
void
handleConfigureNotifyEvent
(
XEvent
xev
)
{
assert
(
SunToolkit
.
isAWTLockHeldByCurrentThread
());
XConfigureEvent
xe
=
xev
.
get_xconfigure
();
XConfigureEvent
xe
=
xev
.
get_xconfigure
();
/*
if
(
insLog
.
isLoggable
(
PlatformLogger
.
Level
.
FINE
))
{
* Correct window location which could be wrong in some cases.
insLog
.
fine
(
xe
.
toString
());
* See getNewLocation() for the details.
}
*/
checkIfOnNewScreen
(
toGlobal
(
new
Rectangle
(
scaleDown
(
xe
.
get_x
()),
Point
newLocation
=
getNewLocation
(
xe
,
0
,
0
);
scaleDown
(
xe
.
get_y
()),
xe
.
set_x
(
scaleUp
(
newLocation
.
x
));
xe
.
set_y
(
scaleUp
(
newLocation
.
y
));
checkIfOnNewScreen
(
new
Rectangle
(
newLocation
.
x
,
newLocation
.
y
,
scaleDown
(
xe
.
get_width
()),
scaleDown
(
xe
.
get_width
()),
scaleDown
(
xe
.
get_height
())));
scaleDown
(
xe
.
get_height
()))));
Rectangle
oldBounds
=
getBounds
();
x
=
scaleDown
(
xe
.
get_x
());
y
=
scaleDown
(
xe
.
get_y
());
width
=
scaleDown
(
xe
.
get_width
());
height
=
scaleDown
(
xe
.
get_height
());
// Don't call super until we've handled a screen change. Otherwise
if
(!
getBounds
().
getSize
().
equals
(
oldBounds
.
getSize
()))
{
// there could be a race condition in which a ComponentListener could
AWTAccessor
.
getComponentAccessor
().
setSize
(
target
,
width
,
height
);
// see the old screen.
postEvent
(
new
ComponentEvent
(
target
,
ComponentEvent
.
COMPONENT_RESIZED
));
super
.
handleConfigureNotifyEvent
(
xev
);
}
if
(!
getBounds
().
getLocation
().
equals
(
oldBounds
.
getLocation
()))
{
AWTAccessor
.
getComponentAccessor
().
setLocation
(
target
,
x
,
y
);
postEvent
(
new
ComponentEvent
(
target
,
ComponentEvent
.
COMPONENT_MOVED
));
}
repositionSecurityWarning
();
repositionSecurityWarning
();
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment