1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 04:17:33 +00:00

x11: do not treat init failure as fatal with Wayland

This commit is contained in:
bi4k8 2022-12-12 23:04:58 +00:00 committed by Brenden Matthews
parent b556f17648
commit 6b0c194515
No known key found for this signature in database
GPG Key ID: B49ABB7270D9D4FD
2 changed files with 6 additions and 2 deletions

View File

@ -225,6 +225,8 @@ bool display_output_x11::shutdown() { return false; }
bool display_output_x11::main_loop_wait(double t) {
/* wait for X event or timeout */
if(!display || !window.gc)
return true;
if (XPending(display) == 0) {
fd_set fdsr;

View File

@ -231,11 +231,13 @@ static void init_X11() {
? dispstr.c_str()
: nullptr;
if ((display = XOpenDisplay(disp)) == nullptr) {
std::string err = std::string("can't open display: ") +
XDisplayName(disp);
#ifdef BUILD_WAYLAND
fprintf(stderr, "%s\n", err.c_str());
return;
#else
throw std::runtime_error(std::string("can't open display: ") +
XDisplayName(disp));
throw std::runtime_error(err);
#endif
}
}