On Monday 06 February 2012 13:24:39 Helmer Teles wrote:
>
> I've trid with x2goserver 3.0.99 / nxagent 3.4 / x2goclient 3.01 /
> squeeze 32bit on XCP/ freerdp 1.0 from git (FreeRDP-FreeRDP-b6ec892),
> and it was ok for a connexion to a winxp sp3 32 bit. So it looks like
> the issue seems to be more related to the x2goagent 3.5 like you pointed
> out. I haven't upgraded that one yet.
>
> Cheers,
>
> Denis
>
> > --
> >
Hello Dear Dennis, and Xfrerdp Developers.
I'm forwarding you a email from one of the X2GO developers.
The problem lies when you try to run a xfreerdp session within a x2goagent (
aka nxagent ), it errors with a BadMatch (invalid parameter attributes)
Mr. Oleksandr Shneyder proposes a patch that i pasted here with the complete
email in the bottom of this email.
I Kindly regard your attention to this matter.
sincerily yours,
Helmer Teles.
[...............]
MAIL==============
Hello Developers,
one of X2Go users in our mailing list have reported, that there is a
issue running xfreerdp on such X-Servers as nxagent or x2goagent. I
spent some time for investigations, and found, that the way how xfreerdp
searching for visual to create desktop window, working not for all
X-Servers.
in FreeRDP/client/X11/xfreerdp.c:395
if (vi->depth == xfi->depth)
{
xfi->visual = vi->visual;
break;
}
As we can see, the first visual, which have the same colour depth as our
screen will be chosen here. Unfortunately, such behaviour is not for
every X-Server correct. Choosing wrong visual make function
XCreateWindow() in FreeRDP/client/X11/xf_window.c:280 fail with error
message:
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 1 (X_CreateWindow)
Serial number of failed request: 31
Current serial number in output stream: 35
To avoid this, I propose to get correct visual from properties of a root
window.
patch is attached.
Regards,
Alex
=====================
PATCH================
diff --git a/client/X11/xfreerdp.c b/client/X11/xfreerdp.c
index de58122..ddd8e5b 100644
--- a/client/X11/xfreerdp.c
+++ b/client/X11/xfreerdp.c
@@ -353,6 +353,7 @@ boolean xf_get_pixmap_info(xfInfo* xfi)
XVisualInfo template;
XPixmapFormatValues* pf;
XPixmapFormatValues* pfs;
+ XWindowAttributes window_attributes_return;
pfs = XListPixmapFormats(xfi->display, &pf_count);
@@ -379,6 +380,13 @@ boolean xf_get_pixmap_info(xfInfo* xfi)
template.class = TrueColor;
template.screen = xfi->screen_number;
+
if(XGetWindowAttributes(xfi->display,RootWindowOfScreen(xfi-
>screen),&window_attributes_return)==0)
+ {
+ printf("xf_get_pixmap_info: XGetWindowAttributes failed\n");
+ return false;
+ }
+
+
vis = XGetVisualInfo(xfi->display, VisualClassMask | VisualScreenMask,
&template, &vi_count);
if (vis == NULL)
@@ -392,7 +400,7 @@ boolean xf_get_pixmap_info(xfInfo* xfi)
{
vi = vis + i;
- if (vi->depth == xfi->depth)
+ if (vi->visual == window_attributes_return.visual)
{
xfi->visual = vi->visual;
break;
============================
regards,
Alex
--
Oleksandr Shneyder
Dipl. Informatik
X2go Core Developer Team
email: [email protected]
web: www.obviously-nice.de
--> X2go - everywhere@home
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Freerdp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freerdp-devel