if (layout != null) layout.layout (this, false);
if (layout != null) { markLayout (false, false); updateLayout (false); }
public void setVisible (boolean visible) {	checkWidget();	realizeWidget ();	/* Show the shell */	if (visible) {		sendEvent (SWT.Show);		if (isDisposed ()) return;		/* Map the widget */		OS.XtSetMappedWhenManaged (shellHandle, true);		if (OS.XtIsTopLevelShell (shellHandle)) {			OS.XtMapWidget (shellHandle);		} else {			OS.XtPopup (shellHandle, OS.XtGrabNone);		}				/*		* Force the shell to be fully exposed before returning.		* This ensures that the shell coordinates are correct		* when queried directly after showing the shell.		* 		* Note that if the parent is minimized or withdrawn		* from the desktop, this should not be done since		* the shell will not be mapped until the parent is		* unminimized or shown on the desktop.		*/		boolean iconic = false;		Shell shell = parent != null ? parent.getShell() : null;		do {			display.update ();			if (isDisposed ()) return;			iconic = minimized || (shell != null && shell.minimized);		} while (!isVisible () && !iconic);		if (!iconic) adjustTrim ();				int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.APPLICATION_MODAL;		if ((style & mask) != 0) {			OS.XUngrabPointer (display.xDisplay, OS.CurrentTime);		}		if (!moved) {			moved = true;			Point location = getLocation ();			oldX = location.x + trimLeft ();			oldY = location.x + trimTop ();			sendEvent (SWT.Move);			if (isDisposed ()) return;		}		if (!resized) {			resized = true;			Point size = getSize ();			oldWidth = size.x - trimWidth ();			oldHeight = size.y - trimHeight ();			sendEvent (SWT.Resize);			if (isDisposed ()) return;			if (layout != null) layout.layout (this, false);		}	} else {			/* Hide the shell */		OS.XtSetMappedWhenManaged (shellHandle, false);		if (OS.XtIsTopLevelShell (shellHandle)) {			OS.XtUnmapWidget (shellHandle);		} else {			OS.XtPopdown (shellHandle);		}			/* If the shell is iconified, hide the icon */		int xDisplay = OS.XtDisplay (shellHandle);		if (xDisplay == 0) return;		int xWindow = OS.XtWindow (shellHandle);		if (xWindow == 0) return;		OS.XWithdrawWindow (xDisplay, xWindow, OS.XDefaultScreen (xDisplay));			sendEvent (SWT.Hide);	}}