diff --git a/include/x11/background_manager.hpp b/include/x11/background_manager.hpp index 33d5a36f..85f72ab0 100644 --- a/include/x11/background_manager.hpp +++ b/include/x11/background_manager.hpp @@ -16,6 +16,13 @@ namespace cairo { class xcb_surface; } +/** + * \brief Class to keep track of the desktop background used to support pseudo-transparency + * + * For pseudo-transparency that bar needs access to the desktop background. + * We only need to store the slice of the background image which is covered by the bar window, + * so this class takes a rectangle that limits what part of the background is stored. + */ class background_manager : public signal_receiver, public xpp::event::sink { @@ -23,29 +30,62 @@ class background_manager : public signal_receiver m_surface; + // true if we are currently attached as a listener for desktop background changes bool m_attached{false}; void allocate_resources();