summaryrefslogtreecommitdiff
path: root/gi
diff options
context:
space:
mode:
Diffstat (limited to 'gi')
-rw-r--r--gi/overrides/Gtk.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index dc767b40..55cd0fca 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -513,10 +513,13 @@ __all__.append('Builder')
# NOTE: This must come before any other Window/Dialog subclassing, to ensure
# that we have a correct inheritance hierarchy.
-_window_init = deprecated_init(Gtk.Window.__init__,
- arg_names=('type',),
- category=PyGTKDeprecationWarning,
- stacklevel=3)
+if GTK4:
+ _window_init = Gtk.Window.__init__
+else:
+ _window_init = deprecated_init(Gtk.Window.__init__,
+ arg_names=('type',),
+ category=PyGTKDeprecationWarning,
+ stacklevel=3)
class Window(Gtk.Window):