Decreased timeout in sw_wait_configurenotify to one second, to reduce
frusrtation with old metacity versions. Need to use gettimeofday. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1460 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
3a949d3127
commit
af3925665a
10
xwin.c
10
xwin.c
@ -566,12 +566,15 @@ sw_wait_configurenotify(Window wnd, unsigned long serial)
|
||||
{
|
||||
XEvent xevent;
|
||||
sw_configurenotify_context context;
|
||||
time_t start;
|
||||
struct timeval now;
|
||||
struct timeval nextsecond;
|
||||
RD_BOOL got = False;
|
||||
|
||||
context.window = wnd;
|
||||
context.serial = serial;
|
||||
start = time(NULL);
|
||||
|
||||
gettimeofday(&nextsecond, NULL);
|
||||
nextsecond.tv_sec += 1;
|
||||
|
||||
do
|
||||
{
|
||||
@ -581,8 +584,9 @@ sw_wait_configurenotify(Window wnd, unsigned long serial)
|
||||
break;
|
||||
}
|
||||
usleep(100000);
|
||||
gettimeofday(&now, NULL);
|
||||
}
|
||||
while (time(NULL) - start < 2);
|
||||
while (timercmp(&now, &nextsecond, <));
|
||||
|
||||
if (!got)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user