Buggy code:
void adjustTrim ( ) { } void bringToTop ( boolean force ) { } void checkBorder ( ) { } void checkOpen ( ) { } public void close ( ) { } void closeWidget ( ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } void createHandle ( int index ) { } Composite findDeferredControl ( ) { } boolean hasBorder ( ) { } void hookEvents ( ) { } public boolean isEnabled ( ) { } public boolean isVisible ( ) { } void register ( ) { } void releaseParent ( ) { } int topHandle ( ) { } int filterProc ( int xEvent , int gdkEvent , int data ) { } void fixShell ( Shell newShell , Control control ) { } void forceResize ( ) { } void forceResize ( int width , int height ) { } public Point getLocation ( ) { } public Point getMinimumSize ( ) { } public Point getSize ( ) { } public boolean getVisible ( ) { } public Region getRegion ( ) { } public int getImeInputMode ( ) { } Shell _getShell ( ) { } public Shell [ ] getShells ( ) { } int gtk_configure_event ( int widget , int event ) { } int gtk_delete_event ( int widget , int event ) { } int gtk_enter_notify_event ( int widget , int event ) { } int gtk_focus ( int widget , int directionType ) { } int gtk_move_focus ( int widget , int directionType ) { } int gtk_focus_in_event ( int widget , int event ) { } int gtk_focus_out_event ( int widget , int event ) { } int gtk_map_event ( int widget , int event ) { } int gtk_size_allocate ( int widget , int allocation ) { } int gtk_realize ( int widget ) { } int gtk_unmap_event ( int widget , int event ) { } int gtk_window_state_event ( int widget , int event ) { } public void open ( ) { } public void removeShellListener ( ShellListener listener ) { } public void setActive ( ) { } void setActiveControl ( Control control ) { } void resizeBounds ( int width , int height , boolean notify ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize ) { } void setCursor ( int cursor ) { } public void setEnabled ( boolean enabled ) { } public void setImeInputMode ( int mode ) { } void setInitialBounds ( ) { } public void setMaximized ( boolean maximized ) { } public void setMenuBar ( Menu menu ) { } public void setMinimized ( boolean minimized ) { } public void setMinimumSize ( int width , int height ) { } public void setMinimumSize ( Point size ) { } public void setRegion ( Region region ) { } public void setText ( String string ) { } public void setVisible ( boolean visible ) { checkWidget ( ) ; if ( ( OS . GTK_WIDGET_MAPPED ( shellHandle ) ) == visible ) return ; if ( visible ) { sendEvent ( Show ) ; if ( isDisposed ( ) ) return ; 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 ; do { OS . g_main_context_iteration ( 0 , false ) ; if ( isDisposed ( ) ) break ; iconic = ( minimized ) || ( ( shell != null ) && ( shell . minimized ) ) ; } while ( ( ! ( mapped ) ) && ( ! iconic ) ) ; display . dispatchEvents = null ; if ( isDisposed ( ) ) return ; if ( ! iconic ) { <START_BUG> update ( true ) ; <END_BUG> 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 ( GDK_CURRENT_TIME ) ; } opened = true ; if ( ! ( moved ) ) { moved = true ; Point location = getLocation ( ) ; oldX = location . x ; oldY = location . y ; sendEvent ( Move ) ; if ( isDisposed ( ) ) return ; } if ( ! ( resized ) ) { resized = true ; Point size = getSize ( ) ; oldWidth = ( size . x ) - ( trimWidth ( ) ) ; oldHeight = ( size . y ) - ( trimHeight ( ) ) ; sendEvent ( Resize ) ; if ( isDisposed ( ) ) return ; if ( ( layout ) != null ) { markLayout ( false , false ) ; updateLayout ( false ) ; } } } else { OS . gtk_widget_hide ( shellHandle ) ; sendEvent ( Hide ) ; } } void setZOrder ( Control sibling , boolean above ) { } int shellMapProc ( int handle , int arg0 , int user_data ) { } void showWidget ( ) { } boolean traverseEscape ( ) { } int trimHeight ( ) { } int trimWidth ( ) { } void deregister ( ) { } public void dispose ( ) { }

Fix:
update ( true , true ) ;