From thomas.friedrichsmeier at ruhr-uni-bochum.de  Wed Apr 20 19:12:58 2005
From: thomas.friedrichsmeier at ruhr-uni-bochum.de (Thomas Friedrichsmeier)
Date: Wed Apr 20 19:11:50 2005
Subject: [Rd] Re: Embedded R and x11
In-Reply-To: <200504201834.33320.thomas.friedrichsmeier@ruhr-uni-bochum.de>
References: <200504201834.33320.thomas.friedrichsmeier@ruhr-uni-bochum.de>
Message-ID: <200504201912.58537.thomas.friedrichsmeier@ruhr-uni-bochum.de>

Hi again,

> I figured that the reason for this might be, that R_ProcessEvents () and
> handleEvent () in devX11.c do not get called (of course I might be
> completely wrong?). So I tried calling R_ProcessEvents () manually, but I
> can't get that to link (unresolved symbol R_ProcessEvents).
> Any hints on how I can get this to work?

ok, I figured it out. For the record, the following code (called periodically 
when there is nothing else to do) does the trick:

#include "R_ext/eventloop.h"

void processX11 () {
	extern InputHandler *R_InputHandlers;
	InputHandler *handler = R_InputHandlers;
	while (handler) {
		if (handler->activity == XActivity) {
			handler->handler ((void*) 0);
		}
		handler = handler->next;
	}
}

Thomas


[Rd] Re: Embedded R and x11
Thomas Friedrichsmeier