Re: MUST or SHOULD in window gravity?



well, sorry for being pain in a butt, but let me try and explain things one
more time.

> >
> > Window Manager SHOULD honor application's ConfigureWindow request and
place
> > window in requested ( x, y ) unless there is a good reason not to, in
which
> > case
> > window may be moved into a different location ( x1, y2 ).
> >
> > Window Manger MUST use new window position according to gravity rules
and
> > place
> > client window/frame decorations accordingly.
> >
> > There are no valid reasons for not obeying gravity rules. Any attempt
to do
> > so
> > must be outlawed by this specs. Otherwise it will not be possible to
build
> > the kind of desktop that both KDE and GNOME striving to.
> >
>
> You have general purpose desktop on the brain.  People use window systems
> in other environments too...

Not just a general desktop, no. There is a term of "Frame Decorations". It
is not
really defined anywhere, so I'll try and defined it here:

Frame Decoartions - are comprised from visible interface elements supplied
by the
Window Manger, i.e. buttons, handles, titlebars, etc. that immidiately
surround
client window, and therefore appear to the user to be part of it.

Now article in questions is related only to those environments that
provides for
Frame Decorations. If you don't have FD - then this entire part of the
specs is
not applicable.

>
> You are overspecifying.  It should be possible for other window managers
> that DO NOT intend to support Gnome or KDE to comply with the MUSTs of
> the specification.  People MUST be able to use gnome/KDE applications in
> specilized environments to which general desktop compliance isn't
desirable.

I do not. KDE and GNOME are only an examples. It really does affect any
desktop
environment (that supports Frame Decorations). There is a fundamental
question
that has to be answered before you proceed to implementation of windowing
system:

If client window has position WxH+X+Y then how is that related to actuall
image of
the window on the screen ???

Answer is : you have to use gravity in order to define this relationship.

Now X windows defines several possible values for the gravity, but it does
not
mandate meaning of it. What ICCCM and these specs are trying to do is
define
precise, concrete meaning of this values. Untill you have this defined
there
will always be a detachement between internal, application used way of
window
placement and actuall, user-perceived image.

>
> In an embedded system, for example, I may not want/need title bars at
all.

then you do not have frame decoration and therefore that paragraf is not
applicable to you. On the other hand you may still need to resize your
application, and if you requested SouthEast gravity you'd expect it to
remain snapped to the bottom-right corner even after resizing, instead of
making part of it invisible by moving off screen.

> Think of a nuclear power plant, where you want to guarantee an
application
> is always visible on a display, as it shows whether the plant is about
> to melt down: you really don't want to have to find it among a messy
desktop:
> the window manager had better be able to enforce this policy, which is
> NOT the policy most window managers would implement.

That is entirely different question of where to place window. Window
Manager
is completely at its own command as to where to place this window. What we
mandate
- is how this, Window Manager choosen, placement is related to the client
window's
origin.

On the other hand, lets say you are working on Power Plant and there
already
is a system with some Window Manger. Now your task is to implement an
application that will always be at the bottom part of the screen, and that
will
display status of the reactor in real time. Question: How would you let
window manager know that you want to occupy bottom part of the screen ? -
You choose your initial placement based on screen size and your own size.
Note
that you are not aware of any additional decorations supplied by WM around
your window,
nor you know its size. So lets say your own size is 500x20 and screen size
is 1024x768 -
you'll have initial placement at  500x20+0+748, and you supply
StaticGravity to the WM,
thus requesting window manager to not alter your possition, but instead put
all other
decorations around this position. If Window Manager does not obey gravity
rules,
it will ditch this gravity value, and will place frame decorations at
+0+748. What will
you get as a result ? Only titlebar will be visible. Displayed reactor
status will be
outside of the screen, and *BUUMM* there goes your Power Plant in the
global meltdown
explosion.

>
> So you need to write the verbiage to distinguish these two cases: the
> general purpose, human driven desktop case, and the specialized usage
case.

I don't really see any need for such an explanation. If you don't have
frame
decorations - then you'll never be able to apply this item anyways.

>
> But I believe SHOULD and MUST in fact are all you need, and that this
will
> just complicate the spec.
>
> MUST means things break.  SHOULD means that you'd better implement this
> unless you have some very good reason not to...  MAY is used for optional
> facilities.
>
>                        - Jim

Regards
Sasha Vasko







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