In the next days I'll start to restructure the layout of the fvwm
frames.  Specifically, the decor_w (decor window) will go away.
But I'm not yet sure what the correct new layout is.  This is the
current situation:

The frame window has two children, the decor window and the parent
window:

              +--------------------+
              |                    |
              |                    |
              |                    |
              |       frame        |
              |                    |
              |                    |
              |                    |
              +--------------------+

  +--------------------+   ......................
  |                    |   .                    .
  |                    |   +--------------------+
  |                    |   |                    |
  |       decor_w      |   |                    |
  |                    |   |       Parent       |
  |                    |   |                    |
  |                    |   |                    |
  +--------------------+   +--------------------+

The parent window has the client window as its single child (same
size).  The decor window has nine children:  the eight handles and
the title window (title_w).  This is a zoom into the top left edge
of the decor window:


  o...........o+---------------------
  :top left   :|    top handle
  :handle     :|
  :    +-------+---------------------
  :    |      :
  :    |      :   title window
  :    |      :
  o....|......o
  |    +----------------------------
  |    |
  |    |  Parent/client window
  |    |
  |    |
    ^
    |
  right handle

The title window is raised above the handles and thus covers part
of the corer handle windows.

There are several problems with the decor window:

 - Since the border is drawn on the foreground of the frame
   itself, it is often necessary to redraw borders.  Borders
   flicker heavily during opaque resize.
 - The title buttons don't stick to their corners when the frame
   is resized.  This flickers too.

Now the draft of a solution I have come up with.  The decor window
is removed, and the title window and button windows become
children of the frame.  The border is drawn into the handle
windows by setting a backgorund pixmap.  Thus, a simple
XClearWindow() would redraw any exposed parts of the borders
without flickering.  To further reduce flickering, the cornes
handles stay invisible, and four tiny "corner pieces" are added in
the corners:

corner
piece
  o....o+----------------------------
  :    :|    top handle
  :    :|
  o....o+----------------------------
  +----+o......o
  |    |:button:
  |    |:  1   :
  |    |:      :
  |    |o......o
  |    |
  |    |
  |    |
  |    |
  |    |
  |    |
    ^
    |
 right handle

(The top left handle is not drawn for clarity.  It is a square
window that begins at the top left of the corner piece and ends at
the bottom right of button 1.)

So far, we removed one window (decor_w) and added four new ones
(the corner pieces).  However, there's no place to draw the bevels
for the handles yet.  Since they should stick to the corners, they
shouldn't be drawn into the side handles.  They would be outside
the corner pieces, and the corner handles are invisible.  I see
two solutions:

 - Draw them on the foreground of the side handles.  In this case,
   they would either flicker during opaque resize/shading or have
   to been deleted.

 - Introduce 8 (eight) new windows, each two pixels thick and as
   long as the border is thick.  Although they'd sum up to only a
   few pixels, there certainly is a memory penalty for eight
   additional windows for each frame.  On the other hand, window
   shading and opaque resizing will become absolutely prefect (not
   counting what the application does with its own windows).

I prefer the second solution, but I'm unsure about the memory
penalty.

Bye

Dominik ^_^  ^_^

-- 
Dominik Vogt, email: [EMAIL PROTECTED]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to