diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-01-11 09:08:52 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-01-11 09:08:52 +0000 |
commit | a26232615ff7c02a8c0b52151cb5978b7210d89e (patch) | |
tree | c323642043fdbb25fec742b9bc400073f7884540 /perl-install/ugtk2.pm | |
parent | 5bf718d6083f65ef35b36cf3997875ce0cca554b (diff) | |
download | drakx-a26232615ff7c02a8c0b52151cb5978b7210d89e.tar drakx-a26232615ff7c02a8c0b52151cb5978b7210d89e.tar.gz drakx-a26232615ff7c02a8c0b52151cb5978b7210d89e.tar.bz2 drakx-a26232615ff7c02a8c0b52151cb5978b7210d89e.tar.xz drakx-a26232615ff7c02a8c0b52151cb5978b7210d89e.zip |
better comments
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r-- | perl-install/ugtk2.pm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 2174d14f9..9677246fe 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -937,9 +937,14 @@ END { &exit() } sub _create_window { my (%options) = @_; + my $no_Window_Manager = !$::isStandalone; + my $w = gtknew('Window', if_(!$::isInstall && !$::isWizard, border_width => 5), - position_policy => !$::isInstall && !$::isStandalone ? 'center-always' : 'center-on-parent', + + #- policy: during install, we need a special code to handle the weird centering, see below + position_policy => $::isInstall ? '' : $no_Window_Manager ? 'center-always' : 'center-on-parent', + if_(!$::isInstall, icon_no_error => wm_icon()), if_($::isInstall, position => [ @@ -958,8 +963,8 @@ sub _create_window { } }); - if (!$::isStandalone) { - #- force keyboard focus instead of mouse focus (useful when we have no Window Manager) + if ($no_Window_Manager) { + #- force keyboard focus instead of mouse 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 }); |