From 15b84dda07e4840c56f420a52e230dc186c44597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benno=20F=C3=BCnfst=C3=BCck?= Date: Mon, 13 Aug 2018 18:38:36 +0200 Subject: [PATCH] docs(background_manager): add comments --- include/x11/background_manager.hpp | 42 +++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) 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();