Re: [RFC] _NET_WORKAREA and Xinerama
- From: Sasha Vasko <sasha aftercode net>
- To: Havoc Pennington <hp redhat com>
- Cc: Soeren Sandmann <sandmann daimi au dk>, wm-spec-list gnome org
- Subject: Re: [RFC] _NET_WORKAREA and Xinerama
- Date: Mon, 17 Mar 2003 11:03:37 -0600
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?
http://cvs.aftercode.net/cgi-bin/viewcvs.cgi/afterstep-stable/libAfterStep/moveresize.c?rev=1.14&content-type=text/vnd.viewcvs-markup
http://cvs.aftercode.net/cgi-bin/viewcvs.cgi/afterstep-stable/libAfterStep/moveresize.h?rev=1.6&content-type=text/vnd.viewcvs-markup
http://cvs.aftercode.net/cgi-bin/viewcvs.cgi/afterstep-stable/libAfterBase/layout.h?rev=1.11&content-type=text/vnd.viewcvs-markup
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.
Havoc
Sasha.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]