566 |
{ |
{ |
567 |
XEvent xevent; |
XEvent xevent; |
568 |
sw_configurenotify_context context; |
sw_configurenotify_context context; |
569 |
time_t start; |
struct timeval now; |
570 |
|
struct timeval nextsecond; |
571 |
RD_BOOL got = False; |
RD_BOOL got = False; |
572 |
|
|
573 |
context.window = wnd; |
context.window = wnd; |
574 |
context.serial = serial; |
context.serial = serial; |
575 |
start = time(NULL); |
|
576 |
|
gettimeofday(&nextsecond, NULL); |
577 |
|
nextsecond.tv_sec += 1; |
578 |
|
|
579 |
do |
do |
580 |
{ |
{ |
584 |
break; |
break; |
585 |
} |
} |
586 |
usleep(100000); |
usleep(100000); |
587 |
|
gettimeofday(&now, NULL); |
588 |
} |
} |
589 |
while (time(NULL) - start < 2); |
while (timercmp(&now, &nextsecond, <)); |
590 |
|
|
591 |
if (!got) |
if (!got) |
592 |
{ |
{ |