summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfigurator.pm
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/Xconfigurator.pm
parentfa2278a2fb140627a98db35efb349f862bb85f36 (diff)
downloaddrakx-39b5acfff89f77e50dbc65d3699d0acfb0cef215.tar
drakx-39b5acfff89f77e50dbc65d3699d0acfb0cef215.tar.gz
drakx-39b5acfff89f77e50dbc65d3699d0acfb0cef215.tar.bz2
drakx-39b5acfff89f77e50dbc65d3699d0acfb0cef215.tar.xz
drakx-39b5acfff89f77e50dbc65d3699d0acfb0cef215.zip
move "what is the running_window_manager" and "ask_window_manager_to_logout" to any.pm
Diffstat (limited to 'perl-install/Xconfigurator.pm')
-rw-r--r--perl-install/Xconfigurator.pm38
1 files changed, 16 insertions, 22 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"),