GNOME Bugzilla – Bug 698005
GdkX11Window oddities
Last modified: 2014-08-31 00:31:56 UTC
This confused me during porting PyGTK code: >>> from gi.repository import Gtk >>> w = Gtk.Window() >>> w.show() >>> w.get_window() <gtk.gdk.X11Window object at 0x1115e10 (GdkX11Window at 0x118f360)> >>> w.get_window().get_xid() Traceback (most recent call last):
+ Trace 231784
>>> from gi.repository import Gtk, GdkX11 >>> w = Gtk.Window() >>> w.show() >>> w.get_window() <X11Window object at 0x223bf50 (GdkX11Window at 0x22b5360)> >>> w.get_window().get_xid() 69206019L It seems one has to import GdkX11 before calling get_window() to get a fully functional subclass (also the __name__ of the first returned type looks a bit like PyGTK..). I don't know how this all works, but it would be nice if the Gdk overrides would try to import GdkX11.
*** This bug has been marked as a duplicate of bug 656314 ***
Un-marking as dup because while bug 656314 is essentially the same, fixing it won't resolve all problems in this specific case. An additional issue is we would need the Gdk gir/typelib to include GdkX11 which probably won't happen due to needing backend portability. If you feel this is wrong, feel free to re-open and move the ticket to GTK+.