Bug 304922 - User notification method for Shell
Summary: User notification method for Shell
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-06 14:42 EST by Ricky Patel CLA
Modified: 2016-11-25 03:01 EST (History)
4 users (show)

See Also:


Attachments
example of a taskbar icon (56.17 KB, image/png)
2010-03-09 02:58 EST, Ricky Patel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ricky Patel CLA 2010-03-06 14:42:48 EST
This has been requested a few times but I haven't been able to find a formal bug request for this feature so I thought I would write one.

The request is for a new method called Shell.requestAttention() of which allows a developer to inform a user that there is new information for a specific shell without interrupting a user's current process. 

This functionality is much like setActive() where for windows the icon in the task bar will blink or for Mac the icon will jump, except setActive will also bring the shell to the top of the application if the user is any shell in the Application. Overall this can be very distracting for a user. Consider an instant messaging program. While using setActive() if you were typing to user1, and then user2 sent you a message, user2's window would steal focus and interrupt what you were typing to user1.
Comment 1 Felipe Heidrich CLA 2010-03-08 08:52:10 EST
See org.eclipse.swt.Tray

http://www.eclipse.org/swt/snippets/#tray
Comment 2 Ricky Patel CLA 2010-03-09 02:58:05 EST
I don't believe that you understand the request. I know that SWT provides a way to give the user system tray notifications such as balloons, very powerful but overall this is not the functionality that I'm looking for.

What I'm looking for is more like the FlashWindow(hWnd, bInvert) method in the Windows API. Where the actual shell program name in the TaskBar will blink. This functionality has nothing to do with the system tray.

I've attached a picture with a red box around what I'm understanding as the taskbar.
Comment 3 Ricky Patel CLA 2010-03-09 02:58:57 EST
Created attachment 161420 [details]
example of a taskbar icon
Comment 4 Roger Pack CLA 2010-03-11 15:19:13 EST
FWIW, in windows I think you can do this by minimizing a window then calling "forceActive" on it.  I think so, anyway.
Comment 5 Felipe Heidrich CLA 2010-03-11 15:30:14 EST
Now that I understand what you mean, I like the suggestion for the new API.
We recently add a TaskItem class that is exactly what you showed in comment 3.
Unfortunately TaskItem in only available on Windows 7 and MacOS, so it might not be the best place for it.

Other problem is that API freeze is tomorrow, I won't be allowed adding any new API till 3.6 is out.
Comment 6 Roger Pack CLA 2010-03-12 11:38:32 EST
I've seen the "blinking taskbar" in Linux (albeit inadvertently) before, so it should be possible there, too, theoretically (at least in gnome).

https://bugs.eclipse.org/bugs/show_bug.cgi?id=303710
Comment 7 Ricky Patel CLA 2010-03-12 12:06:21 EST
in response to minimizing the window and calling forceActive. Though this will work under eclipse supported platforms, this won't work in windows 7 (which I'm assuming will be supported soon). The reason for this is a change in how alt tab functions in that it will show you the outlines of where your windows are. I think a user would be confused if the outline for their chat window disappeared
Comment 8 Ricky Patel CLA 2010-03-12 12:25:06 EST
I'm not familiar with the new TaskItem API (comment 5) nor the functions associated with it... Is there a place where I may look this up? Google came up with nothing...

Also, it seems that this is a well received feature request... I'm not to familiar with native programming in java but I can research into what functions need to be called to the os level to cause a shell to blink. What OS's would need to support this feature? Windows, MacOSX and Linux... Any others?