CVS: rdesktop xwin.c,1.164,1.165

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-serv17048

Modified Files:
	xwin.c 
Log Message:
speed up screenblt if screen is unobscured

Index: xwin.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/xwin.c,v
retrieving revision 1.164
retrieving revision 1.165
diff -C2 -d -r1.164 -r1.165
*** xwin.c	26 Apr 2004 23:14:07 -0000	1.164
--- xwin.c	30 Apr 2004 19:14:15 -0000	1.165
***************
*** 46,49 ****
--- 46,50 ----
  extern uint32 g_embed_wnd;
  BOOL g_enable_compose = False;
+ BOOL g_Unobscured; /* used for screenblt */
  static GC g_gc = NULL;
  static Visual *g_visual;
***************
*** 1006,1009 ****
--- 1007,1011 ----
  	}
  	while (xevent.type != VisibilityNotify);
+ 	g_Unobscured = xevent.xvisibility.state == VisibilityUnobscured;
  
  	g_focused = False;
***************
*** 1104,1107 ****
--- 1106,1112 ----
  		switch (xevent.type)
  		{
+ 			case VisibilityNotify:
+ 				g_Unobscured = xevent.xvisibility.state == VisibilityUnobscured;
+ 				break;
  			case ClientMessage:
  				/* the window manager told us to quit */
***************
*** 1850,1855 ****
  	if (g_ownbackstore)
  	{
! 		XCopyArea(g_display, g_backstore, g_wnd, g_gc, srcx, srcy, cx, cy, x, y);
! 		XCopyArea(g_display, g_backstore, g_backstore, g_gc, srcx, srcy, cx, cy, x, y);
  	}
  	else
--- 1855,1868 ----
  	if (g_ownbackstore)
  	{
! 		if (g_Unobscured)
! 		{
! 			XCopyArea(g_display, g_wnd, g_wnd, g_gc, srcx, srcy, cx, cy, x, y);
! 			XCopyArea(g_display, g_backstore, g_backstore, g_gc, srcx, srcy, cx, cy, x, y);
! 		}
! 		else
! 		{
! 			XCopyArea(g_display, g_backstore, g_wnd, g_gc, srcx, srcy, cx, cy, x, y);
! 			XCopyArea(g_display, g_backstore, g_backstore, g_gc, srcx, srcy, cx, cy, x, y);
! 		}
  	}
  	else



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
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.