From a26232615ff7c02a8c0b52151cb5978b7210d89e Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 11 Jan 2005 09:08:52 +0000 Subject: better comments --- perl-install/ugtk2.pm | 11 ++++++++--- 1 file 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 }); -- cgit v1.2.1