mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-01 16:56:38 +02:00
- Improved Open Display function in kintox11 to retry for 1 minute, may be helpful in some distro configs.
This commit is contained in:
Binary file not shown.
@@ -59,9 +59,20 @@ int strcicmp(char const *a, char const *b)
|
||||
}
|
||||
|
||||
Display* open_display(){
|
||||
int i;
|
||||
Display* d = XOpenDisplay(NULL);
|
||||
for (i = 0; i < 60; i++) {
|
||||
if(d == NULL){
|
||||
printf("fail to open X server display...\n");
|
||||
}
|
||||
else{
|
||||
break;
|
||||
}
|
||||
sleep(1);
|
||||
}
|
||||
if(d == NULL){
|
||||
printf("fail to open X server display...\n");
|
||||
printf("fail to open X server display for 1 minute...\n");
|
||||
printf("Kintox11 is now exiting...\n");
|
||||
exit(1);
|
||||
}
|
||||
return d;
|
||||
@@ -109,7 +120,7 @@ Window get_top_window(Display* d, Window start){
|
||||
XFree(children);
|
||||
|
||||
if(xerror){
|
||||
printf("fail to get top window: %d\n",w);
|
||||
printf("fail to get top window: %ld\n",w);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user