MCPcopy Create free account
hub / github.com/NetHack/NetHack / d_timeout

Function d_timeout

win/X11/winX.c:1739–1756  ·  view source on GitHub ↗

* Timeout callback for X11_delay_output(). Send a fake message to the map * window. */ ARGSUSED */

Source from the content-addressed store, hash-verified

1737 */
1738/* ARGSUSED */
1739static void
1740d_timeout(XtPointer client_data, XtIntervalId *id)
1741{
1742 XEvent event;
1743 XClientMessageEvent *mesg;
1744
1745 nhUse(client_data);
1746 nhUse(id);
1747
1748 /* Set up a fake message to the event handler. */
1749 mesg = (XClientMessageEvent *) &event;
1750 mesg->type = ClientMessage;
1751 mesg->message_type = XA_STRING;
1752 mesg->format = 8;
1753 XSendEvent(XtDisplay(window_list[WIN_MAP].w),
1754 XtWindow(window_list[WIN_MAP].w), False, NoEventMask,
1755 (XEvent *) mesg);
1756}
1757
1758/*
1759 * Delay for 50ms. This is not implemented asynch. Maybe later.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected