# HG changeset patch # User dcherepanov # Date 1302188074 -14400 # Node ID d3e9a8fecd4fa6ce437d4a6f5e99e92da3f89455 # Parent 9818b5bb47b02d3de97ada7e3a89ec0be6ac363d 7016889: GraphicsDevice.setFullScreenWindow() spec for simulated full-screen mode is not always correct Reviewed-by: art, anthony diff -r 9818b5bb47b0 -r d3e9a8fecd4f jdk/src/share/classes/java/awt/GraphicsDevice.java --- a/jdk/src/share/classes/java/awt/GraphicsDevice.java Wed Apr 06 17:13:08 2011 +0400 +++ b/jdk/src/share/classes/java/awt/GraphicsDevice.java Thu Apr 07 18:54:34 2011 +0400 @@ -243,8 +243,10 @@ * a non-client of the input method framework. * *

- * Simulated full-screen mode resizes - * the window to the size of the screen and positions it at (0,0). + * The simulated full-screen mode places and resizes the window to the maximum + * possible visible area of the screen. However, the native windowing system + * may modify the requested geometry-related data, so that the {@code Window} object + * is placed and sized in a way that corresponds closely to the desktop settings. *

* When entering full-screen mode, if the window to be used as a * full-screen window is not visible, this method will make it visible. diff -r 9818b5bb47b0 -r d3e9a8fecd4f jdk/src/share/classes/java/awt/Window.java --- a/jdk/src/share/classes/java/awt/Window.java Wed Apr 06 17:13:08 2011 +0400 +++ b/jdk/src/share/classes/java/awt/Window.java Thu Apr 07 18:54:34 2011 +0400 @@ -870,6 +870,11 @@ * are automatically enlarged if either is less than * the minimum size as specified by previous call to * {@code setMinimumSize}. + *

+ * The method changes the geometry-related data. Therefore, + * the native windowing system may ignore such requests, or it may modify + * the requested data, so that the {@code Window} object is placed and sized + * in a way that corresponds closely to the desktop settings. * * @see #getSize * @see #setBounds @@ -887,6 +892,11 @@ * are automatically enlarged if either is less than * the minimum size as specified by previous call to * {@code setMinimumSize}. + *

+ * The method changes the geometry-related data. Therefore, + * the native windowing system may ignore such requests, or it may modify + * the requested data, so that the {@code Window} object is placed and sized + * in a way that corresponds closely to the desktop settings. * * @see #getSize * @see #setBounds @@ -898,6 +908,32 @@ } /** + * {@inheritDoc} + *

+ * The method changes the geometry-related data. Therefore, + * the native windowing system may ignore such requests, or it may modify + * the requested data, so that the {@code Window} object is placed and sized + * in a way that corresponds closely to the desktop settings. + */ + @Override + public void setLocation(int x, int y) { + super.setLocation(x, y); + } + + /** + * {@inheritDoc} + *

+ * The method changes the geometry-related data. Therefore, + * the native windowing system may ignore such requests, or it may modify + * the requested data, so that the {@code Window} object is placed and sized + * in a way that corresponds closely to the desktop settings. + */ + @Override + public void setLocation(Point p) { + super.setLocation(p); + } + + /** * @deprecated As of JDK version 1.1, * replaced by setBounds(int, int, int, int). */ @@ -3147,6 +3183,11 @@ * placed at the left side of the screen. The similar placement * will occur if both top and bottom edges are out of the screen. * In that case, the window is placed at the top side of the screen. + *

+ * The method changes the geometry-related data. Therefore, + * the native windowing system may ignore such requests, or it may modify + * the requested data, so that the {@code Window} object is placed and sized + * in a way that corresponds closely to the desktop settings. * * @param c the component in relation to which the window's location * is determined @@ -3395,6 +3436,11 @@ * are automatically enlarged if either is less than * the minimum size as specified by previous call to * {@code setMinimumSize}. + *

+ * The method changes the geometry-related data. Therefore, + * the native windowing system may ignore such requests, or it may modify + * the requested data, so that the {@code Window} object is placed and sized + * in a way that corresponds closely to the desktop settings. * * @see #getBounds * @see #setLocation(int, int) @@ -3424,6 +3470,11 @@ * will be automatically enlarged if either is less than * the minimum size as specified by previous call to * {@code setMinimumSize}. + *

+ * The method changes the geometry-related data. Therefore, + * the native windowing system may ignore such requests, or it may modify + * the requested data, so that the {@code Window} object is placed and sized + * in a way that corresponds closely to the desktop settings. * * @see #getBounds * @see #setLocation(int, int)