From 5bf718d6083f65ef35b36cf3997875ce0cca554b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 11 Jan 2005 09:04:00 +0000 Subject: we always have force_focus when we have !$::isStandalone, so do it that way and get rid of $ugtk2::force_focus --- perl-install/ugtk2.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'perl-install/ugtk2.pm') diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 920a4dfe1..2174d14f9 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -2,7 +2,7 @@ package ugtk2; use diagnostics; use strict; -use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @icon_paths $wm_icon $force_focus $grab $border); #- leave it on one line, for automatic removal of the line at package creation +use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @icon_paths $wm_icon $grab $border); #- leave it on one line, for automatic removal of the line at package creation @ISA = qw(Exporter); %EXPORT_TAGS = ( @@ -948,13 +948,6 @@ sub _create_window { ]), %options); - if ($force_focus) { - #- force keyboard focus instead of mouse focus (useful when we have no Window Manager) - (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 }); - } - #- when the window is closed using the window manager "X" button (or alt-f4) $w->signal_connect(delete_event => sub { if ($::isWizard) { @@ -965,6 +958,13 @@ sub _create_window { } }); + if (!$::isStandalone) { + #- force keyboard focus instead of mouse focus (useful when we have no Window Manager) + (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 }); + } + if ($::isInstall) { require install_gtk; #- for perl_checker install_gtk::handle_unsafe_mouse($::o, $w); -- cgit v1.2.1