Example #1
0
static BOOL xf_event_KeyRelease(xfInfo* xfi, XEvent* event, BOOL app)
{
	XEvent next_event;

	if (XPending(xfi->display))
	{
		ZeroMemory(&next_event, sizeof(next_event));
		XPeekEvent(xfi->display, &next_event);

		if (next_event.type == KeyPress)
		{
			if (next_event.xkey.keycode == event->xkey.keycode)
				return TRUE;
		}
	}

	xf_kbd_unset_keypress(xfi, event->xkey.keycode);
	xf_kbd_send_key(xfi, FALSE, event->xkey.keycode);

	return TRUE;
}
Example #2
0
boolean xf_event_KeyRelease(xfInfo* xfi, XEvent* event, boolean app)
{
	XEvent next_event;

	if (XPending(xfi->display))
	{
		memset(&next_event, 0, sizeof(next_event));
		XPeekEvent(xfi->display, &next_event);

		if (next_event.type == KeyPress)
		{
			if (next_event.xkey.keycode == event->xkey.keycode)
				return true;
		}
	}

	xf_kbd_unset_keypress(xfi, event->xkey.keycode);
	xf_kbd_send_key(xfi, false, event->xkey.keycode);

	return true;
}