Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeronika Irvine2003-10-09 14:08:10 +0000
committerVeronika Irvine2003-10-09 14:08:10 +0000
commita959887f174f4144d37a926f5bfc7eb1053a5590 (patch)
treefa861611f5bb1743af34f8c0ed47f75a637d10f1
parentbda14a700445b7c7c5bd638f13c6ce6966d823cf (diff)
downloadeclipse.platform.swt-a959887f174f4144d37a926f5bfc7eb1053a5590.tar.gz
eclipse.platform.swt-a959887f174f4144d37a926f5bfc7eb1053a5590.tar.xz
eclipse.platform.swt-a959887f174f4144d37a926f5bfc7eb1053a5590.zip
*** empty log message ***
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java66
1 files changed, 32 insertions, 34 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java
index 338ef7df5e..671a00f2c7 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java
@@ -1163,40 +1163,6 @@ boolean setBounds (int x, int y, int width, int height, boolean move, boolean re
if (isFocus) caret.setFocus ();
return move || resize;
}
-
-/**
- * Sets the shape of the shell to the region specified
- * by the argument. A null region will restore the default shape.
- * Shell must be created with the style SWT.NO_TRIM.
- *
- * @param rgn the region that defines the shape of the shell
- *
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- *
- * @since 3.0
- *
- */
-public void setRegion (Region region) {
- checkWidget ();
- if ((style & SWT.NO_TRIM) == 0) return;
- OS.XtSetMappedWhenManaged (shellHandle, false);
- OS.XtRealizeWidget (shellHandle);
- int xDisplay = OS.XtDisplay (shellHandle);
- if (xDisplay == 0) return;
- int xWindow = OS.XtWindow (shellHandle);
- if (xWindow == 0) return;
- if (region != null) {
- OS.XShapeCombineRegion (xDisplay, xWindow, OS.ShapeBounding, 0, 0, region.handle, OS.ShapeSet);
- OS.XShapeCombineRegion (xDisplay, xWindow, OS.ShapeClip, 0, 0, region.handle, OS.ShapeSet);
- } else {
- OS.XShapeCombineMask (xDisplay, xWindow, OS.ShapeBounding, 0, 0, 0, OS.ShapeSet);
- OS.XShapeCombineMask (xDisplay, xWindow, OS.ShapeClip, 0, 0, 0, OS.ShapeSet);
- }
- this.region = region;
-}
public void setMinimized (boolean minimized) {
checkWidget();
if (minimized == this.minimized) return;
@@ -1247,6 +1213,38 @@ public void setMinimized (boolean minimized) {
void setParentTraversal () {
/* Do nothing - Child shells do not affect the traversal of their parent shell */
}
+/**
+ * Sets the shape of the shell to the region specified
+ * by the argument. A null region will restore the default shape.
+ * Shell must be created with the style SWT.NO_TRIM.
+ *
+ * @param rgn the region that defines the shape of the shell
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.0
+ *
+ */
+public void setRegion (Region region) {
+ checkWidget ();
+ if ((style & SWT.NO_TRIM) == 0) return;
+ if (!OS.XtIsRealized (shellHandle)) realizeWidget ();
+ int xDisplay = OS.XtDisplay (shellHandle);
+ if (xDisplay == 0) return;
+ int xWindow = OS.XtWindow (shellHandle);
+ if (xWindow == 0) return;
+ if (region != null) {
+ OS.XShapeCombineRegion (xDisplay, xWindow, OS.ShapeBounding, 0, 0, region.handle, OS.ShapeSet);
+ OS.XShapeCombineRegion (xDisplay, xWindow, OS.ShapeClip, 0, 0, region.handle, OS.ShapeSet);
+ } else {
+ OS.XShapeCombineMask (xDisplay, xWindow, OS.ShapeBounding, 0, 0, 0, OS.ShapeSet);
+ OS.XShapeCombineMask (xDisplay, xWindow, OS.ShapeClip, 0, 0, 0, OS.ShapeSet);
+ }
+ this.region = region;
+}
public void setText (String string) {
checkWidget();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);

Back to the top