gnu-misc-discuss
[Top][All Lists]
Advanced

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

Re: Google to launch PC operating system


From: Hyman Rosen
Subject: Re: Google to launch PC operating system
Date: Fri, 10 Jul 2009 16:30:11 -0400
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Alan Mackenzie wrote:
Hyman Rosen <hyrosen@mail.com> wrote:
The X Window Protocol has a SubstructureRedirect event that an X
client can request to handle on a window.

Bit of trouble parsing this.  Mainly with the words "has" and "on".
What is the thing that is being handled?  What is agent is doing the
handling?  In what sense does this take place "on" a window?  To what
does the X client issue the request?  What is the nature of the request?
Is it the client requesting permission to do the handling?

The thing being handled is a SubstructureRedirect event, one of many
possible events that can occur.

The agent doing the handling is an X client, which perforce becomes
the window manager.

It takes place on a window because the request to handle a
SubstructureRedirect event is specific to a window.

The X client issues the request to the X server.

The nature of the request is the client asking the server to handle
SubstructureRedirect on a window.

The client isn't requesting permission to do handling, it is
requesting to do handling.  If no other client has made this request
yet, then on various subsequent activities other clients request, the
X server will send events to the window manager client informing it
of those requests, and then the window manager will turn them back
around to the X server, possibly modified. For example, say a client
requests to open a window. The X server will send information to the
window manager about this request rather than opening the window. Then
the window manager can choose to do things, such as create other windows
surrounding the requested one, reparent the window, and so forth.

Only one client may have this event requested on a window - a second
>> one who tries to request it fails.

Can't parse this either.  In what sense does a client "have" an event
requested?  Does this mean it causes something else to request the event?
What does it mean to "request" an event?  I know that events can be
signalled, and that they can be handled, but how can they be requested?

The X server keeps track of its clients, and for each window, knows
which clients have requested which events. A client requests events
by sending a message to the server indicating for a window which events
on that window it is interested in receiving.

Window managers request this event for the root window;

Still can't parse this; is the object of the sentence "this event for
the root window", i.e. when the event is directed at the root window, or
is it "this event", i.e. the window manager is acting at the direction of
the root window.

A client wishing to become a window manager sends a request to the X
server asking to be the handler of the SubstructureRedirect event for
the root window.

Thus, an X client program can see if there's a window manager already
running by seeing whether its attempt to request SubstructureRedirect
events succeeds or fails. Sufficiently clever clients can then run in
two modes depending on this. I assume the KDE and GNOME environments
might be such sufficiently clever programs.

I've kind of lost it.  How does this relate to the question of whether or
not KDE and GNOME are window managers?

Just think of it as forwarding. When a client is the window manager, the
X server sends it all requests from other clients to open top level windows.
Then the window manager makes similar requests to the X server, but with
extra stuff done to put up window decorations and such.

KDE and GNOME could (I don't know whether or not they do) see if a window
manager is already running (by trying to become the window manager themselves)
and then run differently depending upon whether they are or are not the
window manager.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]