Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 563073 - The application forces itself to the foreground when Control#setFocus is called
Summary: The application forces itself to the foreground when Control#setFocus is called
Status: CLOSED DUPLICATE of bug 578929
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.15   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-11 20:26 EDT by Roden Roldan CLA
Modified: 2022-02-24 10:59 EST (History)
1 user (show)

See Also:


Attachments
Contains the sample code to reproduce the issue. (1.10 KB, text/plain)
2020-05-11 20:26 EDT, Roden Roldan CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roden Roldan CLA 2020-05-11 20:26:44 EDT
Created attachment 282786 [details]
Contains the sample code to reproduce the issue.

This is reproducible on both Windows and MacOS versions of SWT. On Windows, it seems to happen just after the application is launched, but it happens all the time on Mac.

See the attached text file for a sample code. If you run it, then doing the following shows the issue:
1. Click the "Focus" button
2. Alt+tab out or focus on a different window such that the SWT application is on the background (On Mac, the SWT application needs to be behind 2 windows before I could replicate the issue).
3. When the application finally calls setFocus on the Composite, it forces itself to the foreground.
Comment 1 Rolf Theunissen CLA 2022-02-24 10:59:41 EST

*** This bug has been marked as a duplicate of bug 578929 ***