watch for a failed opening of the X server!
This commit is contained in:
parent
027dbd1c20
commit
a906821589
1 changed files with 5 additions and 1 deletions
|
@ -34,11 +34,15 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Display *display = XOpenDisplay(NULL);
|
Display *display = XOpenDisplay(NULL);
|
||||||
|
if (! display) {
|
||||||
|
cout << "Failed to open connection to X display\n";
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
XftObjectSet *obj = XftObjectSetCreate();
|
XftObjectSet *obj = XftObjectSetCreate();
|
||||||
if (! obj) {
|
if (! obj) {
|
||||||
cout << "Failed to create an XftObjectSet\n";
|
cout << "Failed to create an XftObjectSet\n";
|
||||||
exit(2);
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
XftObjectSetAdd(obj, XFT_FAMILY);
|
XftObjectSetAdd(obj, XFT_FAMILY);
|
||||||
|
|
Loading…
Reference in a new issue