set the event_curtime when running an action to the time in the event used to run the action
This commit is contained in:
parent
d17fe2d29b
commit
4aa8d64f76
1 changed files with 4 additions and 1 deletions
|
@ -20,6 +20,7 @@
|
||||||
#include "mainloop.h"
|
#include "mainloop.h"
|
||||||
#include "action.h"
|
#include "action.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
#include "event.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -325,14 +326,16 @@ void ob_main_loop_run(ObMainLoop *loop)
|
||||||
{
|
{
|
||||||
loop->action_queue =
|
loop->action_queue =
|
||||||
g_slist_delete_link(loop->action_queue,
|
g_slist_delete_link(loop->action_queue,
|
||||||
loop->action_queue);
|
loop->action_queue);
|
||||||
action_unref(act);
|
action_unref(act);
|
||||||
act = NULL;
|
act = NULL;
|
||||||
}
|
}
|
||||||
} while (!act && loop->action_queue);
|
} while (!act && loop->action_queue);
|
||||||
|
|
||||||
if (act) {
|
if (act) {
|
||||||
|
event_curtime = act->data.any.time;
|
||||||
act->func(&act->data);
|
act->func(&act->data);
|
||||||
|
event_curtime = CurrentTime;
|
||||||
loop->action_queue =
|
loop->action_queue =
|
||||||
g_slist_delete_link(loop->action_queue,
|
g_slist_delete_link(loop->action_queue,
|
||||||
loop->action_queue);
|
loop->action_queue);
|
||||||
|
|
Loading…
Reference in a new issue