Hi,
I think that problem with not updating background settings is caused by:
optionSetUseBackgroundColorNotify (boost::bind (&BaseSwitchScreen::updateBackground, this, optionGetUseBackgroundColor (), optionGetBackgroundColor ()));
optionGetBackgroundColor is binded once forever.
Consider: #include <boost/bind.hpp> #include <iostream> using namespace std; using namespace boost; int getI() { static int i; i++; cout << "getI() = " << i << endl; return i; } void printer(int i) { cout << "printer(" << i << ")" << endl; } int main() { auto p = bind(&printer, getI()); p(); p(); p(); return 0; }
What should be printed?
BTW: is C++11 available in compiz?
« Back to merge proposal
Hi,
I think that problem with not updating background settings is caused by:
optionSetUseBac kgroundColorNot ify (boost::bind (&BaseSwitchScr een::updateBack ground, this, optionGetUseBac kgroundColor (), optionGetBackgr oundColor ()));
optionGetBackgr oundColor is binded once forever.
Consider:
#include <boost/bind.hpp>
#include <iostream>
using namespace std;
using namespace boost;
int getI()
{
static int i;
i++;
cout << "getI() = " << i << endl;
return i;
}
void printer(int i)
{
cout << "printer(" << i << ")" << endl;
}
int main()
{
auto p = bind(&printer, getI());
p();
p();
p();
return 0;
}
What should be printed?
BTW: is C++11 available in compiz?