[compiz] Patch to wobbly snap for outputs

David Reveman davidr at novell.com
Mon Dec 11 20:32:41 PST 2006


On Fri, 2006-12-08 at 12:09 -0700, Mike Cook wrote:
> Here's a patch to wobbly.c to handle edge snapping with multiple outputs...

After looking at this I found the correct solution to be to just snap to
window struts instead of any workarea. I've pushed out changes that
should take care of this. I don't have access to a multi-head setup
right now so I can't verify that it works OK. Please give it a try.

> 
> Also, I tweaked the window edge snapping to include dock window types, to
> support the case where dock windows may be on the inner edges of multiple
> monitors (and thus currently ignored as struts in the output workarea setup).

I've included a few more window types in snapping. However, including
dock windows is probably not a good idea. Sometime windows with dock
type and below state are used for windows that shouldn't have any
decorations and stick to the desktop. We don't want to snap to those.

> 
> I personally think we should include these "inner" struts when calculating the
> workarea for each output (which also helps window maximizing), and only
> ignore them in the screen workarea case (for the _NET_WORKAREA hint).

What do you mean by "inner" struts? Each workarea rectangle should be
the maximum rectangle that doesn't intersect any struts. If that's
currently not the case, it should be fixed.

If the workarea isn't good enough for a plugin it should instead look at
the strut hints for each window like the wobbly plugin is now doing. We
can add a region to the output struct that is the output area minus all
window struts if that turns out useful for plugins.

-David



More information about the compiz mailing list