mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-18 06:15:16 +00:00
6709453: (dav)Screen flickers when a JFrame switches to fullscreen mode
Reviewed-by: art, dcherepanov
This commit is contained in:
parent
efca767f82
commit
92db57255d
@ -30,6 +30,7 @@ import java.awt.GraphicsDevice;
|
||||
import java.awt.GraphicsConfiguration;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.awt.DisplayMode;
|
||||
import java.awt.EventQueue;
|
||||
import java.awt.Frame;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.Window;
|
||||
@ -610,11 +611,18 @@ public class Win32GraphicsDevice extends GraphicsDevice implements
|
||||
*
|
||||
* @param w full-screen window
|
||||
*/
|
||||
protected void addFSWindowListener(Window w) {
|
||||
protected void addFSWindowListener(final Window w) {
|
||||
// Note: even though we create a listener for Window instances of
|
||||
// fs windows they will not receive window events.
|
||||
fsWindowListener = new Win32FSWindowAdapter(this);
|
||||
w.addWindowListener(fsWindowListener);
|
||||
|
||||
// Fix for 6709453. Using invokeLater to avoid listening
|
||||
// for the events already posted to the queue.
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
w.addWindowListener(fsWindowListener);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user