Re: window frames



On Sat, Nov 30, 2002 at 01:36:45AM -0600, Gregory Merchan wrote:
> Is there a technical reason for a client to not draw its window frames?
>
> I know there are legacy reasons, but I think they can be handled
> transparently by maintained window managers and toolkits.
> 
> Clients that don't draw frames
>    The window manager, which would still exist, can check for a window
>    property indicating the client handles its frame. If the property is
>    not found, then the window manager would provide a frame.
> 
> Legacy window managers
>    A property could be set by the window manager to indicate it prefers
>    client-drawn frames. Clients would forgo drawing when this property
>    is absent.
> 
> Appearance
>    A root window property can provide a description of how frames should be
>    drawn. Complex frame elements of static size and shape can be stored
>    as server-side pixmaps.
> 
> 
> I'll defer elaboration until it's indicated that the benefits are not obvious.

There are many reasons not to do this:

 1) Applications can not be trusted to honour any requests.
 2) The application may be hung or busy.
 3) The application may chose to ignore parts of the request on
    purpose.
 4) Every application has to have the code to draw the
    decorations.
 5) Decoration drawing can be very, *very* complex.  Huge amounts
    of data would have to be sent to clients.
 6) It is *slow*:  the WM sends the description of the decorations
    to the X server.  The X server sends them to the client.  The
    client asks the X server to do the drawing.  This is at least
    three times slower than when the WM does the drawing.
 7) It wastes precious resources (bandwidth, cpu, possibly X
    server memory).
 8a) It forces horrendous code duplication upon the clients.
 8b) Alternatively, it forces the client to link with the same
     libraries as the window manager (e.g. imlib, unicode or utf8
     libs).
 9) It severely limits WM development:  if a WM developer codes a
    new feature in the decorations, the clients may not even be
    able to draw its frames.
10) The client may run on a different machine which may not have
    the proper libraries.
11) At the time the client tries to draw the decorations, the
    windows that it has to draw into may already have been
    resized, moved, unmapped, destroyed etc.
12) Either the client has to listen for Expose events on all frame
    windows or the WM has to ask the client to redraw the
    decorations every time is gets an Expose event.
13) It would make transparency effects unbearably choppy.
14) The window manager is forced to export internal information
    about its windows that may be abused in any way.
15) Shading windows would flicker a lot.
16) The whole interface would be abused by some application
    programmers.
17) Compliant applications and window managers would have both,
    the code to use that feature and the code that ignores it.

... and so on.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, dominik vogt gmx de
Reply-To: dominik vogt gmx de



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