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:
parent
b556f17648
commit
6b0c194515
@ -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;
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user