summaryrefslogtreecommitdiffstats
path: root/lib/Xconfig/main.pm
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 /lib/Xconfig/main.pm
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 'lib/Xconfig/main.pm')
-rw-r--r--lib/Xconfig/main.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Xconfig/main.pm b/lib/Xconfig/main.pm
index 7fb9c8a..6a4c8cf 100644
--- a/lib/Xconfig/main.pm
+++ b/lib/Xconfig/main.pm
@@ -209,12 +209,15 @@ The current configuration is:
sub write {
my ($raw_X, $X) = @_;
export_to_install_X($X) if $::isInstall;
+ my $only_resolution = $raw_X->is_only_resolution_modified;
$raw_X->write;
Xconfig::various::check_XF86Config_symlink();
symlinkf "../../usr/bin/Xorg", "$::prefix/etc/X11/X";
if ($X->{resolutions}[0]{bios}) {
Xconfig::various::setupFB($X->{resolutions}[0]{bios});
'need_reboot';
+ } elsif (my $resolution = $only_resolution && eval { $raw_X->get_resolution }) {
+ 'need_xrandr' . sprintf(' --size %dx%d', @$resolution{'X', 'Y'});
} else {
'need_restart';
}