add jtk_wake()

This commit is contained in:
Josh Holtrop 2020-07-08 10:16:38 -04:00
parent 6cf36a852f
commit 84b67e99b1

View File

@ -701,3 +701,13 @@ void jtk_wait_event(jtk_event_t * event, uint64_t time_to_wait)
select(x_fd + 1, &fds, NULL, NULL, &tv);
}
}
void jtk_wake(void)
{
XEvent event = {
.type = GenericEvent,
};
XLockDisplay(g_display);
XPutBackEvent(g_display, &event);
XUnlockDisplay(g_display);
}