One small point: I think it might be better to pass 8 for bitmap_pad
rather than g_bpp... which should have the same effect of specifying no
padding, but is in line with X11 documentation which specifies that you
should pass 8, 16 or 32 for bitmap_pad. I'm a little worried that some
future X server might not be happy with 24.
In principle I also tend to agree with Ilya, that it would be better to
supply bytes_per_line as a sanity check... if rdesktop and X disagree on
it then you'd get garbage on the screen, as you saw with your initial
test. But then, for bitmap_pad=8, I can't imagine that the X server
would arrive at a different value to cx*g_bpp/8.
Matt
On Thu, Apr 12, 2007 at 10:03:16AM -0400, Mark Heily wrote:
> Here is a corrected patch that fixes the segfault and correctly redraws the
> desktop image. This has
> been tested with a Windows 2000 Server at 8bpp and a Windows 2003 server at
> 16bpp.
>
> Thanks to Mat G for his suggestion on how to fix my original patch.
>
> -Mark
>
>
> --- ../rdesktop/xwin.c 2007-01-17 02:39:31.000000000 -0500
> +++ xwin.c 2007-04-12 09:51:46.000000000 -0400
> @@ -3218,7 +3218,7 @@
> return;
>
> image = XCreateImage(g_display, g_visual, g_depth, ZPixmap, 0,
> - (char *) data, cx, cy, BitmapPad(g_display), cx *
> g_bpp / 8);
> + (char *) data, cx, cy, g_bpp, 0);
>
> if (g_ownbackstore)
> {
> --- ../rdesktop/xwin.c 2007-01-17 02:39:31.000000000 -0500
> +++ xwin.c 2007-04-12 09:51:46.000000000 -0400
> @@ -3218,7 +3218,7 @@
> return;
>
> image = XCreateImage(g_display, g_visual, g_depth, ZPixmap, 0,
> - (char *) data, cx, cy, BitmapPad(g_display), cx *
> g_bpp / 8);
> + (char *) data, cx, cy, g_bpp, 0);
>
> if (g_ownbackstore)
> {
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> rdesktop-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/rdesktop-devel
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]