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) {
|
bool display_output_x11::main_loop_wait(double t) {
|
||||||
/* wait for X event or timeout */
|
/* wait for X event or timeout */
|
||||||
|
if(!display || !window.gc)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (XPending(display) == 0) {
|
if (XPending(display) == 0) {
|
||||||
fd_set fdsr;
|
fd_set fdsr;
|
||||||
|
@ -231,11 +231,13 @@ static void init_X11() {
|
|||||||
? dispstr.c_str()
|
? dispstr.c_str()
|
||||||
: nullptr;
|
: nullptr;
|
||||||
if ((display = XOpenDisplay(disp)) == nullptr) {
|
if ((display = XOpenDisplay(disp)) == nullptr) {
|
||||||
|
std::string err = std::string("can't open display: ") +
|
||||||
|
XDisplayName(disp);
|
||||||
#ifdef BUILD_WAYLAND
|
#ifdef BUILD_WAYLAND
|
||||||
|
fprintf(stderr, "%s\n", err.c_str());
|
||||||
return;
|
return;
|
||||||
#else
|
#else
|
||||||
throw std::runtime_error(std::string("can't open display: ") +
|
throw std::runtime_error(err);
|
||||||
XDisplayName(disp));
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user