[X2Go-Dev] [X2go-User] Problem with xfreerdp ( any version )
Oleksandr Shneyder
oleksandr.shneyder at obviously-nice.de
Tue Feb 14 10:24:06 CET 2012
Am 10.02.2012 11:34, schrieb Helmer Teles:
> On Friday 10 February 2012 08:47:56 Oleksandr Shneyder wrote:
>
>> Am 03.02.2012 17:33, schrieb Helmer Teles:
>
>> > Hello List,
>
>> > I'm still having the same problem with latest windows client and latest
>
>> > x2go Linux Client.
>
>> > Problem still exists with X2goclient 3.99.1.0 Win32 Client running on
>
>> > Windows XP, both with xinerama on or off.
>
>> > Best wishes,
>
>> > helmer.
>
>>
>
>> Hello Helmer,
>
>> Yes, I can reproduce it. I don't think that it is a X2Go error, but
>
>> issue with nxagent or xfreerdp. I'll try to found the error, but it will
>
>> take some time.
>
>>
>
>> regards,
>
>> alex
>
>
[...............]
Hello Helmer,
I found a problem in xfreerdp code. I have tried several times to post a
problem description (inclusive solution and patch) to freerdp-devel
mailing list. Unfortunately my posts are not published in list, though I
got no error messages from mail-robot on
freerdp-devel at lists.sourceforge.net. I giving up. Please try to repost
it, if you have access to freerdp mailing-list:
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: oleksandr.shneyder at obviously-nice.de
web: www.obviously-nice.de
--> X2go - everywhere at home
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20120214/fe27eb95/attachment.pgp>
More information about the x2go-dev
mailing list