Write a start marker to the DB event table

This commit is contained in:
Přemysl Eric Janouch 2020-10-02 01:55:46 +02:00
parent 4302fc4baf
commit 9244d2b657
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -540,11 +540,16 @@ generator_init(void)
g_free(subpath);
g_key_file_free(kf);
// Write a start marker so that we can reliably detect interruptions
struct event *event = g_slice_new0(struct event);
event->timestamp = -1;
g_async_queue_push(g.queue, event);
update_current_window();
gint64 timeout_ms = timeout * 1000;
gen.idle_timeout.hi = timeout_ms >> 32;
gen.idle_timeout.lo = timeout_ms;
update_current_window();
set_idle_alarm(&gen.idle_alarm_inactive,
XCB_SYNC_TESTTYPE_POSITIVE_COMPARISON, gen.idle_timeout);