Page 1 of 1

Allow spring window alert/flashing

Posted: 29 Sep 2011, 20:20
by Licho
It would be nice to have widget access to window alert.

Example use:
- notify if user fails to ready (spring minimized)
- notify when game starts

Re: Allow spring window alert/flashing

Posted: 29 Sep 2011, 21:22
by hoijui
can that be done through SDL? what is it called there?

Re: Allow spring window alert/flashing

Posted: 29 Sep 2011, 23:07
by abma
http://pinvoke.net/default.aspx/user32.FlashWindowEx
win32: FlashWindowEx();

i couldn't find something similar in sdl...

Re: Allow spring window alert/flashing

Posted: 30 Sep 2011, 09:12
by Vadi
http://doc.qt.nokia.com/latest/qapplication.html#alert gives cross-platform tips on making this happen. In Linux, http://standards.freedesktop.org/wm-spe ... atest.html, "_NET_WM_STATE_DEMANDS_ATTENTION" is what you'd be looking for. Example implementation without Qt: http://www.qtforum.org/article/12334/ta ... a360c7f175

Re: Allow spring window alert/flashing

Posted: 01 Oct 2011, 09:05
by knorke
For now maybe changing changing program icon/title would work?
http://springrts.com/phpbb/viewtopic.php?f=14&t=26355
Could have it scroll messages in the taskbar like some music players do with song titles.

Re: Allow spring window alert/flashing

Posted: 01 Oct 2011, 12:56
by hoijui
thanks Vadi.
i tried the code you linked to, replaced the two QT specific lines with SDL stuff, and it compiled and ran fine, but there was no flashing.

related SDL doc:
http://sdl.beuc.net/sdl.wiki/SDL_SysWMInfo

my code:
http://pastebin.com/0z7BF7p9

in case anyone wants to try to get it to run.

Re: Allow spring window alert/flashing

Posted: 05 Oct 2011, 15:06
by Jools
If you make this feature, please make an option to turn it off on user-side. Everybody doesn't want to have something non-important blinking on the task bar.
Licho wrote: - notify if user fails to ready (spring minimized)
Ready = user is ready. If user hasn't marked ready then he probably isn't ready. No such thing as 'fail to ready'.

Re: Allow spring window alert/flashing

Posted: 08 Oct 2011, 12:29
by Licho
Jools it will be entirely up to mod makers to decide when it flashes.

There is such thing as fail to ready - there is timer in ZK games that countdowns to start. It gives each person 3 minutes and during this they are being ringed in lobby. If they fail to ready they are kicked and game force started.

Instead I would like spring window to flash.

And again it should flash when the game actually starts (which can be minutes after spring started).