Just pass [this, id] to the lambda, where id is the entry->id() copied to a string.
1061 + CompScreen* screen_;
FYI CompScreen is exported by <core/screen.h> as a global "screen" variable and is always available since the plugin initialization, so you can just use that reference if you want.
110 + auto accelerator( gtk_accelerator _name(gdk_ keyval_ to_lower( gdk_unicode_ to_keyval( mnemonic) ), GDK_MOD1_MASK));
use glib::String here.
111 + auto action( std::make_ shared< CompAction> ());
Why not just auto action = std::make_shared... ? g++ would just use the best way to initialize it. Same in other places...
115 + action- >setInitiate( [=](CompAction* action, CompAction::State state, CompOption::Vector& options)
116 + {
Just pass [this, id] to the lambda, where id is the entry->id() copied to a string.
1061 + CompScreen* screen_;
FYI CompScreen is exported by <core/screen.h> as a global "screen" variable and is always available since the plugin initialization, so you can just use that reference if you want.
884 + action. setInitiate( [=] setTerminate( [=]
892 + action.
It doesn't seem you need to pass anything a part from [this] to these lambdas, so just avoid to copy everything please.
1066 + std::map<CompAction const*, unsigned int> action_ ids_by_ action_ ; by_action_ id_;
1067 + std::map<unsigned int, CompAction const*> actions_
As you're never iterating over them, using std::unordered_map here might give us some benefit.