summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-01-11 09:04:00 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-01-11 09:04:00 +0000
commit5bf718d6083f65ef35b36cf3997875ce0cca554b (patch)
treefd0f38abb2bdbba018a50ba6363ee53c7aca44cb /perl-install
parent42787612c917e1fb43daab74d30bd7b2acfbc35d (diff)
downloaddrakx-5bf718d6083f65ef35b36cf3997875ce0cca554b.tar
drakx-5bf718d6083f65ef35b36cf3997875ce0cca554b.tar.gz
drakx-5bf718d6083f65ef35b36cf3997875ce0cca554b.tar.bz2
drakx-5bf718d6083f65ef35b36cf3997875ce0cca554b.tar.xz
drakx-5bf718d6083f65ef35b36cf3997875ce0cca554b.zip
we always have force_focus when we have !$::isStandalone,
so do it that way and get rid of $ugtk2::force_focus
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfig/test.pm1
-rw-r--r--perl-install/install_steps_gtk.pm1
-rw-r--r--perl-install/ugtk2.pm16
3 files changed, 8 insertions, 10 deletions
diff --git a/perl-install/Xconfig/test.pm b/perl-install/Xconfig/test.pm
index ced26c141..524530bef 100644
--- a/perl-install/Xconfig/test.pm
+++ b/perl-install/Xconfig/test.pm
@@ -105,7 +105,6 @@ sub test {
Gtk2->init;
gtkset_background(200 * 257, 210 * 257, 210 * 257);
- $ugtk2::force_focus = 1;
my $text = Gtk2::Label->new;
my $time = 12;
Glib::Timeout->add(1000, sub {
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 8f5341f45..927686569 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -75,7 +75,6 @@ sub new($$) {
log::l("Server died"), return 0 if !fuzzy_pidofs(qr/\b$server\b/);
$nb++ if xf86misc::main::Xtest($wanted_DISPLAY);
if ($nb > 2) { #- one succeeded test is not enough :-(
- $ugtk2::force_focus = 1;
log::l("AFAIK X server is up");
return 1;
}
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);