From 4ee2149bc75d82352deb4902eb88a37b184bcecb Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 25 Sep 2008 14:50:01 +0000 Subject: create XxY() and use it --- lib/Xconfig/resolution_and_depth.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Xconfig/resolution_and_depth.pm b/lib/Xconfig/resolution_and_depth.pm index 39ba7b9..5b43691 100644 --- a/lib/Xconfig/resolution_and_depth.pm +++ b/lib/Xconfig/resolution_and_depth.pm @@ -65,6 +65,8 @@ sub size2default_resolution { $monitorSize2resolution{round($size)} || ($size < 13 ? "640x480" : "1600x1200"); } +sub XxY { &Xconfig::xfree::XxY } + sub to_string { my ($resolution) = @_; $resolution or return ''; @@ -237,7 +239,7 @@ sub set_resolution { if (!$resolution->{automatic}) { my $ratio = Xconfig::xfree::resolution2ratio($resolution, 'non-strict'); - @other = uniq_ { $_->{X} . 'x' . $_->{Y} } @other; + @other = uniq_ { XxY($_) } @other; @other = grep { $_->{X} < $resolution->{X} } @other; @other = filter_on_ratio($ratio, @other); -- cgit v1.2.1