Currently with swt, I sometimes want a program to arbitrarily come to the foreground (like an alarm clock might).
Typically the following works (jruby):
@shell.setMinimized(false)
@shell.forceActive
This brings the shell to the front if it was minimized.
Creating a new shell at any time also brings the (new shell) to the front.
So far so good, however, if the shell is not minimized, the above code just flashes (blinks) the app's icon in the taskbar. Well actually the first time you run it, it brings it to the front. After that, it just blinks in the taskbar. That's windows. On Linux it appears to only blink in the taskbar (ubuntu default).
Does anybody know of a cross platform way of getting the app to come to the front, in swt?
It seems that no incantation of forceActive setActive setMinimized(false) setFocus forceFocus and setVisible can accomplish this thing.
I'm pretty sure it is possible (at least in windows), as the E Text Editor does it. Well, that's not swt, but at least some other apps have been known to do it.
I'm thinking maybe this is swt bug 192036?
Many thanks.
Related:
- How to bring a window to the front?
- Opening a Shell
- Keep window in foreground (even if it loses focus)
- Bug 244597 - Cannot activate shell programatically on gtk
- Need to bring application to foreground on Windows
- How to bring a window to the front? this swing example might be some type of clue, too...