summaryrefslogtreecommitdiffstats
path: root/perl-install/mygtk2.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/mygtk2.pm')
-rw-r--r--perl-install/mygtk2.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm
index 3107510c9..2f70efe89 100644
--- a/perl-install/mygtk2.pm
+++ b/perl-install/mygtk2.pm
@@ -1413,6 +1413,18 @@ sub flush() {
Gtk2->main_iteration while Gtk2->events_pending;
}
+sub enable_sync_flush {
+ my ($w) = @_;
+ $w->signal_connect(expose_event => sub { $w->{displayed} = 1; 0 });
+}
+
+sub sync_flush {
+ my ($w) = @_;
+ # hackish :-(
+ mygtk2::sync($w) while !$w->{displayed};
+}
+
+
sub may_destroy {
my ($w) = @_;
return if !$w;