Re: ClientMessage to the root window



On Fri, Dec 14, 2001 at 09:41:33AM +0100, Bradley T Hughes wrote:
> On Thursday 13 December 2001 21:13, Olivier Chapuis wrote:
> > Hello,
> >
> > From the wm-spec:
> >
> >    Whenever this spec speaks about "sending a message to the root
> >    window", it is understood that the client is supposed to create a
> >    ClientMessage event with the specified contents and send it by using
> > a SendEvent request with the following arguments:
> >
> >       destination     root
> >       propagate       False
> >       event-mask      (SubstructureNotify|SubstructureRedirect)
> >       event           the specified ClientMessage
> >
> > I suggest to add the following (in a better English):
> >
> >   The  xclient.window member of the event structure should be set to the
> >   Root window id (or None) if the message concerns a root property or
> >   to the window id of the concerned window for a window property.
> >   Moreover, the xany.window member should be set to the window id of the
> >   main window of the application which sends the message. Rational: this
> >   allows the window manager to know which application send the client
> >   message.
> >
> > I find this useful to be able to configure the wm to reject some client
> > messages that the user does not want. Example: One may want to reject
> > some messages that ask to switch a window to an other desktop
> > if it is the application window  owner which asks this and accept
> > the message if it is not the case (and it it is probably a taskbar
> > which send the message).
> 
> This is a good suggestion, but unfortunately won't work, since the XEvent 
> structure is a union, and the xevent.xany.window and xevent.xclient.window 
> are the same thing, assigning one assigns the other.
> 

Oh, yes, sorry ...shame on me.
So what about using data.l[4] for the id of the main window of the
sender. Only data.l[0] and data.l[1] is used by the wm-spec. So in
the place of my stupid paragraph:

  Moreover, the data.l[4] of the member of the event structure should be
  set to the window id of the main window of the application which sends
  the message. Rational: this allows the window manager to know which
  application send the client  message.

Olivier



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