From 2c33ce6818c3325f2b26e143cf1909fdebe79230 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 14 Jun 2007 08:40:19 +0000 Subject: - 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/...) --- tools/XFdrake | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tools') 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")); -- cgit v1.2.1