[rkward-cvs] rkward/rkward/rbackend rinterface.cpp,1.22,1.23 rkwindowcatcher.cpp,1.2,1.3
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Sun May 8 16:54:32 UTC 2005
Update of /cvsroot/rkward/rkward/rkward/rbackend
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25163/rkward/rbackend
Modified Files:
rinterface.cpp rkwindowcatcher.cpp
Log Message:
Adding a class with XML-parsing helper functions. Neither used nor tested, yet. Adding some info and more failed attempts to RKWindowCatcher
Index: rkwindowcatcher.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rbackend/rkwindowcatcher.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rkwindowcatcher.cpp 4 May 2005 15:23:02 -0000 1.2
--- rkwindowcatcher.cpp 8 May 2005 16:54:30 -0000 1.3
***************
*** 66,70 ****
QXEmbed *capture = new QXEmbed (); // (0, 0, Qt::WDestructiveClose);
capture->setProtocol (QXEmbed::XPLAIN);
! capture->embed (w);
capture->show ();
}
--- 66,85 ----
QXEmbed *capture = new QXEmbed (); // (0, 0, Qt::WDestructiveClose);
capture->setProtocol (QXEmbed::XPLAIN);
! // (trying to) work around buggy R X11 event handling (see http://www.ens.gu.edu.au/robertk/R/devel/01a/0077.html)
! extern Display *Rf_getX11Display (); // now, how to link this?
!
! qDebug ("qt disp: %x r disp: %x", qt_xdisplay (), Rf_getX11Display ());
!
! Atom *old_prots;
! int num_old_prots;
! if (!XGetWMProtocols (Rf_getX11Display (), w, &old_prots, &num_old_prots)) qDebug ("fail 1");
! if (!XSetWMProtocols (Rf_getX11Display (), w, 0, 0)) qDebug ("fail2");
! // capture->embed (w);
! XEvent dummy;
! while (XPending (Rf_getX11Display ())) {
! XNextEvent (Rf_getX11Display (), &dummy);
! qDebug ("event for window: %x", dummy.xany.window);
! }
! XSetWMProtocols (Rf_getX11Display (), w, old_prots, num_old_prots);
capture->show ();
}
Index: rinterface.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rbackend/rinterface.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** rinterface.cpp 4 May 2005 15:23:02 -0000 1.22
--- rinterface.cpp 8 May 2005 16:54:29 -0000 1.23
***************
*** 264,273 ****
issueCommand (".rk.rkreply <- \"Too few arguments in call to require.\"", RCommand::App | RCommand::Sync, "", 0, 0, request->in_chain);
}
! #ifndef DISABLE_RKWINDOWCATCHER
// does not work, yet :-( R crashes.
} else if (call == "catchWindow") {
! // TODO: error checking handling (wrong parameter count/type)
if (request->call_length >= 3) {
window_catcher->catchWindow (request->call[1], QString (request->call[2]).toInt ());
}
#endif // DISABLE_RKWINDOWCATCHER
--- 264,275 ----
issueCommand (".rk.rkreply <- \"Too few arguments in call to require.\"", RCommand::App | RCommand::Sync, "", 0, 0, request->in_chain);
}
! #ifndef DISABLE_RKWINDOWCATCHER
// does not work, yet :-( R crashes.
} else if (call == "catchWindow") {
! // TODO: error checking/handling (wrong parameter count/type)
if (request->call_length >= 3) {
+ MUTEX_LOCK;
window_catcher->catchWindow (request->call[1], QString (request->call[2]).toInt ());
+ MUTEX_UNLOCK;
}
#endif // DISABLE_RKWINDOWCATCHER
More information about the rkward-tracker
mailing list