[comp.windows.x] rooms and hierarchies of window managers

lauwers@orc.olivetti.COM (Chris Lauwers) (05/12/88)

I am interested in building a system like Rooms (built by Card and
Henderson at Xerox PARC) on top of X11. A Rooms system basically
simulates multiple logical screens (called rooms) on one physical
screen. A top-level Rooms manager allows creation and destruction of
rooms (basically just big windows) and starts up a separate window
manager for each of these rooms.  Each window manager manages the
space in its room (as if the window it is running in is its root
window). The room manager allows users to switch back and forth
between rooms, and possibly to resize and move rooms.

Initially, I was planning to modify an existing window manager (uwm)
and use it for both the top-level rooms-manager and the per-room
window managers. There are some problems with that, however.

The reason is that the "room-manager" blocks certain events from the
per-room window managers. As I understand it, a window manager
typically performs "passive grabs" on mouse buttons to register itself
with the X server as the event handler for certain combinations of
events (e.g.  "if the left mouse button is pressed while the SHIFT key
is down, send that button event to me").  If uwm is used for both the
top-level room manager and the per-room window managers, they will all
attempt to grab the same buttons, and only the room-manager's attemp
will succeed (assuming it is started up first).  This means that if I
click "SHIFT left-button" to move an application window in a room the
"SHIFT left-button" event will go to the room manager (whose grab
succeeded), and the entire room will be moved.


Does anybody have any idea how to get around this ?

Chris Lauwers
Olivetti Research Center

lauwers@orc.olivetti.com
(lauwers%orc.uucp@unix.sri.com)

elliott@hpfcdq.HP.COM (Ian Elliott) (05/17/88)

> lauwers@orc.olivetti.COM (Chris Lauwers) writes:
>					  If uwm is used for both the
> top-level room manager and the per-room window managers, they will all
> attempt to grab the same buttons, and only the room-manager's attemp
> will succeed (assuming it is started up first).

Here's a quickly thought of way aroung your problem.  Why don't you
modify things so that each "window manager" creates and operates within
its own draw-thru, sub-window of the root window?  For example, the room
manager would set up its passive-grab relative to the root window, and
the window manager would set up its passive-grab relative to its
sub-window of the root window.  Then you need to have the window manager
map all "top-level" window as sub windows of the wm's sub-window.  I
don't know if uwm normally does the remapping, but you could always look
in the "wm" code to find out how to do it.

						Ian Elliott

Graphics Technology Division
Hewlett-Packard
(303) 229-4272
elliott%hpfcian@hplabs.HP.COM
...!hplabs!hpfcla!elliott