mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-15 09:44:04 +00:00
X11: Fix segfault on SIGINT
deinit_x11() was called too late, and it seems some libs like xinerama and xcb-render add cleanup hooks but forget to remove them when they get unloaded.
This commit is contained in:
parent
a41d82b6a6
commit
c781b42f66
@ -222,7 +222,10 @@ bool display_output_x11::initialize() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool display_output_x11::shutdown() { return false; }
|
||||
bool display_output_x11::shutdown() {
|
||||
deinit_x11();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool display_output_x11::main_loop_wait(double t) {
|
||||
/* wait for X event or timeout */
|
||||
|
@ -80,7 +80,6 @@ static void update_workarea();
|
||||
static Window find_desktop_window(Window *p_root, Window *p_desktop);
|
||||
static Window find_subwindow(Window win, int w, int h);
|
||||
static void init_x11();
|
||||
static void deinit_x11();
|
||||
|
||||
/********************* <SETTINGS> ************************/
|
||||
namespace priv {
|
||||
@ -275,7 +274,7 @@ static void init_x11() {
|
||||
DBGP("leave init_x11()");
|
||||
}
|
||||
|
||||
static void deinit_x11() {
|
||||
void deinit_x11() {
|
||||
if (display) {
|
||||
DBGP("deinit_x11()");
|
||||
XCloseDisplay(display);
|
||||
|
Loading…
Reference in New Issue
Block a user