summaryrefslogtreecommitdiff
path: root/gi/overrides/Gdk.py
diff options
context:
space:
mode:
Diffstat (limited to 'gi/overrides/Gdk.py')
-rw-r--r--gi/overrides/Gdk.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/gi/overrides/Gdk.py b/gi/overrides/Gdk.py
index 15f2a0a..3ab5d6d 100644
--- a/gi/overrides/Gdk.py
+++ b/gi/overrides/Gdk.py
@@ -126,10 +126,14 @@ if Gdk._version == '2.0':
Rectangle = override(Rectangle)
__all__.append('Rectangle')
else:
- from gi.repository import cairo as _cairo
- Rectangle = _cairo.RectangleInt
-
- __all__.append('Rectangle')
+ # Newer GTK+/gobject-introspection (3.17.x) include GdkRectangle in the
+ # typelib. See https://bugzilla.gnome.org/show_bug.cgi?id=748832 and
+ # https://bugzilla.gnome.org/show_bug.cgi?id=748833
+ if not hasattr(Gdk, 'Rectangle'):
+ from gi.repository import cairo as _cairo
+ Rectangle = _cairo.RectangleInt
+
+ __all__.append('Rectangle')
if Gdk._version == '2.0':
class Drawable(Gdk.Drawable):