startup-notifications: keep sequence around for 30s after completion

This changes the fact that Firefox would not be launched on the correct
workspace because it marked the startup sequence as completed *before*
actually mapping all of its windows.

To test this, go to workspace 3 and run this command in a terminal:
    i3-msg 'exec iceweasel; workspace 4'
That will make i3 start iceweasel (and create a proper startup
notification context for it), then immediately switch to workspace 4
(before iceweasel could possibly start).

The iceweasel window(s) should appear on workspace 3.
This commit is contained in:
Michael Stapelberg
2012-09-05 21:00:08 +02:00
parent 8d2799c251
commit 32d4dbf70f
2 changed files with 59 additions and 10 deletions

View File

@ -168,6 +168,9 @@ struct Startup_Sequence {
char *workspace;
/** libstartup-notification context for this launch */
SnLauncherContext *context;
/** time at which this sequence should be deleted (after it was marked as
* completed) */
time_t delete_at;
TAILQ_ENTRY(Startup_Sequence) sequences;
};