[compiz] Question about extending screengrabs

David Reveman davidr at novell.com
Wed Jan 10 07:39:31 PST 2007


On Fri, 2007-01-05 at 16:00 +0100, Danny Baumann wrote:
> Hi,
> 
> I have a question regarding screengrabs:
> At the moment, a lot of interaction between the plugins is done by
> checking for screen grabs of other plugins with the function
> otherScreenGrabExist. But pushing a screen grab means grabbing keyboard
> and mouse pointer, so no user interaction with the desktop is possible.
> 
> However, some plugins (such as showdesktop) need user interaction with
> the desktop while still being able to prevent other plugin actions (e.g.
> no rotate while showdesktop).
> 
> For that problem, I have a proposal:
> 
> - Add the possibility of a "passive" screen grab (only registered in
> s->grabs, but not actually grabbing the pointer and keyboard).
> 
> - Add a function checkScreenGrabExist - needed for checking if a
> particular plugin already has a screen grab.
> 
> What do you think of this proposal? If you think it's bad - can you make
> a better suggestion for this problem? ;-)
> If you think it's good, I can provide patches for both items.

As far as possible, I'd like to see awareness of other plugins avoided.
However, there are obviously cases where this can't be avoided and for
those case we need something.

Wouldn't it be better to add this kind of functionality through
different interface than the current screen grab interface? We can
always expose the current screen grabs through a new interface if we
want that.

I'm not sure exactly how this interface should look like but seems like
it would makes sense to be able to not just check if some state is
present but also be able to prevent a state from being entered.

E.g. instead of the rotate plugin checking for some "showdesktop" state,
the showdesktop plugin could check for a "rotate" state and prevent it
from being entered while being in "showdesktop" state.

What do you think? Do you think that extending the screen grab interface
is the best way to do this anyhow?

-David



More information about the compiz mailing list