fix(background_manager): more cleanup in deactivate

This has no effects on bar behaviour, as `deactivate` is currently not used anywhere.
This commit is contained in:
Benno Fünfstück 2018-08-13 18:39:04 +02:00 committed by Patrick Ziegler
parent 15b84dda07
commit 2d385150bd

View File

@ -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};
}