[compiz] Question about extending screengrabs

David Reveman davidr at novell.com
Thu Jan 18 11:42:31 PST 2007


On Thu, 2007-01-11 at 15:31 +0100, Danny Baumann wrote:
> Hi,
> 
> > 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?
> 
> I'm not sure if we would gain a lot from that. The idea sounds very
> nice, but thinking about it I have the impression that such an interface
> would be much more complicated than what we have now.
> 
> I can think of two use cases for the whole checking:
> 
> - A plugin wants to check if other plugins are active which could be
> disturbing ... otherScreenGrabExist is perfectly suited for that by
> whitelisting non-disturbing plugins.
> 
> - A plugin wants to check if certain actions are related to a certain
> plugin (e.g. a viewport change causes a move) ... that's why I proposed
> the screenGrabExist function
> 
> While your proposal sounds really nice, it only would change the
> checking order (rotate checks for other plugins vs. other plugins check
> for rotate). In both cases, all plugins need to be aware of the name of
> other plugins which could disturb them. That's why I see no big gain
> from another interface replacing the screen grab interface.

As Mike already mentioned this whole issue is very related to exposing
the state of screen and display actions. Lets see if we can get that
fixed soon.

However, I've been planning to update the screen grab interface so that
it's possible to just grab the keyboard or the pointer and not
necessarily both. As part of doing that we can also allow screen grabs
which neither grab the keyboard or pointer. I can understand that this
can be more useful than trying to keep track of all conflicting action
states. Feel free to implement it if you want to.

> 
> BTW: As I mentioned viewport changes - wouldn't it be a good idea to
> pass the information if a window movement is caused by a viewport change
> to moveWindow or into a member of the CompScreen structure?

The more general immediate parameter is used for this currently. The
plan is to add higher level notify functions which will allow plugins to
know about state changes like this. 

-David



More information about the compiz mailing list