System.out.println("setVisible loop end");
public void setVisible (boolean visible) {	checkWidget();	if ((OS.GTK_WIDGET_MAPPED (shellHandle) == visible)) return;	if (visible) {		sendEvent (SWT.Show);		if (isDisposed ()) return;		/*		* In order to ensure that the shell is visible		* and fully painted, dispatch events such as		* GDK_MAP and GDK_CONFIGURE, until the GDK_MAP		* event for the shell is received.		* 		* Note that if the parent is minimized or withdrawn		* from the desktop, this should not be done since		* the shell not will be mapped until the parent is		* unminimized or shown on the desktop.		*/		mapped = false;		OS.gtk_widget_show (shellHandle);		if (isDisposed ()) return;		display.dispatchEvents = new int [] {			OS.GDK_EXPOSE,			OS.GDK_FOCUS_CHANGE,			OS.GDK_CONFIGURE,			OS.GDK_MAP,			OS.GDK_UNMAP,			OS.GDK_NO_EXPOSE,		};		Display display = this.display;		display.putGdkEvents();		boolean iconic = false;		Shell shell = parent != null ? parent.getShell() : null;		System.out.println("setVisible loop start");		do {			OS.g_main_context_iteration (0, false);			if (isDisposed ()) break;			iconic = minimized || (shell != null && shell.minimized);		} while (!mapped && !iconic);		System.out.println("setVisible loop end");		display.dispatchEvents = null;		if (isDisposed ()) return;		if (!iconic) {			update (true);			if (isDisposed ()) return;			adjustTrim ();		}		mapped = true;		int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL;		if ((style & mask) != 0) {			OS.gdk_pointer_ungrab (OS.GDK_CURRENT_TIME);		}		opened = true;		if (!moved) {			moved = true;			Point location = getLocation();			oldX = location.x;			oldY = location.y;			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) {				markLayout (false, false);				updateLayout (false);			}		}	} else {			OS.gtk_widget_hide (shellHandle);		sendEvent (SWT.Hide);	}}