I have an application which runs primarily in the background (it has visible windows, but most of the time users aren't interacting with the application and just allow it to run in the background). It also generates popup alerts in the bottom-right corner of the screen to notify users of situations that require attention.
The problem is that whenever one of the popup windows shows up, my entire application comes to the foreground. I've got it where it doesn't steal focus from other applications, but the very act of showing the popup window brings all other application windows to the foreground, covering up whatever a user is working on.
So this isn't a matter of focus, it is a matter of wanting ONLY the popup window to show up in front of OTHER application windows without bringing the rest of MY application windows to the foreground.
I've tried everything I can think of and haven't come up with a solution. The moment that ANY of my application windows comes to the foreground, they all do. But I want only the one. But without being top-most. I thought I could do it by having the notification window not be owned by the application, but even that doesn't solve the problem.
So, the requirements are...
1. Show a popup window on top of other applications without stealing focus.
2. Show the popup window without my application's other windows also coming to the front.
3. Allow users to click on popup window to dismiss it without my application's other windows receiving focus or coming to the front.