[Xcb] How to properly handle EnterNotifyEvents for gtk3
Micah Nordland
mpnordland at gmail.com
Fri Aug 24 16:46:01 PDT 2012
I've come across an interesting problem with a window manager I'm writing
using the xpyb library. With or without me handling EnterNotifyEvents, gtk3
apps like gnome-terminal, sakura, and gedit all fail to either show a
focused text cursor (gnome-terminal and sakura) or no text cursor at all
(gedit). I know that it is possible since under twm it works properly. When
I receive an EnterNotifyEvent I call this method:
def handle_enter_event(self, evt):
window = self.get_window(evt.window)
if evt.mode != xproto.NotifyMode.Normal:
return
window.focus()
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.
--
Praising my Savior all the day long,
Micah Nordland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20120824/449fab26/attachment.html>
More information about the Xcb
mailing list