From 2d385150bd7d7baccc8c763a9e6ed957a0c4a0c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benno=20F=C3=BCnfst=C3=BCck?= Date: Mon, 13 Aug 2018 18:39:04 +0200 Subject: [PATCH] fix(background_manager): more cleanup in deactivate This has no effects on bar behaviour, as `deactivate` is currently not used anywhere. --- src/x11/background_manager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/x11/background_manager.cpp b/src/x11/background_manager.cpp index 383d44bc..a8885825 100644 --- a/src/x11/background_manager.cpp +++ b/src/x11/background_manager.cpp @@ -54,7 +54,12 @@ void background_manager::activate(xcb_window_t window, xcb_rectangle_t rect) { } void background_manager::deactivate() { + if(m_attached) { + m_connection.detach_sink(this, SINK_PRIORITY_SCREEN); + m_attached = false; + } free_resources(); + m_rect = xcb_rectangle_t{0, 0, 0, 0}; }