[RkWard-devel] Re: [rkward-cvs] dark side of rkward

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Fri Apr 15 09:06:18 UTC 2005


Hi Adrien,

> If you have 5 sec to loose, open RKward in a konsole and type
> example(plot)
> if nothing happens, you just have lost 5 sec, otherwise, consider
> beginning an intense wondering about you favorite konsole and kdev
> application.
> If you want to go further in the dark side of rkward, after attempting
> to close the current device, type identify(x) (something else could
> work but I like this one) and then you will be able to play with your
> window.

The problem (or one of the problems) is roughly this (at least that's what I 
think):
- Since the R-process runs in a thread of rkward, all X-events get sent to 
rkward.
- There they are processed in QApplication::x11ProcessEvent.
- I've once looked at what's going on there in more detail, but I forgot most. 
Anyway, the essence is, all x11-events that Qt does not know anything about 
(not coming from a Qt-widget) get thrown away.

So the solution will involve something like:
- reimplementing QApplication::x11EventFilter so unknown (to Qt) x11-events 
don't get thrown away, but stored somewhere
- pass those events to the R-thread in a thread-safe way (i.e. extending 
RInterface and RThread)
- submit to R for processing (can't recall the name, but R has a function 
similar to x11ProcessEvent)

> Any help is welcomed....I am at the present moment totally lost in the
> dark side of rkward

Those are the darker sides, indeed.

Thomas




More information about the Rkward-devel mailing list