summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-01-30 22:32:03 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-01-30 22:32:03 +0000
commit39b5acfff89f77e50dbc65d3699d0acfb0cef215 (patch)
tree29fd3cc747b82ea6b1a4e3fe767e7412c82112de /perl-install
parentfa2278a2fb140627a98db35efb349f862bb85f36 (diff)
downloaddrakx-backup-do-not-use-39b5acfff89f77e50dbc65d3699d0acfb0cef215.tar
drakx-backup-do-not-use-39b5acfff89f77e50dbc65d3699d0acfb0cef215.tar.gz
drakx-backup-do-not-use-39b5acfff89f77e50dbc65d3699d0acfb0cef215.tar.bz2
drakx-backup-do-not-use-39b5acfff89f77e50dbc65d3699d0acfb0cef215.tar.xz
drakx-backup-do-not-use-39b5acfff89f77e50dbc65d3699d0acfb0cef215.zip
move "what is the running_window_manager" and "ask_window_manager_to_logout" to any.pm
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfigurator.pm38
-rw-r--r--perl-install/Xconfigurator_consts.pm4
2 files changed, 17 insertions, 25 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index 7ae39cb67..bed9bafef 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -1534,30 +1534,24 @@ Current configuration is:
}
if ($::isStandalone && $0 =~ /Xdrakres/) {
- my $found;
- foreach (@window_managers) {
- if (`pidof "$_"` > 0) {
- if ($in->ask_okcancel('', _("Please relog into %s to activate the changes", ucfirst $_), 1)) {
- fork and $in->exit;
- system("kwmcom logout") if /kwm/;
- system("dcop kdesktop default logout") if /kwin/;
- system("save-session --kill") if /gnome-session/;
- system("killall -QUIT icewm") if /icewm/;
-
- open STDIN, "</dev/zero";
- open STDOUT, ">/dev/null";
- open STDERR, ">&STDERR";
- c::setsid();
- exec qw(perl -e), q{
- my $wm = shift;
- for (my $nb = 30; $nb && `pidof "$wm"` > 0; $nb--) { sleep 1 }
- system("killall X ; killall -15 xdm gdm kdm prefdm") unless `pidof "$wm"` > 0;
- }, $_;
- }
- $found = 1; last;
+ if (my $wm = any::running_window_manager()) {
+ if ($in->ask_okcancel('', _("Please relog into %s to activate the changes", ucfirst (lc $wm)), 1)) {
+ fork and $in->exit;
+ any::ask_window_manager_to_logout($wm);
+
+ open STDIN, "</dev/zero";
+ open STDOUT, ">/dev/null";
+ open STDERR, ">&STDERR";
+ c::setsid();
+ exec qw(perl -e), q{
+ my $wm = shift;
+ for (my $nb = 30; $nb && `pidof "$wm"` > 0; $nb--) { sleep 1 }
+ system("killall X ; killall -15 xdm gdm kdm prefdm") unless `pidof "$wm"` > 0;
+ }, $wm;
}
+ } else {
+ $in->ask_warn('', _("Please log out and then use Ctrl-Alt-BackSpace"));
}
- $in->ask_warn('', _("Please log out and then use Ctrl-Alt-BackSpace")) unless $found;
} else {
$in->set_help('configureXxdm') unless $::isStandalone;
my $run = exists $o->{xdm} ? $o->{xdm} : $::auto || $in->ask_yesorno(_("X at startup"),
diff --git a/perl-install/Xconfigurator_consts.pm b/perl-install/Xconfigurator_consts.pm
index 17ced34ea..e95f8551a 100644
--- a/perl-install/Xconfigurator_consts.pm
+++ b/perl-install/Xconfigurator_consts.pm
@@ -11,9 +11,7 @@ use common;
);
@depths = ikeys(%depths);
-@resolutions = qw(640x480 800x600 1024x768 1152x864 1280x1024 1400x1050 1600x1200 1920x1440 2048x1536);
-
-@window_managers = ('kdeinit: kwin', qw(gnome-session icewm wmaker kwm afterstep fvwm fvwm2 fvwm95 mwm twm enlightenment xfce blackbox sawfish));
+@resolutions = qw(640x480 800x600 1024x768 1152x864 1280x1024 1400x1050 1600x1200 1920x1440 2048x1536);
%serversdriver = arch() =~ /^sparc/ ? (
'Mach64' => "accel",