Hi Sam,
This screams for a private function. If that isn't possible for ABI break reasons, please add a note to refactor ASAP.
"o" is a terrible name for a variable. Also, using the correct constructor for the vector means avoiding a call to resize.
void WHATEVER::ComputeShadowsForScreen(Screen* screen) { CompOption::Vector options(1); CompOption& option = options.back (); option = CompOption ("active", CompOption::TypeBool); option.value ().set (true);
screen->handleCompizEvent ("decor", "occlusion_detection", options); foreach (CompWindow *cw, DecorScreen::get (screen)->cScreen->getWindowPaintList ()) { DecorWindow::get (cw)->computeShadowRegion (); } option.value ().set (false); screen->handleCompizEvent ("decor", "occlusion_detection", options); }
« Back to merge proposal
Hi Sam,
This screams for a private function. If that isn't possible for ABI break
reasons, please add a note to refactor ASAP.
"o" is a terrible name for a variable. Also, using the correct constructor
for the vector means avoiding a call to resize.
void WHATEVER: :ComputeShadows ForScreen( Screen* screen) :Vector options(1); :TypeBool) ;
{
CompOption:
CompOption& option = options.back ();
option = CompOption ("active", CompOption:
option.value ().set (true);
screen- >handleCompizEv ent ("decor", "occlusion_ detection" , options);
DecorScreen ::get (screen) ->cScreen- >getWindowPaint List ()) ::get (cw)->computeSh adowRegion (); >handleCompizEv ent ("decor", "occlusion_ detection" , options);
foreach (CompWindow *cw,
{
DecorWindow
}
option.value ().set (false);
screen-
}