Code review comment for lp:~nwkj86/compiz/add-background-conf-to-switcher

Revision history for this message
Artur (nwkj86) wrote :

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