示例#1
0
static TBOOL rfb_passevent_to_focus(RFBDISPLAY *mod, TIMSG *omsg)
{
	TAPTR TExecBase = TGetExecBase(mod);
	TBOOL sent = TFALSE;
	TLock(mod->rfb_InstanceLock);
	RFBWINDOW *v = mod->rfb_FocusWindow;
	if (v)
		sent = rfb_passevent(mod, v, omsg);
	TUnlock(mod->rfb_InstanceLock);
	return sent;
}
示例#2
0
static TBOOL rfb_passevent_to_focus(struct rfb_Display *mod, TIMSG *omsg)
{
	TAPTR TExecBase = TGetExecBase(mod);
	TBOOL sent = TFALSE;

	TLock(mod->rfb_InstanceLock);
	struct rfb_Window *v = mod->rfb_FocusWindow;

	if (v)
		sent = rfb_passevent(mod, v, omsg);
	TUnlock(mod->rfb_InstanceLock);
	return sent;
}
示例#3
0
static RFBWINDOW *rfb_passevent_by_mousexy(RFBDISPLAY *mod, TIMSG *omsg,
	TBOOL focus)
{
	TAPTR TExecBase = TGetExecBase(mod);
	TINT x = omsg->timsg_MouseX;
	TINT y = omsg->timsg_MouseY;
	TLock(mod->rfb_InstanceLock);
	RFBWINDOW *v = rfb_findcoord(mod, x, y);
	if (v)
	{
		if (focus)
			rfb_focuswindow(mod, v);
		rfb_passevent(mod, v, omsg);
	}
	TUnlock(mod->rfb_InstanceLock);
	return v;
}
示例#4
0
LOCAL struct rfb_Window *rfb_passevent_by_mousexy(struct rfb_Display *mod,
	TIMSG *omsg, TBOOL focus)
{
	TAPTR TExecBase = TGetExecBase(mod);

	/* note: screen coordinates */
	TINT x = omsg->timsg_MouseX =
		TCLAMP(0, omsg->timsg_MouseX, mod->rfb_Width - 1);
	TINT y = omsg->timsg_MouseY =
		TCLAMP(0, omsg->timsg_MouseY, mod->rfb_Height - 1);
	TLock(mod->rfb_InstanceLock);
	struct rfb_Window *v = rfb_findcoord(mod, x, y);

	if (v && (omsg->timsg_Type != TITYPE_MOUSEMOVE ||
		(mod->rfb_FocusWindow == v || (v->rfbw_Flags & RFBWFL_IS_POPUP))))
	{
		if (focus)
			rfb_focuswindow(mod, v);
		rfb_passevent(mod, v, omsg);
	}
	TUnlock(mod->rfb_InstanceLock);
	return v;
}