diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-09-13 00:06:38 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-09-13 00:06:38 +0000 |
commit | 3c3f7b7a5ef5feef684d6ce66b060aa88df6cddf (patch) | |
tree | fe557abb183bfb67669efa97e07d6c5073ee31fd /perl-install/install_steps_gtk.pm | |
parent | 24985f95a0e1eb72143d31b19d0c24f74d284982 (diff) | |
download | drakx-3c3f7b7a5ef5feef684d6ce66b060aa88df6cddf.tar drakx-3c3f7b7a5ef5feef684d6ce66b060aa88df6cddf.tar.gz drakx-3c3f7b7a5ef5feef684d6ce66b060aa88df6cddf.tar.bz2 drakx-3c3f7b7a5ef5feef684d6ce66b060aa88df6cddf.tar.xz drakx-3c3f7b7a5ef5feef684d6ce66b060aa88df6cddf.zip |
no_comment
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r-- | perl-install/install_steps_gtk.pm | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 5254cffa6..fb9bc4504 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -178,8 +178,6 @@ sub selectInstallClass1 { #------------------------------------------------------------------------------ sub selectMouse { my ($o, $force) = @_; - my %old = %{$o->{mouse}}; - $o->SUPER::selectMouse($force); my $set = sub { my ($mouse) = @_; @@ -187,15 +185,21 @@ sub selectMouse { c::setMouseLive($ENV{DISPLAY}, mouse::xmouse2xId($mouse->{XMOUSETYPE})); }; - if ($old{XMOUSETYPE} ne $o->{mouse}{XMOUSETYPE}) { + my %old = %{$o->{mouse}}; + $o->SUPER::selectMouse($force); + $old{FULLNAME} eq $o->{mouse}{FULLNAME} && !$force and return; + + while (1) { log::l("telling X server to use another mouse"); eval { commands::modprobe("serial") } if $o->{mouse}{device} =~ /ttyS/; - $set->($o->{mouse}) unless $::testing; - } - if ($old{FULLNAME} ne $o->{mouse}{FULLNAME}) { - install_gtk::test_mouse($o->{mouse}) or goto &selectMouse; - } + if (!$::testing) { + symlinkf($o->{mouse}{device}, "/dev/mouse"); + c::setMouseLive($ENV{DISPLAY}, mouse::xmouse2xId($o->{mouse}{XMOUSETYPE})); + } + install_gtk::test_mouse($o->{mouse}) and return; + $o->SUPER::selectMouse(1); + } } #------------------------------------------------------------------------------ |