[comp.windows.x] window groups

jkh@ardent.UUCP (Jordan Hubbard) (05/13/88)

I recently began making an effort to force awm into conforming with 99% of
what is detailed in the "Inter-Client Communications Conventions Manual" (whew)
and came across the concept of window group ID hints. This seemed ideal for
a request I had just gotten the day before from someone who has a situation
where he has many overlapping windows open and needs to move between them
frequently. When the windows are arranged like a deck of cards (the most
optimum use of the desktop for him as he needs to see a portion of each
window), it becomes inconvenient to raise a window in the middle as it
obscures its siblings in the "deck". The answer, of course, is to raise
the window and move it to the "top of the deck", moving the old "top" window
into the place it used to occupy (with the appropriate sibling and stacking
mode to occupy the right stacking level).

For this to happen, the window manager would have to have some way of relating
a group of windows so that the appropriate position and stacking order
could be determined when any window in the "deck" wanted to be raised.
You'd also naturally want to be able have any number of decks on the screen
at once with the ability to move windows out of one deck into another,
neaten a deck, make all windows in a deck the same size, etc etc.

Now here's the big question (I really didn't plan for this message to be an
RFC, though it kind of turned into one); since there are many conceivable
things one might want to do with window groups (the ICCCM suggest group
iconify/deiconify for one, another good window manager idea), would it be
considered anti-social for the window manager to fiddle with this property?
The ICCCM says:

"The window_group field should be set to the ID of the group leader. The
window group leader may be a window which exists only for that purpose,
and may never be mapped. Its window_group field should contain its own ID."

Now this is pretty reasonable if you assume that one client has all
the windows in the deck, but when the windows are owned by a hodge-podge
of different clients who have been roped unsuspectingly together by a window
manager who'd like to keep track of them somehow (even if it croaks, wiping
out its internal data structures and needs to be restarted), you get
into a potentially nasty situation. What if a client decides to use
this field as well? I guess the answer to my own question is
    "Yes... It would be anti-social.."

This would also probably be true if you wanted a window to be in several
groups at the same time (a deck-of-cards group, an iconify group,
a visual state group, etc..)? Help! I can't think of any other way to
associate information with windows on-the-fly in a way that will stick
if I (the window manager) dies unexpectedly. There's no XSetProperty()
type of routine that I can see anywhere.

Assuming that I don't even do any of this, how do I determine what Joe Window
wants me to do with the window_group? Iconify? Stack? Map?


Confused in Sunnyvale,

					Jordan Hubbard
					jkh@violet.berkeley.edu

RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) (05/13/88)

Window groups are for clients that create multiple top-level windows as
a "single" application, and want the window manager to treat them as a
"unit".  They were not designed for the window manager to group a random
collection of windows from multiple clients.

    There's no XSetProperty() type of routine that I can see anywhere.

XChangeProperty().

jkh@ardent.UUCP (Jordan Hubbard) (05/14/88)

>>    There's no XSetProperty() type of routine that I can see anywhere.
>XChangeProperty().

Ah. I misread the documentation on that the first time. I thought you could
only use it to modify an existing property, I see now that that's not the case.
I will use properties to keep track of window decks and so forth.

It's still not clearly defined what "treating a set of top level windows
as a unit" entails. I can certainly see possibly representing all of
them with one icon (and map/unmapping them en-masse on de/iconify requests),
but is that as far as it goes? What about their relative positions to
one another? Should that be maintained?

I guess this is one of those loosely defined facilities that may mean different
things to different people. Sigh. It's hard when you're trying to get a window
manager to Do The Right Thing, though..


					Jordan