It's because there are multiple windows, and "window" is ambiguous. First of all, there's the actual window that the event was generated on. That isn't actually sent to you. When the event bubbles up, you get three windows:
"root", which is the root window of the source window. Used for finding the correct screen and tons of other things. Then there's "event", which is the window you selected on. It might be the source window, it might not be. Depends how the event bubbled. Then there's the incomprehensible "child": the immediate child of "event" that either is or contains the source window as an ancestor. I don't think anybody has ever found a use case for this one. On Mon, Mar 30, 2015 at 2:02 PM, Bill Spitzak <spit...@gmail.com> wrote: > Interesting. A bit odd because looking in xproto.h I can see that the same > offset in the structure is called "window" or "drawable" in many other > events. I guess this is because it is generated from xprotocol descriptions > and the terminology cannot be changed there? But kind of unclear why such a > wrong name would have been chosen there... > > Anyway probably another indication of what a mess X is. > > > On 03/30/2015 11:53 AM, Daniel Stone wrote: > >>> Is the window id really stored in focus->event? >> >> >> Yeah, the 'event' field of many X11 events (including literally all >> the input events) is set to the window the event was delivered to. >> >> Cheers, >> Daniel >> > _______________________________________________ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/wayland-devel -- Jasper _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel