Bug 80506 - [consistency] forceActive and setActive are inconsistent across platforms
Summary: [consistency] forceActive and setActive are inconsistent across platforms
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: consistency
Depends on:
Blocks: 79504
  Show dependency tree
 
Reported: 2004-12-08 14:55 EST by Platform-SWT-Inbox CLA
Modified: 2005-01-19 15:05 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fai Sigalov CLA 2004-12-08 14:55:55 EST
If a shell that hasn't been opened is forced active:
on windows and mac, the current app loses focus, the shell becomes active, but 
can't be seen.
on gtk and motif, if the shell isn't visible, nothing is done.

import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class pr79504 {

    public static void main(String[] args) {
        
        final Display display = new Display();
        Shell shell = new Shell(display); 
//      shell.setActive();  
        shell.forceActive();

        
	  while (!shell.isDisposed()) { 
	    if (!display.readAndDispatch()) display.sleep();
        }
        display.dispose();
    }
}
Comment 1 Fai Sigalov CLA 2004-12-10 09:38:29 EST
> 20041209
win & mac do nothing if shell isn't visible.