Help on heads



maximize-window and get-visible-window-edges have code to handle
multiple heads, but I'm not 100% sure how heads work, and thus what
changes I need to make to those bits to make maximize-window work
without having to switch viewports.

My guess based on the sawfish docs and what I see in the code is this:

 - When there's more than one head a given viewport includes all of
   them, and screen-width/height give the dimensions of both heads put
   together.

 - head-offset and head-dimensions are going to be constant for a
   particular head across viewports -- i.e., changing the viewport will
   not change these values.

If this is right then I can calculate the edges of a head on a
particular viewport simply by taking head-offset and head-dimensions and
applying a viewport offset: the difference between the 0,0 point of the
current viewport versus the specified viewport.  And I can also get the
head corresponding to a point in a non-visible viewport by applying the
same offset to get the corresponding point in the current viewport and
calling find-head on it.

I'm going to go ahead and continue on the assumption that I'm right
here, but I'd appreciate it if anyone who knows (or who has multiple
heads and can test it) could confirm or deny.

-- 
Jeremy Hankins <nowan nowan org>


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