diff options
Diffstat (limited to 'perl-install/mygtk2.pm')
-rw-r--r-- | perl-install/mygtk2.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm index f218b4e66..f1b2acece 100644 --- a/perl-install/mygtk2.pm +++ b/perl-install/mygtk2.pm @@ -2,6 +2,7 @@ package mygtk2; use diagnostics; use strict; +use feature 'state'; our @ISA = qw(Exporter); our @EXPORT = qw(gtknew gtkset gtkadd gtkval_register gtkval_modify); @@ -1118,7 +1119,7 @@ sub may_destroy { } sub root_window() { - my $root if 0; + state $root; $root ||= Gtk2::Gdk->get_default_root_window; } |