summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-08-18 11:34:18 +0000
committerThierry Vignaud <tv@mandriva.org>2008-08-18 11:34:18 +0000
commitd5b10a973bd4ec474edf3bfa29df4458d2519e85 (patch)
treed88cd9b2e7eba5006d52988611e1bc64a1a2ed48 /perl-install
parent48ec956d005ba74c32119ba061285510fd29277d (diff)
downloaddrakx-d5b10a973bd4ec474edf3bfa29df4458d2519e85.tar
drakx-d5b10a973bd4ec474edf3bfa29df4458d2519e85.tar.gz
drakx-d5b10a973bd4ec474edf3bfa29df4458d2519e85.tar.bz2
drakx-d5b10a973bd4ec474edf3bfa29df4458d2519e85.tar.xz
drakx-d5b10a973bd4ec474edf3bfa29df4458d2519e85.zip
(new,may_destroy) track windows in order to be able to set the proper
transient hint (really fixing focus bug (#42750) which got unfixed after fixing vivication)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/mygtk2.pm8
-rw-r--r--perl-install/ugtk2.pm2
3 files changed, 11 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index cef919ff0..e092bd311 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,5 @@
+- reakky fix another focus bug (#42750)
+
Version 11.10.1 - 18 August 2008
- fix another focus bug (#42750)
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm
index 3067df65f..8cb691002 100644
--- a/perl-install/mygtk2.pm
+++ b/perl-install/mygtk2.pm
@@ -1182,7 +1182,13 @@ sub flush() {
sub may_destroy {
my ($w) = @_;
- $w->destroy if $w;
+ return if !$w;
+ @::main_windows = difference2(\@::main_windows, [ $w->{real_window} ]);
+ if ($::main_window eq $w->{real_window}) {
+ undef $::main_window;
+ $::main_window = $::main_windows[-1];
+ }
+ $w->destroy;
}
sub root_window() {
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index ef5c5801d..33d7abc54 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -728,6 +728,7 @@ sub new {
my $icon = find { _find_imgfile($_) } $::isInstall ? 'empty-banner' : $opts{icon};
my $banner_title = $opts{banner_title};
$title = uc($title) if $::isInstall;
+ $o->{transient} ||= $::main_window if $::main_window;
my $window = gtknew(
'MagicWindow',
title => $title || '',
@@ -740,6 +741,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};
$window->set_border_width(10) if !$window->{pop_it} && !$::noborderWhenEmbedded;
$o->{rwindow} = $o->{window} = $window;