summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/mygtk2.pm5
-rw-r--r--perl-install/ugtk2.pm2
3 files changed, 7 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index ef6b1fe7b..ad94c0607 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,6 +1,7 @@
- interactive layer:
o fix quitting app when closing "advanced" dialog (mga#1812)
- mygtk2 layer:
+ o add register_main_window() for tracking main windows
o popup a dialog confirming to quit when clicking "X" (mga#1812)
Version 15.10 - 11 December 2012
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm
index 1f97b02d6..f8f13c733 100644
--- a/perl-install/mygtk2.pm
+++ b/perl-install/mygtk2.pm
@@ -1466,6 +1466,11 @@ sub sync_flush {
}
+sub register_main_window {
+ my ($w) = @_;
+ push @::main_windows, $::main_window = $w
+}
+
sub may_destroy {
my ($w) = @_;
return if !$w;
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 69185247c..dbfcfc8ff 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -748,7 +748,7 @@ sub new {
if_(!$::isInstall, icon_no_error => wm_icon()),
if_($o->{transient}, transient_for => $o->{transient}),
);
- push @::main_windows, $::main_window = $window->{real_window} if !$opts{do_not_track_main_window};
+ mygtk2::register_main_window($window->{real_window}) if !$opts{do_not_track_main_window};
$window->set_border_width(10) if !$window->{pop_it} && !$::noborderWhenEmbedded;
$o->{rwindow} = $o->{window} = $window;