Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/modules/privacy/privacy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class Privacy : public AModule {

// Config
Gtk::Box box_;
std::vector<PrivacyItem*> modules_;
uint iconSpacing = 4;
uint iconSize = 20;
uint transition_duration = 250;
Expand Down
5 changes: 2 additions & 3 deletions src/modules/privacy/privacy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Privacy::Privacy(const std::string& id, const Json::Value& config, Gtk::Orientat
auto* item = Gtk::make_managed<PrivacyItem>(module, nodeType, nodePtr, orientation, pos,
iconSize, transition_duration);
box_.add(*item);
modules_.push_back(item);
}
}

Expand Down Expand Up @@ -148,9 +149,7 @@ auto Privacy::update() -> void {
bool useAudioOut = false;

mutex_.lock();
for (Gtk::Widget* widget : box_.get_children()) {
auto* module = dynamic_cast<PrivacyItem*>(widget);
if (module == nullptr) continue;
for (PrivacyItem* module : modules_) {
switch (module->privacy_type) {
case util::PipewireBackend::PRIVACY_NODE_TYPE_VIDEO_INPUT:
setScreenshare = true;
Expand Down