CVS: rdesktop xwin.c,1.230,1.231

Peter Åstrand <[email protected]> Wed, 26 Mar 2008 10:16:34 -0700
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3871

Modified Files:
	xwin.c 
Log Message:
Decreased timeout in sw_wait_configurenotify to one second, to reduce
frusrtation with old metacity versions. Need to use gettimeofday. 




Index: xwin.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/xwin.c,v
retrieving revision 1.230
retrieving revision 1.231
diff -C2 -d -r1.230 -r1.231
*** xwin.c	26 Mar 2008 16:44:55 -0000	1.230
--- xwin.c	26 Mar 2008 17:16:32 -0000	1.231
***************
*** 567,576 ****
  	XEvent xevent;
  	sw_configurenotify_context context;
! 	time_t start;
  	RD_BOOL got = False;
  
  	context.window = wnd;
  	context.serial = serial;
! 	start = time(NULL);
  
  	do
--- 567,579 ----
  	XEvent xevent;
  	sw_configurenotify_context context;
! 	struct timeval now;
! 	struct timeval nextsecond;
  	RD_BOOL got = False;
  
  	context.window = wnd;
  	context.serial = serial;
! 
! 	gettimeofday(&nextsecond, NULL);
! 	nextsecond.tv_sec += 1;
  
  	do
***************
*** 582,587 ****
  		}
  		usleep(100000);
  	}
! 	while (time(NULL) - start < 2);
  
  	if (!got)
--- 585,591 ----
  		}
  		usleep(100000);
+ 		gettimeofday(&now, NULL);
  	}
! 	while (timercmp(&now, &nextsecond, <));
  
  	if (!got)


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace