On Monday 26 November 2001 12:28, Wilbert Berendsen wrote:
> Yesterday at 4:24pm, Sean 'Shaleh' Perry said:
> > > Here are a few of my intial findings.  The proposed algorithm relies
> > > on knowing the location of all windows.  It then creates a list of
> > > the uncovered desktop area expressed in rectangles.  This means that
> > > there would need to be notifications sent on all window placements
> > > and moves. I will begin work on a coding a basic implimentation of
> > > the alogrithm soon.
> >
> > nifty.  Thanks for the time.
>
> IMHO It's not necessary for bb to keep the list in memory. It may be
> possible to use the window list Blackbox keeps, and query the X server
> for the locations and sizes of them each time a new window should be
> "smart-placed".

Ick, you definately want to keep the list.  Each time you ask the X server 
for the coordinates, that is a round trip... roundtrips take time, so you 
want to do as much as you can client side (in this case, window manager 
side).

> After the new window has been placed that list can be thrown away I
> think.
>
> This is much faster than the current algorithm, which queries the
> locations and sizes of each window for every pixel-row and column on the
> screen. (see Workspace.cc)

This algorithm is quite inefficient, and I do have another one that I need 
to adapt.  It's not that hard to do though...

> Isn't it possible to implement the algorithm without changing anything
> in the BlackboxWindow class? (e.g. just frame.x, frame.y, frame.width
> and frame.height are needed, and it seems that (in Window.hh/cc)  these
> values already are being kept track of.
>
> So I don't think the notifications stuff would be necessary.  (but I'm
> not an experienced X or C++ programmer)
>
> thanks, and regards,
> Wilbert

-- 
--
Bradley T. Hughes <[EMAIL PROTECTED]>
Trolltech AS - Waldemar Thranes gt. 98 N-0175 Oslo, Norway
Office: +47 21604892
Mobile: +47 92019781

Reply via email to