[Xcb] How to properly handle EnterNotifyEvents for gtk3

Uli Schlachter psychon at znc.in
Sat Aug 25 01:03:00 PDT 2012


Hi,

On 25.08.2012 01:46, Micah Nordland wrote:
> I've come across an interesting problem with a window manager I'm writing
> using the xpyb library. 

Welcome to X11 where writing your own window manager is not easy.

[...]
> window.focus() is defined as:
>     def focus(self):
>         self.conn.core.SetInputFocus(xproto.InputFocus.PointerRoot,
> self.win)
>         ewmh.set_active_window(self.win)
> 
> I am setting _NET_ACTIVE_WINDOW, and from all that I can tell, I'm doing
> pretty much the same thing as twm.

I don't know which docs you looked at so far, but you aren't following ICCCM
section 4.1.7 "Input Focus"[0]. Your code assumes the "Passive" input model and
mis-handles all other input models. GTK is using the "Locally active" input model.

And while you are at it, also read the rest of ICCCM (perhaps except for the
selection, session management and colormap stuff).

Cheers,
Uli

[0] http://www.tronche.com/gui/x/icccm/sec-4.html#s-4.1.7
-- 
"Every once in a while, declare peace. It confuses the hell out of your enemies"
 - 79th Rule of Acquisition


More information about the Xcb mailing list