I was writing a simple plugin a while ago which just sets the paint values on inactive windows. The plugin is very simple and the main part is below. When I load this plugin it blocks dbus and fuse plugins so that they only reply to requests when the active window changes. Is there anything obvious here that would cause that? static Bool inactivePaintWindow (CompWindow *w, const WindowPaintAttrib *attrib, const CompTransform *transform, Region region, unsigned int mask) { Bool status; INACTIVE_SCREEN (w->screen); INACTIVE_WINDOW (w); WindowPaintAttrib fAttrib = *attrib; if (iw->managed && w->mapNum && (w->screen->display->activeWindow != w->id)) { Bool painted = FALSE; if (fAttrib.opacity != iw->inactiveOpacity) { fAttrib.opacity = iw->inactiveOpacity; painted = TRUE; } if (fAttrib.brightness != iw->inactiveBrightness) { fAttrib.brightness = iw->inactiveBrightness; painted = TRUE; } if (fAttrib.saturation != iw->inactiveSaturation) { fAttrib.saturation = iw->inactiveSaturation; painted = TRUE; } if (painted) addWindowDamage (w); } UNWRAP (is, w->screen, paintWindow); status = (*w->screen->paintWindow) (w, &fAttrib, transform, region, mask); WRAP (is, w->screen, paintWindow, inactivePaintWindow); return status; }
On Mon, 2007-04-09 at 17:26 +0100, Mike Dransfield wrote:> I was writing a simple plugin a while ago which just > sets the paint values on inactive windows. The plugin is > very simple and the main part is below. > > When I load this plugin it blocks dbus and fuse plugins > so that they only reply to requests when the active window > changes. > > Is there anything obvious here that would cause that? > > > static Bool > inactivePaintWindow (CompWindow *w, > const WindowPaintAttrib *attrib, > const CompTransform *transform, > Region region, > unsigned int mask) > { > Bool status; > INACTIVE_SCREEN (w->screen); > INACTIVE_WINDOW (w); > > WindowPaintAttrib fAttrib = *attrib; > > if (iw->managed > && w->mapNum > && (w->screen->display->activeWindow != w->id)) > { > Bool painted = FALSE; > if (fAttrib.opacity != iw->inactiveOpacity) > { > fAttrib.opacity = iw->inactiveOpacity; > painted = TRUE; > } > if (fAttrib.brightness != iw->inactiveBrightness) > { > fAttrib.brightness = iw->inactiveBrightness; > painted = TRUE; > } > if (fAttrib.saturation != iw->inactiveSaturation) > { > fAttrib.saturation = iw->inactiveSaturation; > painted = TRUE; > } > > if (painted) > addWindowDamage (w);This is probably causing the main loop to redraw all the time and never check for file descriptor changes. - David
2007/4/9, Mike Dransfield <mike@blueroot.co.uk>:> I was writing a simple plugin a while ago which just > sets the paint values on inactive windows. The plugin is > very simple and the main part is below. >There is a plugin which provides a similar functionality in the beryl git repository. It's called "addhelper". You can get a fresh clone of it at: git clone git://anongit.beryl-project.org/compiz/compiz-plugins-beryl-premerge But it uses Bcop which you should better have installed, if you want to compile it.. ;-) You can take a look at it when you any problems, it also supplies an alternative implementation of your code above. Regards, Patrick