summaryrefslogtreecommitdiffstats
path: root/tools/XFdrake
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-06-14 08:40:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-06-14 08:40:19 +0000
commit2c33ce6818c3325f2b26e143cf1909fdebe79230 (patch)
tree8cc2d2262d0c579a185d0e29792084bc6811a04e /tools/XFdrake
parent289ddff1ad6882edcb7b36db139e46f13c2c8bda (diff)
downloaddrakx-kbd-mouse-x11-2c33ce6818c3325f2b26e143cf1909fdebe79230.tar
drakx-kbd-mouse-x11-2c33ce6818c3325f2b26e143cf1909fdebe79230.tar.gz
drakx-kbd-mouse-x11-2c33ce6818c3325f2b26e143cf1909fdebe79230.tar.bz2
drakx-kbd-mouse-x11-2c33ce6818c3325f2b26e143cf1909fdebe79230.tar.xz
drakx-kbd-mouse-x11-2c33ce6818c3325f2b26e143cf1909fdebe79230.zip
- handle resolution switch via xrandr without restarting X (#30896)
(nb: doesn't handle dpi switch, and will ask for X restart if the resolution switch has already been done through xrandr/krandrtray/...)
Diffstat (limited to 'tools/XFdrake')
-rwxr-xr-xtools/XFdrake11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/XFdrake b/tools/XFdrake
index 19988f3..e9e2b61 100755
--- a/tools/XFdrake
+++ b/tools/XFdrake
@@ -56,7 +56,16 @@ $configure_this ||= $::auto ? 'auto_install' : 'everything';
}
};
if (!$::auto) {
- if ($rc eq 'need_restart') {
+ if ($rc =~ /need_xrandr(.*)/) {
+ my $opts = $1;
+ my $before = `xrandr`;
+ run_program::run('xrandr', split(' ', $opts));
+ my $after = `xrandr`;
+ if ($before eq $after) {
+ log::l("xrandr $opts failed, defaulting to ask_for_X_restart");
+ any::ask_for_X_restart($in);
+ }
+ } elsif ($rc eq 'need_restart') {
any::ask_for_X_restart($in);
} elsif ($rc eq 'need_reboot') {
$in->ask_warn('', N("You need to reboot for changes to take effect"));