diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java index 13e26aa318e..9b9150031df 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java @@ -1726,10 +1726,15 @@ public Object getLayoutData () { } /** - * Returns a point describing the receiver's location relative - * to its parent in points (or its display if its parent is null), unless - * the receiver is a shell. In this case, the point is - * relative to the display. + * Returns a point describing the receiver's location relative to its parent in + * points (or its display if its parent is null), unless the receiver is a + * shell. In this case, the point is usually relative to the display. + *
+ * Warning: When executing this operation on a shell, it may not yield a + * value with the expected meaning on some platforms. For example, executing + * this operation on a shell when the environment uses the Wayland protocol, the + * result is not a coordinate relative to the display. It will not change + * when moving the shell. * * @return the receiver's location * @@ -3974,11 +3979,14 @@ public void setLayoutData (Object layoutData) { } /** - * Sets the receiver's location to the point specified by - * the arguments which are relative to the receiver's - * parent (or its display if its parent is null), unless - * the receiver is a shell. In this case, the point is - * relative to the display. + * Sets the receiver's location to the point specified by the arguments which + * are relative to the receiver's parent (or its display if its parent is null), + * unless the receiver is a shell. In this case, the point is relative to the + * display. + *
+ * Warning: When executing this operation on a shell, it may not have the + * intended effect on some platforms. For example, executing this operation on a + * shell when the environment uses the Wayland protocol, nothing will happen. * * @param x the new x coordinate for the receiver * @param y the new y coordinate for the receiver @@ -3994,11 +4002,14 @@ public void setLocation (int x, int y) { } /** - * Sets the receiver's location to the point specified by - * the arguments which are relative to the receiver's - * parent (or its display if its parent is null), unless - * the receiver is a shell. In this case, the point is - * relative to the display. + * Sets the receiver's location to the point specified by the argument which + * is relative to the receiver's parent (or its display if its parent is null), + * unless the receiver is a shell. In this case, the point is relative to the + * display. + *
+ * Warning: When executing this operation on a shell, it may not have the + * intended effect on some platforms. For example, executing this operation on a + * shell when the environment uses the Wayland protocol, nothing will happen. * * @param location the new location for the receiver * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java index 7a87db4125b..751601c8a2d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java @@ -1215,10 +1215,15 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize } /** - * Returns a point describing the receiver's location relative - * to its parent in points (or its display if its parent is null), unless - * the receiver is a shell. In this case, the point is - * relative to the display. + * Returns a point describing the receiver's location relative to its parent in + * points (or its display if its parent is null), unless the receiver is a + * shell. In this case, the point is usually relative to the display. + *
+ * Warning: When executing this operation on a shell, it may not yield a + * value with the expected meaning on some platforms. For example, executing + * this operation on a shell when the environment uses the Wayland protocol, the + * result is not a coordinate relative to the display. It will not change + * when moving the shell. * * @return the receiver's location * @@ -1247,11 +1252,14 @@ Point getLocationInPixels () { } /** - * Sets the receiver's location to the point specified by - * the arguments which are relative to the receiver's - * parent (or its display if its parent is null), unless - * the receiver is a shell. In this case, the point is - * relative to the display. + * Sets the receiver's location to the point specified by the argument which + * is relative to the receiver's parent (or its display if its parent is null), + * unless the receiver is a shell. In this case, the point is relative to the + * display. + *
+ * Warning: When executing this operation on a shell, it may not have the + * intended effect on some platforms. For example, executing this operation on a + * shell when the environment uses the Wayland protocol, nothing will happen. * * @param location the new location for the receiver * @@ -1274,11 +1282,14 @@ void setLocationInPixels (Point location) { } /** - * Sets the receiver's location to the point specified by - * the arguments which are relative to the receiver's - * parent (or its display if its parent is null), unless - * the receiver is a shell. In this case, the point is - * relative to the display. + * Sets the receiver's location to the point specified by the arguments which + * are relative to the receiver's parent (or its display if its parent is null), + * unless the receiver is a shell. In this case, the point is relative to the + * display. + *
+ * Warning: When executing this operation on a shell, it may not have the + * intended effect on some platforms. For example, executing this operation on a + * shell when the environment uses the Wayland protocol, nothing will happen. * * @param x the new x coordinate for the receiver * @param y the new y coordinate for the receiver diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java index 03c32a4c72d..53f74792919 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java @@ -1350,10 +1350,15 @@ public Object getLayoutData () { } /** - * Returns a point describing the receiver's location relative - * to its parent in points (or its display if its parent is null), unless - * the receiver is a shell. In this case, the point is - * relative to the display. + * Returns a point describing the receiver's location relative to its parent in + * points (or its display if its parent is null), unless the receiver is a + * shell. In this case, the point is usually relative to the display. + *
+ * Warning: When executing this operation on a shell, it may not yield a + * value with the expected meaning on some platforms. For example, executing + * this operation on a shell when the environment uses the Wayland protocol, the + * result is not a coordinate relative to the display. It will not change + * when moving the shell. * * @return the receiver's location * @@ -3486,11 +3491,14 @@ public void setLayoutData (Object layoutData) { } /** - * Sets the receiver's location to the point specified by - * the arguments which are relative to the receiver's - * parent (or its display if its parent is null), unless - * the receiver is a shell. In this case, the point is - * relative to the display. + * Sets the receiver's location to the point specified by the arguments which + * are relative to the receiver's parent (or its display if its parent is null), + * unless the receiver is a shell. In this case, the point is relative to the + * display. + *
+ * Warning: When executing this operation on a shell, it may not have the + * intended effect on some platforms. For example, executing this operation on a + * shell when the environment uses the Wayland protocol, nothing will happen. * * @param x the new x coordinate for the receiver * @param y the new y coordinate for the receiver @@ -3514,11 +3522,14 @@ void setLocationInPixels (int x, int y) { } /** - * Sets the receiver's location to the point specified by - * the arguments which are relative to the receiver's - * parent (or its display if its parent is null), unless - * the receiver is a shell. In this case, the point is - * relative to the display. + * Sets the receiver's location to the point specified by the argument which + * is relative to the receiver's parent (or its display if its parent is null), + * unless the receiver is a shell. In this case, the point is relative to the + * display. + *
+ * Warning: When executing this operation on a shell, it may not have the + * intended effect on some platforms. For example, executing this operation on a + * shell when the environment uses the Wayland protocol, nothing will happen. * * @param location the new location for the receiver *