summaryrefslogtreecommitdiffstats
path: root/tools/XFdrake
diff options
context:
space:
mode:
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"));