[rkward-cvs] SF.net SVN: rkward: [2154] branches/KDE4_port/rkward/rbackend/ rembedinternal.cpp

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Oct 31 14:29:18 UTC 2007


Revision: 2154
          http://rkward.svn.sourceforge.net/rkward/?rev=2154&view=rev
Author:   tfry
Date:     2007-10-31 07:29:18 -0700 (Wed, 31 Oct 2007)

Log Message:
-----------
Use a safe wrapper for processX11Events

Modified Paths:
--------------
    branches/KDE4_port/rkward/rbackend/rembedinternal.cpp

Modified: branches/KDE4_port/rkward/rbackend/rembedinternal.cpp
===================================================================
--- branches/KDE4_port/rkward/rbackend/rembedinternal.cpp	2007-10-31 13:51:56 UTC (rev 2153)
+++ branches/KDE4_port/rkward/rbackend/rembedinternal.cpp	2007-10-31 14:29:18 UTC (rev 2154)
@@ -425,8 +425,7 @@
 
 static int timeout_counter = 0;
 
-void REmbedInternal::processX11Events () {
-	if (!this_pointer->r_running) return;
+void processX11EventsWorker (void *) {
 /* what we do here is walk the list of objects, that have told R, they're listening for events.
 We figure out which ones look for X11-events and tell those to do their stuff (regardless of whether events actually occurred) */
 	extern InputHandler *R_InputHandlers;
@@ -450,6 +449,14 @@
 	}
 }
 
+void REmbedInternal::processX11Events () {
+	// do not trace
+	if (!this_pointer->r_running) return;
+
+// In case an error (or user interrupt) is caught inside processX11EventsWorker, we don't want to long-jump out.
+	R_ToplevelExec (processX11EventsWorker, 0);
+}
+
 QString *SEXPToStringList (SEXP from_exp, unsigned int *count) {
 	RK_TRACE (RBACKEND);
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list