CVS: rdesktop rdp.c,1.60,1.61 xwin.c,1.170,1.171

Jay Sorg <[email protected]>
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv516

Modified Files:
	rdp.c xwin.c 
Log Message:
warnings when screen size of depth change and backstore resizeing when screen size changes

Index: rdp.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdp.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -d -r1.60 -r1.61
*** rdp.c	30 Apr 2004 06:18:08 -0000	1.60
--- rdp.c	4 Jun 2004 15:01:35 -0000	1.61
***************
*** 652,660 ****
  	 * example when shadowing another session).
  	 */
! 	g_server_bpp = bpp;
! 	g_width = width;
! 	g_height = height;
! 
! 	ui_resize_window();
  }
  
--- 652,668 ----
  	 * example when shadowing another session).
  	 */
! 	if (g_server_bpp != bpp)
! 	{
! 		warning("colour depth changed from %d to %d\n", g_server_bpp, bpp);
! 		g_server_bpp = bpp;
! 	}
! 	if (g_width != width || g_height != height)
! 	{
! 		warning("screen size changed from %dx%d to %dx%d\n", g_width, g_height,
! 				width, height);
! 		g_width = width;
! 		g_height = height;
! 		ui_resize_window();
! 	}
  }
  

Index: xwin.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/xwin.c,v
retrieving revision 1.170
retrieving revision 1.171
diff -C2 -d -r1.170 -r1.171
*** xwin.c	1 Jun 2004 08:06:02 -0000	1.170
--- xwin.c	4 Jun 2004 15:01:36 -0000	1.171
***************
*** 1032,1035 ****
--- 1032,1036 ----
  {
  	XSizeHints *sizehints;
+ 	Pixmap bs;
  
  	sizehints = XAllocSizeHints();
***************
*** 1047,1050 ****
--- 1048,1062 ----
  		XResizeWindow(g_display, g_wnd, g_width, g_height);
  	}
+ 
+ 	/* create new backstore pixmap */
+ 	if (g_backstore != 0)
+ 	{
+ 		bs = XCreatePixmap(g_display, g_wnd, g_width, g_height, g_depth);
+ 		XSetForeground(g_display, g_gc, BlackPixelOfScreen(g_screen));
+ 		XFillRectangle(g_display, bs, g_gc, 0, 0, g_width, g_height);
+ 		XCopyArea(g_display, g_backstore, bs, g_gc, 0, 0, g_width, g_height, 0, 0);
+ 		XFreePixmap(g_display, g_backstore);
+ 		g_backstore = bs;
+ 	}
  }
  



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.