Re: [RFC] _NET_WORKAREA and Xinerama

Havoc Pennington wrote:
On Mon, Mar 17, 2003 at 09:50:44AM -0600, Sasha Vasko wrote:

I don't really see whats the problem with that approach and why struts has to make contiguous region. The algorithms for avoiding arbitrary non-contiguous area are many and trivial to implement - I do all of the above plus edge snapping in about 100 lines of code in AfterStep.

Can you post the code? Is that only for motion, or for resizing?

The actuall code for avoiding/snapping starts in moveresize.c at line 455 I think.

Basically I build ordered list of vertical and horizontal gridlines and assign gravities to each side of each grid line. Negative gravity signifies that no window should approach it closer then the modulus of gravity, while posititive gravity signifies distance from which window edge could be attracted to the gridline.

This thing is more complex due to the edge-snapping, and If I was doing just the strut/avoid cover thing I would go with the set of available rectangles and best-fit criteria.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]