Comment 8 for bug 801582

Revision history for this message
In , William-walker-z (william-walker-z) wrote :

(In reply to comment #2)
> What exactly triggers those window:activate and window:deactivate events? I
> mean, what X event is the root of those?

I'm not sure. I'm guessing FocusIn and FocusOut.

This might be ultimately done by moveInputFocusToWindow in http://cgit.freedesktop.org/xorg/app/compiz/tree/src/window.c, which is called by activateWindow and hideWindow in the same module.

But don't let the above trick you into thinking I know anything about compiz. :-) I don't. I was just scouring sources.

Speaking of scouring, I did a little more, but this is just naive scouring: on the GTK+ side, gtk+/gdk/x11/gdkevents-x11.c listens for FocusIn/FocusOut events and generates a GDK_FOCUS_EVENT. This is processed by gtk+/gdk/gdkevents.c, and things end up getting bubbled up to gtk+, which turns them into 'focus-in-event' and 'focus-out-event' events. The AT-SPI GAIL module picks these up and issues "window:activate" and "window:deactivate" events accordingly.