Re: Additional issues to address for the constraints_experiments branch?

On 11/15/05, Soren Sandmann Pedersen <sandmann redhat com> wrote:
> Elijah Newren wrote:

> Yes, it's intended to generate all points that lie on an horizontal or
> vertical line of
> a corner of a strut. The idea is that all 'maximal rectangles' - ie.,
> rectangles that can't
> be expanded in any direction without hitting a strut - have corners at
> those points.

Ah, gotcha.  You're trying to generate what I've called "spanning
rectangles" on the fly given an arbitrary (probably nonintersecting)
set of rectangles that make up the region.  You wouldn't really need
to do this on the fly, as you could just do it when the strut list or
screen/xinerama size changes and save a list of these maximal/spanning
rectangles.  In fact, that is what I currently do, I just used a
different algorithm to obtain them (though I initially had considered
an algorithm similar to yours, minus the fact that I wasn't aware of

> Yeah, that's what the last sentence is supposed to take care of: After
> one corner of the
> window is positioned on one of the intersection points, move it towards
> the desired location
> until gdk_region_rect_in() stops returning RECTANGLE_OUT.

Uh, maybe you weren't trying to generate the maximal/spanning
rectangles after all or I didn't quite understand you.  If you do this
after picking the intersection point, aren't you potentially moving
the window a long distance and perhaps a different intersection point
would have been a better pick?


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