Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 297930
Collapse All | Expand All

(-)src/org/eclipse/swt/widgets/Shell.java (-6 / +5 lines)
Lines 163-170 Link Here
163
    createWidget();
163
    createWidget();
164
    setInitialSize();
164
    setInitialSize();
165
  }
165
  }
166
  
166
167
  
167
168
  /**
168
  /**
169
   * Constructs a new instance of this class. This is equivalent
169
   * Constructs a new instance of this class. This is equivalent
170
   * to calling <code>Shell((Display) null)</code>.
170
   * to calling <code>Shell((Display) null)</code>.
Lines 173-179 Link Here
173
   *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li>
173
   *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li>
174
   *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li>
174
   *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li>
175
   * </ul>
175
   * </ul>
176
   * 
176
   *
177
   * @since 1.3
177
   * @since 1.3
178
   */
178
   */
179
  public Shell() {
179
  public Shell() {
Lines 666-676 Link Here
666
   */
666
   */
667
  public void open() {
667
  public void open() {
668
    checkWidget();
668
    checkWidget();
669
    // Order of setActiveShell/bringToTop/setVisible is crucial
670
    display.setActiveShell( this );
669
    bringToTop();
671
    bringToTop();
670
    // Order of setVisible/setActive is crucial: see isVisible-check in
671
    // Shell#setActive()
672
    setVisible( true );
672
    setVisible( true );
673
    display.setActiveShell( this );
674
    if( !restoreFocus() && !traverseGroup( true ) ) {
673
    if( !restoreFocus() && !traverseGroup( true ) ) {
675
      setFocus();
674
      setFocus();
676
    }
675
    }

Return to bug 297930