1
0
OBS User unknown 2008-05-26 21:18:34 +00:00 committed by Git OBS Bridge
parent bb596d16bc
commit 3133398ed7
3 changed files with 69 additions and 1 deletions

57
fix-dpi-values.diff Normal file
View File

@ -0,0 +1,57 @@
diff -u -p ../../../../xorg-server-1.4.0.90.orig/hw/xfree86/common//xf86Helper.c ./xf86Helper.c
--- ../../../../xorg-server-1.4.0.90.orig/hw/xfree86/common//xf86Helper.c 2008-05-26 16:53:50.000000000 +0000
+++ hw/xfree86/common/xf86Helper.c 2008-05-26 17:09:52.000000000 +0000
@@ -1017,12 +1017,22 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int
} else if (pScrn->widthmm > 0 || pScrn->heightmm > 0) {
from = X_CONFIG;
if (pScrn->widthmm > 0) {
- pScrn->xDpi =
- (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ if (pScrn->modes && pScrn->modes->HDisplay > 0) {
+ pScrn->xDpi =
+ (int)((double) pScrn->modes->HDisplay * MMPERINCH / pScrn->widthmm);
+ } else {
+ pScrn->xDpi =
+ (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ }
}
if (pScrn->heightmm > 0) {
- pScrn->yDpi =
- (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ if (pScrn->modes && pScrn->modes->VDisplay > 0) {
+ pScrn->yDpi =
+ (int)((double)pScrn->modes->VDisplay * MMPERINCH / pScrn->heightmm);
+ } else {
+ pScrn->yDpi =
+ (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ }
}
if (pScrn->xDpi > 0 && pScrn->yDpi <= 0)
pScrn->yDpi = pScrn->xDpi;
@@ -1057,12 +1067,22 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int
pScrn->widthmm = ddcWidthmm;
pScrn->heightmm = ddcHeightmm;
if (pScrn->widthmm > 0) {
- pScrn->xDpi =
- (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ if (pScrn->modes && pScrn->modes->HDisplay > 0) {
+ pScrn->xDpi =
+ (int)((double) pScrn->modes->HDisplay * MMPERINCH / pScrn->widthmm);
+ } else {
+ pScrn->xDpi =
+ (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ }
}
if (pScrn->heightmm > 0) {
- pScrn->yDpi =
- (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ if (pScrn->modes && pScrn->modes->VDisplay > 0) {
+ pScrn->yDpi =
+ (int)((double)pScrn->modes->VDisplay * MMPERINCH / pScrn->heightmm);
+ } else {
+ pScrn->yDpi =
+ (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ }
}
if (pScrn->xDpi > 0 && pScrn->yDpi <= 0)
pScrn->yDpi = pScrn->xDpi;

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon May 26 19:27:39 CEST 2008 - sndirsch@suse.de
- fix-dpi-values.diff
* fixes DPI values for RANDR 1.2 capable drivers (bnc #393001)
------------------------------------------------------------------- -------------------------------------------------------------------
Fri May 16 16:52:03 CEST 2008 - sndirsch@suse.de Fri May 16 16:52:03 CEST 2008 - sndirsch@suse.de

View File

@ -22,7 +22,7 @@ BuildRequires: libjpeg-devel
Url: http://xorg.freedesktop.org/ Url: http://xorg.freedesktop.org/
%define EXPERIMENTAL 0 %define EXPERIMENTAL 0
Version: 7.3 Version: 7.3
Release: 104 Release: 106
License: X11/MIT License: X11/MIT
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: System/X11/Servers/XF86_4 Group: System/X11/Servers/XF86_4
@ -116,6 +116,7 @@ Patch108: xkb_action.diff
Patch109: events.diff Patch109: events.diff
Patch110: xorg-server-1.4-vnc-disable_render.diff Patch110: xorg-server-1.4-vnc-disable_render.diff
Patch111: xorg-server-1.4-vnc-render_sig11.diff Patch111: xorg-server-1.4-vnc-render_sig11.diff
Patch112: fix-dpi-values.diff
%description %description
This package contains the X.Org Server. This package contains the X.Org Server.
@ -262,6 +263,7 @@ popd
%patch107 -p0 %patch107 -p0
%patch108 -p1 %patch108 -p1
%patch109 -p1 %patch109 -p1
%patch112 -p0
%build %build
pushd xorg-docs-* pushd xorg-docs-*
@ -568,6 +570,9 @@ exit 0
%endif %endif
%changelog %changelog
* Mon May 26 2008 sndirsch@suse.de
- fix-dpi-values.diff
* fixes DPI values for RANDR 1.2 capable drivers (bnc #393001)
* Fri May 16 2008 sndirsch@suse.de * Fri May 16 2008 sndirsch@suse.de
- mention ZapWarning also in Xorg manual page (bnc #391352) - mention ZapWarning also in Xorg manual page (bnc #391352)
* Fri May 16 2008 sndirsch@suse.de * Fri May 16 2008 sndirsch@suse.de