Buggy code:
public void addMouseTrackListener ( MouseTrackListener listener ) { } public void addPaintListener ( PaintListener listener ) { } public void addTraverseListener ( TraverseListener listener ) { } public void removeControlListener ( ControlListener listener ) { } public void removeFocusListener ( FocusListener listener ) { } public void removeHelpListener ( HelpListener listener ) { } public void removeKeyListener ( KeyListener listener ) { } public void removeMouseListener ( MouseListener listener ) { } public void removeMouseMoveListener ( MouseMoveListener listener ) { } public void removeMouseTrackListener ( MouseTrackListener listener ) { } public void removePaintListener ( PaintListener listener ) { } public void removeTraverseListener ( TraverseListener listener ) { } boolean filterKey ( int keyval , int event ) { } Menu [ ] findMenus ( Control control ) { } void fixChildren ( Shell newShell , Shell oldShell , Decorations newDecorations , Decorations oldDecorations , Menu [ ] menus ) { } int fixedMapProc ( int widget ) { } public boolean forceFocus ( ) { } boolean forceFocus ( int focusHandle ) { } public Color getBackground ( ) { } GdkColor getBackgroundColor ( ) { } GdkColor getBgColor ( ) { } GdkColor getBaseColor ( ) { } public int getBorderWidth ( ) { } public boolean getEnabled ( ) { } public Font getFont ( ) { } int getFontDescription ( ) { } public Color getForeground ( ) { } GdkColor getForegroundColor ( ) { } GdkColor getFgColor ( ) { } Point getIMCaretPos ( ) { } GdkColor getTextColor ( ) { } public Object getLayoutData ( ) { } public Menu getMenu ( ) { } public Monitor getMonitor ( ) { } public Composite getParent ( ) { } Control [ ] getPath ( ) { } public Shell getShell ( ) { } Shell _getShell ( ) { } public String getToolTipText ( ) { } public boolean getVisible ( ) { } int gtk_button_press_event ( int widget , int event ) { } int gtk_button_release_event ( int widget , int event ) { } int gtk_commit ( int imcontext , int text ) { } int gtk_enter_notify_event ( int widget , int event ) { } int gtk_event_after ( int widget , int gdkEvent ) { } int gtk_expose_event ( int widget , int eventPtr ) { } int gtk_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_key_press_event ( int widget , int event ) { } int gtk_key_release_event ( int widget , int event ) { } int gtk_leave_notify_event ( int widget , int event ) { } int gtk_mnemonic_activate ( int widget , int arg1 ) { } int gtk_motion_notify_event ( int widget , int event ) { } int gtk_popup_menu ( int widget ) { } int gtk_preedit_changed ( int imcontext ) { } int gtk_realize ( int widget ) { } int gtk_scroll_event ( int widget , int eventPtr ) { } int gtk_show_help ( int widget , int helpType ) { } int gtk_unrealize ( int widget ) { } int gtk_visibility_notify_event ( int widget , int event ) { GdkEventVisibility gdkEvent = new GdkEventVisibility ( ) ; OS . memmove ( gdkEvent , event , sizeof ) ; int paintWindow = paintWindow ( ) ; int window = gdkEvent . window ; if ( window == paintWindow ) { if ( ( gdkEvent . state ) == ( OS . GDK_VISIBILITY_FULLY_OBSCURED ) ) { state |= OBSCURED ; } else { if ( ( ( state ) & ( OBSCURED ) ) != 0 ) { int [ ] width = new int [ 1 ] ; int [ ] height = new int [ 1 ] ; OS . gdk_drawable_get_size ( window , width , height ) ; GdkRectangle rect = new GdkRectangle ( ) ; rect . width = width [ 0 ] ; rect . height = height [ 0 ] ; <START_BUG> OS . gdk_window_invalidate_rect ( window , rect , true ) ; <END_BUG> } state &= ~ ( OBSCURED ) ; } } return 0 ; } public int internal_new_GC ( GCData data ) { } int imHandle ( ) { } public void internal_dispose_GC ( int gdkGC , GCData data ) { } public boolean isReparentable ( ) { } boolean isShowing ( ) { } boolean isTabGroup ( ) { } boolean isTabItem ( ) { } public boolean isEnabled ( ) { } boolean isFocusAncestor ( Control control ) { } public boolean isFocusControl ( ) { } public boolean isVisible ( ) { } Decorations menuShell ( ) { } boolean mnemonicHit ( char key ) { } boolean mnemonicMatch ( char key ) { } void register ( ) { } public void redraw ( ) { } public void redraw ( int x , int y , int width , int height , boolean all ) { } void redrawWidget ( int x , int y , int width , int height , boolean all ) { } void releaseChild ( ) { } void releaseHandle ( ) { } void releaseWidget ( ) { } void sendFocusEvent ( int type ) { } boolean sendHelpEvent ( int helpType ) { } boolean sendMouseEvent ( int type , int button , int time , double x_root , double y_root , int state , int eventPtr ) { } boolean sendMouseEvent ( int type , int button , int count , int detail , boolean send , int time , double x_root , double y_root , int state , int eventPtr ) { } public void setBackground ( Color color ) { } void setBackgroundColor ( int handle , GdkColor color ) { } void setBackgroundColor ( GdkColor color ) { } public void setCapture ( boolean capture ) { } public void setCursor ( Cursor cursor ) { }

Fix:
OS . gdk_window_invalidate_rect ( window , rect , false ) ;