From 66ab727e0b9ab6599fd6b05f6a40700d653e571e Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 2 Sep 2008 09:29:39 +0000 Subject: - libDrakX: o handle KDE4 in running_window_manager() and ask_window_manager_to_logout() --- perl-install/NEWS | 3 +++ perl-install/any.pm | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/perl-install/NEWS b/perl-install/NEWS index 45e85c62f..414e434da 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,6 @@ +- libDrakX: + o handle KDE4 in running_window_manager() and ask_window_manager_to_logout() + Version 11.30 - 1 September 2008 - service_harddrake: adapt kernel modaliases that are not valid diff --git a/perl-install/any.pm b/perl-install/any.pm index e5d62371f..a8a10bb8f 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -1300,7 +1300,7 @@ sub monitor_full_edid() { } sub running_window_manager() { - my @window_managers = qw(kwin gnome-session icewm wmaker afterstep fvwm fvwm2 fvwm95 mwm twm enlightenment xfce blackbox sawfish olvwm fluxbox compiz); + my @window_managers = qw(ksmserver kwin gnome-session icewm wmaker afterstep fvwm fvwm2 fvwm95 mwm twm enlightenment xfce blackbox sawfish olvwm fluxbox compiz); foreach (@window_managers) { my @pids = fuzzy_pidofs(qr/\b$_\b/) or next; @@ -1313,6 +1313,7 @@ sub ask_window_manager_to_logout { my ($wm) = @_; my %h = ( + 'ksmserver' => 'qdbus org.kde.ksmserver /KSMServer logout 0 0 0', 'kwin' => "dcop kdesktop default logout", 'gnome-session' => "gnome-session-save --kill", 'icewm' => "killall -QUIT icewm", @@ -1322,7 +1323,7 @@ sub ask_window_manager_to_logout { #- NB: consolehelper does not destroy $HOME whereas kdesu does #- for gnome, we use consolehelper, so below works $ENV{ICEAUTHORITY} ||= "$ENV{HOME}/.ICEauthority"; - } elsif ($wm eq 'kwin' && $> == 0) { + } elsif (member($wm, 'ksmserver', 'kwin') && $> == 0) { #- we can not use dcop when we are root $cmd = "su $ENV{USER} -c '$cmd'"; } -- cgit v1.2.1