I am attempting to run synergy with ion3 as a client. More information about synergy can be located here: http://synergy2.sourceforge.net/
The keyboard/mouse(like it is needed) control work great. However, when the synergy server attempts to put the client(ion3 or ion2, tried both) into screensaver mode things go awry.
While being a developer, I am not a cpp developer( synergy language ) and am really really not an XWindows developer, so I am kind of stumped on how to fix this problem.
When I run synergy in debug mode I get the following:
DEBUG2: CServerProxy.cpp,102: msg from server: CSEC DEBUG2: CProtocolUtil.cpp,47: readf(%1i) DEBUG2: CProtocolUtil.cpp,119: readf: read 1 byte integer: 1 (0x1) DEBUG1: CServerProxy.cpp,716: recv screen saver on=1 DEBUG2: CXWindowsUtil.cpp,1233: can't read property 358 on window 0x00600001 DEBUG2: CXWindowsUtil.cpp,1233: can't read property 358 on window 0x00600003 DEBUG2: CXWindowsUtil.cpp,1233: can't read property 358 on window 0x0060030b DEBUG2: CXWindowsUtil.cpp,1233: can't read property 358 on window 0x00800001 DEBUG2: CXWindowsUtil.cpp,1233: can't read property 358 on window 0x00800005
So we wandered into the source a bit to figure out what was going on. The error is occurring in a method called
getWindowProperty"
bool
CXWindowsUtil::getWindowProperty(Display* display, Window window,
Atom property, CString* data, Atom* type,
SInt32* format, bool deleteProperty)
{
assert(display != NULL); Atom actualType;
int actualDatumSize; // ignore errors. XGetWindowProperty() will report failure.
CXWindowsUtil::CErrorLock lock(display);// read the property
bool okay = true;
const long length = XMaxRequestSize(display);
long offset = 0;
unsigned long bytesLeft = 1;
while (bytesLeft != 0) {
// get more data
unsigned long numItems;
unsigned char* rawData;
if (XGetWindowProperty(display, window, property,
offset, length, False, AnyPropertyType,
&actualType, &actualDatumSize,
&numItems, &bytesLeft, &rawData) != Success ||
actualType == None || actualDatumSize == 0) {
// failed
okay = false;
break;
}
When it comes out this snippet "okay" is false.
So that does not really tell us much besides that it can't read a property... So lets see what is calling that...
Seems to be this method.
The "Activate 30" is my debug output.. ignore it.. not like it matters.
bool
CXWindowsScreenSaver::isXScreenSaver(Window w) const
{
LOG((CLOG_DEBUG "Activate 30"));
// check for m_atomScreenSaverVersion string property
Atom type;
return (CXWindowsUtil::getWindowProperty(m_display, w,
m_atomScreenSaverVersion,
NULL, &type, NULL, False) &&
type == XA_STRING);
}
m_display is set by:
XWindowsScreenSaver::CXWindowsScreenSaver(
Display* display, Window window, void* eventTarget) :
m_display(display)
and m_atomScreenSaverVersion is:
m_atomScreenSaverVersion = XInternAtom(m_display,
"_SCREENSAVER_VERSION", False);
Ok... But what calls our isXScreenSaver?
Window root = DefaultRootWindow(m_display);
LOG((CLOG_DEBUG "Activate 22"));
// find top-level window xscreensaver window
Window rw, pw, *cw;
unsigned int nc;
LOG((CLOG_DEBUG "Activate 23"));
if (XQueryTree(m_display, root, &rw, &pw, &cw, &nc)) {
LOG((CLOG_DEBUG "Activate 24"));
for (unsigned int i = 0; i < nc; ++i) {
LOG((CLOG_DEBUG "Activate 25"));
if (isXScreenSaver(cw[i])) {
LOG((CLOG_DEBUG "Activate 26"));
setXScreenSaver(cw[i]);
LOG((CLOG_DEBUG "Activate 27"));
break;
}
}
LOG((CLOG_DEBUG "Activate 28"));
XFree(cw);
}XQueryTree seems to be some kind of XWindows call, and we already know isXScreenSaver is where it is failing to find the screensaver and
then for that reason unable to start it...
So the question I have is.... why?
This seems to work in window managers like sawfish/etc....
So I imagine they are doing something non standard in synergy.. But I don't know what. And I don't know enough about XWindows programming or Window manager
internals to figure it out. I don't even know if I provided enough information to start figuring it out.
So if anyone has any ideas I would appreciate it, if more information is needed just let me know and I will go ahead and dig it up..
Thanks in advance.
