summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-02-19 21:01:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-02-19 21:01:32 +0000
commitbdd65091d80665762010f21af35af795107fc7fe (patch)
tree5a9bd69e6cff4ceb8a9801d572d615fa2a9fb496 /perl-install
parent15dcf43d21d3213a4b17980b1519a52e1ceb1183 (diff)
downloaddrakx-bdd65091d80665762010f21af35af795107fc7fe.tar
drakx-bdd65091d80665762010f21af35af795107fc7fe.tar.gz
drakx-bdd65091d80665762010f21af35af795107fc7fe.tar.bz2
drakx-bdd65091d80665762010f21af35af795107fc7fe.tar.xz
drakx-bdd65091d80665762010f21af35af795107fc7fe.zip
use $ugtk2::current_window in place of @interactive::objects (which was unused and broken)
=> fix XSetInputFocus (bugzilla #8046 and #8053)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/interactive/gtk.pm4
-rw-r--r--perl-install/ugtk2.pm13
2 files changed, 9 insertions, 8 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index a8783e347..37e427f7f 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -751,8 +751,8 @@ sub wait_message_endW {
sub kill {
my ($_o) = @_;
- $_->destroy foreach $::WizardTable ? $::WizardTable->get_children : (), @tempory::objects, @interactive::objects;
- @tempory::objects = @interactive::objects = ();
+ $_->destroy foreach $::WizardTable ? $::WizardTable->get_children : (), @tempory::objects;
+ @tempory::objects = ();
}
sub ok {
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 519fbb35c..dfa848a38 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -884,9 +884,7 @@ sub new {
} else {
$o->{window} = $o->{rwindow};
}
- $o->{rwindow}->set_position('center_always') if
- $force_center || $o->{force_center} ||
- @interactive::objects && $::isStandalone && !$o->{transient}; #- no need to center when set_transient is used
+ $o->{rwindow}->set_position('center_always') if $force_center || $o->{force_center};
$o->{rwindow}->set_modal(1) if $grab || $o->{grab} || $o->{modal};
$o->{rwindow}->set_transient_for($o->{transient}) if $o->{transient} =~ /Gtk2::Window/;
@@ -957,7 +955,6 @@ sub show($) {
sub destroy($) {
my ($o) = @_;
$o->{rwindow}->destroy if !$o->{destroyed};
- @interactive::objects = grep { $o != $_ } @interactive::objects;
gtkset_mousecursor_wait();
flush();
}
@@ -988,7 +985,11 @@ sub _create_window {
$w->set_name("Title");
$w->set_title($title);
- $w->signal_connect(expose_event => \&_XSetInputFocus) if $force_focus;
+ if ($force_focus) {
+ (my $previous_current_window, $ugtk2::current_window) = ($ugtk2::current_window, $w);
+ $w->signal_connect(expose_event => \&_XSetInputFocus);
+ $w->signal_connect(destroy => sub { $ugtk2::current_window = $previous_current_window });
+ }
$w->signal_connect(delete_event => sub {
if ($::isWizard) {
$w->destroy;
@@ -1027,7 +1028,7 @@ sub _create_window {
sub _XSetInputFocus {
my ($w) = @_;
- if (!@interactive::objects || $interactive::objects[-1]{rwindow} == $w) {
+ if ($ugtk2::current_window == $w) {
$w->window->XSetInputFocus;
} else {
log::l("not XSetInputFocus since already done and not on top");