Merge commit 'origin/server-1.6-branch' into xorg-server-1.6-apple

This commit is contained in:
Jeremy Huddleston 2009-02-28 00:48:52 -08:00
commit 3b36a8688b
12 changed files with 393 additions and 215 deletions

View file

@ -467,11 +467,10 @@ disconnect_hook(void *data)
info->system_bus = NULL;
}
static void
connect_hook(DBusConnection *connection, void *data)
static BOOL
connect_and_register(DBusConnection *connection, struct config_hal_info *info)
{
DBusError error;
struct config_hal_info *info = data;
char **devices;
int num_devices, i;
@ -479,8 +478,10 @@ connect_hook(DBusConnection *connection, void *data)
dbus_error_init(&error);
if (!info->hal_ctx)
info->hal_ctx = libhal_ctx_new();
if (info->hal_ctx)
return TRUE; /* already registered, pretend we did something */
info->hal_ctx = libhal_ctx_new();
if (!info->hal_ctx) {
LogMessage(X_ERROR, "config/hal: couldn't create HAL context\n");
goto out_err;
@ -512,7 +513,7 @@ connect_hook(DBusConnection *connection, void *data)
dbus_error_free(&error);
return;
return TRUE;
out_ctx2:
if (!libhal_ctx_shutdown(info->hal_ctx, &error))
@ -526,6 +527,104 @@ out_err:
info->hal_ctx = NULL;
info->system_bus = NULL;
return FALSE;
}
/**
* Handle NewOwnerChanged signals to deal with HAL startup at X server runtime.
*
* NewOwnerChanged is send once when HAL shuts down, and once again when it
* comes back up. Message has three arguments, first is the name
* (org.freedesktop.Hal), the second one is the old owner, third one is new
* owner.
*/
static DBusHandlerResult
ownerchanged_handler(DBusConnection *connection, DBusMessage *message, void *data)
{
int ret = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
if (dbus_message_is_signal(message,
"org.freedesktop.DBus",
"NameOwnerChanged")) {
DBusError error;
char *name, *old_owner, *new_owner;
dbus_error_init(&error);
dbus_message_get_args(message, &error,
DBUS_TYPE_STRING, &name,
DBUS_TYPE_STRING, &old_owner,
DBUS_TYPE_STRING, &new_owner,
DBUS_TYPE_INVALID);
if (dbus_error_is_set(&error)) {
ErrorF("[config/hal] failed to get NameOwnerChanged args: %s (%s)\n",
error.name, error.message);
} else if (name && strcmp(name, "org.freedesktop.Hal") == 0) {
if (!old_owner || !strlen(old_owner)) {
DebugF("[config/hal] HAL startup detected.\n");
if (connect_and_register(connection, (struct config_hal_info*)data))
dbus_connection_unregister_object_path(connection,
"/org/freedesktop/DBus");
else
ErrorF("[config/hal] Failed to connect to HAL bus.\n");
}
ret = DBUS_HANDLER_RESULT_HANDLED;
}
dbus_error_free(&error);
}
return ret;
}
/**
* Register a handler for the NameOwnerChanged signal.
*/
static BOOL
listen_for_startup(DBusConnection *connection, void *data)
{
DBusObjectPathVTable vtable = { .message_function = ownerchanged_handler, };
DBusError error;
const char MATCH_RULE[] = "sender='org.freedesktop.DBus',"
"interface='org.freedesktop.DBus',"
"type='signal',"
"path='/org/freedesktop/DBus',"
"member='NameOwnerChanged'";
int rc = FALSE;
dbus_error_init(&error);
dbus_bus_add_match(connection, MATCH_RULE, &error);
if (!dbus_error_is_set(&error)) {
if (dbus_connection_register_object_path(connection,
"/org/freedesktop/DBus",
&vtable,
data))
rc = TRUE;
else
ErrorF("[config/hal] cannot register object path.\n");
} else {
ErrorF("[config/hal] couldn't add match rule: %s (%s)\n", error.name,
error.message);
ErrorF("[config/hal] cannot detect a HAL startup.\n");
}
dbus_error_free(&error);
return rc;
}
static void
connect_hook(DBusConnection *connection, void *data)
{
struct config_hal_info *info = data;
if (listen_for_startup(connection, data) &&
connect_and_register(connection, info))
dbus_connection_unregister_object_path(connection,
"/org/freedesktop/DBus");
return;
}

View file

@ -26,12 +26,12 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.57)
AC_INIT([xorg-server], 1.5.99.903-apple2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
AC_INIT([xorg-server], 1.6.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
AM_MAINTAINER_MODE
RELEASE_DATE="2009-2-17"
RELEASE_DATE="2009-2-25"
dnl this gets generated by autoheader, and thus contains all the defines. we
dnl don't ever actually use it, internally.
@ -41,9 +41,7 @@ dnl drivers.
AC_CONFIG_HEADERS(include/xorg-server.h)
dnl dix-config.h covers most of the DIX (i.e. everything but the DDX, not just
dnl dix/).
AC_CONFIG_HEADERS(include/dix-config.h, [mv include/dix-config.h include/dix-config.h.tmp
sed 's|/undef|#undef|' < include/dix-config.h.tmp > include/dix-config.h
rm include/dix-config.h.tmp])
AC_CONFIG_HEADERS(include/dix-config.h)
dnl xorg-config.h covers the Xorg DDX.
AC_CONFIG_HEADERS(include/xorg-config.h)
dnl xkb-config.h covers XKB for the Xorg and Xnest DDXs.

View file

@ -856,139 +856,6 @@ out:
REGION_DESTROY(pScreen, pReg);
}
static void
exaImageGlyphBlt (DrawablePtr pDrawable,
GCPtr pGC,
int x,
int y,
unsigned int nglyph,
CharInfoPtr *ppciInit,
pointer pglyphBase)
{
FbGCPrivPtr pPriv = fbGetGCPrivate(pGC);
CharInfoPtr *ppci;
CharInfoPtr pci;
unsigned char *pglyph; /* pointer bits in glyph */
int gWidth, gHeight; /* width and height of glyph */
FbStride gStride; /* stride of glyph */
Bool opaque;
int gx, gy;
void (*glyph) (FbBits *,
FbStride,
int,
FbStip *,
FbBits,
int,
int);
FbBits *dst;
FbStride dstStride;
int dstBpp;
int dstXoff, dstYoff;
FbBits depthMask;
PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable);
ExaPixmapPriv(pPixmap);
RegionPtr pending_damage = NULL;
BoxRec extents;
int xoff, yoff;
if (pExaPixmap->pDamage)
pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
if (pending_damage) {
extents = *REGION_EXTENTS(pScreen, pending_damage);
if (extents.x1 >= extents.x2 || extents.y1 >= extents.y2)
return;
depthMask = FbFullMask(pDrawable->depth);
}
if (!pending_damage || (pGC->planemask & depthMask) != depthMask)
{
ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase);
return;
}
glyph = NULL;
switch (pDrawable->bitsPerPixel) {
case 8: glyph = fbGlyph8; break;
case 16: glyph = fbGlyph16; break;
case 24: glyph = fbGlyph24; break;
case 32: glyph = fbGlyph32; break;
}
x += pDrawable->x;
y += pDrawable->y;
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
extents.x1 -= xoff;
extents.x2 -= xoff;
extents.y1 -= yoff;
extents.y2 -= yoff;
exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, pending_damage);
if (TERMINALFONT (pGC->font) && !glyph)
{
opaque = TRUE;
}
else
{
FbBits fg = fbReplicatePixel (pGC->bgPixel, pDrawable->bitsPerPixel);
fbSolidBoxClipped (pDrawable,
fbGetCompositeClip(pGC),
extents.x1,
extents.y1,
extents.x2,
extents.y2,
fbAnd (GXcopy, fg, pGC->planemask),
fbXor (GXcopy, fg, pGC->planemask));
opaque = FALSE;
}
EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable)));
exaPrepareAccessGC (pGC);
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
for (ppci = ppciInit; nglyph; nglyph--, x += pci->metrics.characterWidth)
{
pci = *ppci++;
gWidth = GLYPHWIDTHPIXELS(pci);
gHeight = GLYPHHEIGHTPIXELS(pci);
gx = x + pci->metrics.leftSideBearing;
gy = y - pci->metrics.ascent;
if (!gWidth || !gHeight || (gx + gWidth) <= extents.x1 ||
(gy + gHeight) <= extents.y1 || gx >= extents.x2 ||
gy >= extents.y2)
continue;
pglyph = FONTGLYPHBITS(pglyphBase, pci);
if (glyph && gWidth <= sizeof (FbStip) * 8 &&
fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight))
{
(*glyph) (dst + (gy + dstYoff) * dstStride, dstStride, dstBpp,
(FbStip *) pglyph, pPriv->fg, gx + dstXoff, gHeight);
}
else
{
RegionPtr pClip = fbGetCompositeClip(pGC);
gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof (FbStip);
fbPutXYImage (pDrawable, pClip, pPriv->fg, pPriv->bg, pPriv->pm,
GXcopy, opaque, gx, gy, gWidth, gHeight,
(FbStip *) pglyph, gStride, 0);
}
}
exaFinishAccessGC (pGC);
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
}
const GCOps exaOps = {
exaFillSpans,
ExaCheckSetSpans,
@ -1007,7 +874,7 @@ const GCOps exaOps = {
miPolyText16,
miImageText8,
miImageText16,
exaImageGlyphBlt,
ExaCheckImageGlyphBlt,
ExaCheckPolyGlyphBlt,
ExaCheckPushPixels,
};

View file

@ -353,7 +353,7 @@ static __GLXconfig *
pickFBConfig(__GLXscreen *pGlxScreen, VisualPtr visual)
{
__GLXconfig *best = NULL, *config;
int best_score;
int best_score = 0;
for (config = pGlxScreen->fbconfigs; config != NULL; config = config->next) {
int score = 0;

View file

@ -115,6 +115,7 @@ The section names are:
.BR "Files " "File pathnames"
.BR "ServerFlags " "Server flags"
.BR "Module " "Dynamic module loading"
.BR "Extensions " "Extension enabling"
.BR "InputDevice " "Input device description"
.BR "Device " "Graphics device description"
.BR "VideoAdaptor " "Xv video adaptor description"
@ -313,7 +314,7 @@ where
.I <identifier>
is an alphanumeric identifier,
.I [attribute]
is an attribute wich will be passed to the underlying FPE and
is an attribute which will be passed to the underlying FPE and
.I <priority>
is a number used to order the fontfile FPEs. Examples:
.PP
@ -774,6 +775,32 @@ It is recommended
that at very least the \(lqextmod\(rq extension module be loaded.
If it isn't, some commonly used server extensions (like the SHAPE
extension) will not be available.
.SH "EXTENSIONS SECTION"
The
.B Extensions
section is used to specify which X11 protocol extensions should be enabled
or disabled.
The
.B Extensions
section is optional, as are all of the entries that may be specified in
it.
.PP
Entries in this section are listed as Option statements with the name of
the extension as the first argument, and a boolean value as the second.
The extension name is case\-sensitive, and matches the form shown in the output
of \*qXorg -extension ?\*q.
.PP
.RS 7
Example: the MIT-SHM extension can be disabled with the following entry:
.PP
.RS 4
.nf
.B "Section \*qExtensions\*q"
.B " Option \*qMIT-SHM\*q \*qDisable\*q"
.B "EndSection"
.fi
.RE
.RE
.SH "INPUTDEVICE SECTION"
The config file may have multiple
.B InputDevice

View file

@ -1291,7 +1291,7 @@ DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable,
*hHWDrawable = pDRIDrawablePriv->hwDrawable;
}
}
else { /* pixmap (or for GLX 1.3, a PBuffer) */
else if (pDrawable->type != DRAWABLE_PIXMAP) { /* PBuffer */
/* NOT_DONE */
return FALSE;
}

View file

@ -56,7 +56,6 @@
#undef IN_LOADER
#define IN_LOADER
#include "xf86Module.h"
#include <X11/fonts/fontmod.h>
typedef struct module_desc {
struct module_desc *child;

View file

@ -172,11 +172,167 @@ xf86RandR13VerifyPanningArea (xf86CrtcPtr crtc, int screenWidth, int screenHeigh
return ret;
}
/*
* The heart of the panning operation:
*
* Given a frame buffer position (fb_x, fb_y),
* and a crtc position (crtc_x, crtc_y),
* and a transform matrix which maps frame buffer to crtc,
* compute a panning position (pan_x, pan_y) that
* makes the resulting transform line those two up
*/
static void
xf86ComputeCrtcPan (Bool transform_in_use,
struct pixman_f_transform *m,
double screen_x, double screen_y,
double crtc_x, double crtc_y,
int old_pan_x, int old_pan_y,
int *new_pan_x, int *new_pan_y)
{
if (transform_in_use) {
/*
* Given the current transform, M, the current position
* on the Screen, S, and the desired position on the CRTC,
* C, compute a translation, T, such that:
*
* M T S = C
*
* where T is of the form
*
* | 1 0 dx |
* | 0 1 dy |
* | 0 0 1 |
*
* M T S =
* | M00 Sx + M01 Sy + M00 dx + M01 dy + M02 | | Cx F |
* | M10 Sx + M11 Sy + M10 dx + M11 dy + M12 | = | Cy F |
* | M20 Sx + M21 Sy + M20 dx + M21 dy + M22 | | F |
*
* R = M S
*
* Cx F = M00 dx + M01 dy + R0
* Cy F = M10 dx + M11 dy + R1
* F = M20 dx + M21 dy + R2
*
* Zero out dx, then dy
*
* F (Cx M10 - Cy M00) =
* (M10 M01 - M00 M11) dy + M10 R0 - M00 R1
* F (M10 - Cy M20) =
* (M10 M21 - M20 M11) dy + M10 R2 - M20 R1
*
* F (Cx M11 - Cy M01) =
* (M11 M00 - M01 M10) dx + M11 R0 - M01 R1
* F (M11 - Cy M21) =
* (M11 M20 - M21 M10) dx + M11 R2 - M21 R1
*
* Make some temporaries
*
* T = | Cx M10 - Cy M00 |
* | Cx M11 - Cy M01 |
*
* U = | M10 M01 - M00 M11 |
* | M11 M00 - M01 M10 |
*
* Q = | M10 R0 - M00 R1 |
* | M11 R0 - M01 R1 |
*
* P = | M10 - Cy M20 |
* | M11 - Cy M21 |
*
* W = | M10 M21 - M20 M11 |
* | M11 M20 - M21 M10 |
*
* V = | M10 R2 - M20 R1 |
* | M11 R2 - M21 R1 |
*
* Rewrite:
*
* F T0 = U0 dy + Q0
* F P0 = W0 dy + V0
* F T1 = U1 dx + Q1
* F P1 = W1 dx + V1
*
* Solve for F (two ways)
*
* F (W0 T0 - U0 P0) = W0 Q0 - U0 V0
*
* W0 Q0 - U0 V0
* F = -------------
* W0 T0 - U0 P0
*
* F (W1 T1 - U1 P1) = W1 Q1 - U1 V1
*
* W1 Q1 - U1 V1
* F = -------------
* W1 T1 - U1 P1
*
* We'll use which ever solution works (denominator != 0)
*
* Finally, solve for dx and dy:
*
* dx = (F T1 - Q1) / U1
* dx = (F P1 - V1) / W1
*
* dy = (F T0 - Q0) / U0
* dy = (F P0 - V0) / W0
*/
double r[3];
double q[2], u[2], t[2], v[2], w[2], p[2];
double f;
struct pict_f_vector d;
int i;
/* Get the un-normalized crtc coordinates again */
for (i = 0; i < 3; i++)
r[i] = m->m[i][0] * screen_x + m->m[i][1] * screen_y + m->m[i][2];
/* Combine values into temporaries */
for (i = 0; i < 2; i++) {
q[i] = m->m[1][i] * r[0] - m->m[0][i] * r[1];
u[i] = m->m[1][i] * m->m[0][1-i] - m->m[0][i] * m->m[1][1-i];
t[i] = m->m[1][i] * crtc_x - m->m[0][i] * crtc_y;
v[i] = m->m[1][i] * r[2] - m->m[2][i] * r[1];
w[i] = m->m[1][i] * m->m[2][1-i] - m->m[2][i] * m->m[1][1-i];
p[i] = m->m[1][i] - m->m[2][i] * crtc_y;
}
/* Find a way to compute f */
f = 0;
for (i = 0; i < 2; i++) {
double a = w[i] * q[i] - u[i] * v[i];
double b = w[i] * t[i] - u[i] * p[i];
if (b != 0) {
f = a/b;
break;
}
}
/* Solve for the resulting transform vector */
for (i = 0; i < 2; i++) {
if (u[i])
d.v[1-i] = (t[i] * f - q[i]) / u[i];
else if (w[1])
d.v[1-i] = (p[i] * f - v[i]) / w[i];
else
d.v[1-i] = 0;
}
*new_pan_x = old_pan_x - floor (d.v[0] + 0.5);
*new_pan_y = old_pan_y - floor (d.v[1] + 0.5);
} else {
*new_pan_x = screen_x - crtc_x;
*new_pan_y = screen_y - crtc_y;
}
}
static void
xf86RandR13Pan (xf86CrtcPtr crtc, int x, int y)
{
int newX, newY;
int width, height;
Bool panned = FALSE;
if (crtc->version < 2)
return;
@ -194,32 +350,88 @@ xf86RandR13Pan (xf86CrtcPtr crtc, int x, int y)
if ((crtc->panningTrackingArea.x2 <= crtc->panningTrackingArea.x1 ||
(x >= crtc->panningTrackingArea.x1 && x < crtc->panningTrackingArea.x2)) &&
(crtc->panningTrackingArea.y2 <= crtc->panningTrackingArea.y1 ||
(y >= crtc->panningTrackingArea.y1 && y < crtc->panningTrackingArea.y2))) {
(y >= crtc->panningTrackingArea.y1 && y < crtc->panningTrackingArea.y2)))
{
struct pict_f_vector c;
/*
* Pre-clip the mouse position to the panning area so that we don't
* push the crtc outside. This doesn't deal with changes to the
* panning values, only mouse position changes.
*/
if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1)
{
if (x < crtc->panningTotalArea.x1)
x = crtc->panningTotalArea.x1;
if (x >= crtc->panningTotalArea.x2)
x = crtc->panningTotalArea.x2 - 1;
}
if (crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1)
{
if (y < crtc->panningTotalArea.y1)
y = crtc->panningTotalArea.y1;
if (y >= crtc->panningTotalArea.y2)
y = crtc->panningTotalArea.y2 - 1;
}
c.v[0] = x;
c.v[1] = y;
c.v[2] = 1.0;
if (crtc->transform_in_use) {
pixman_f_transform_point(&crtc->f_framebuffer_to_crtc, &c);
} else {
c.v[0] -= crtc->x;
c.v[1] -= crtc->y;
}
if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1) {
if (x < crtc->x + crtc->panningBorder[0])
newX = x - crtc->panningBorder[0];
if (x >= crtc->x + width - crtc->panningBorder[2])
newX = x - width + crtc->panningBorder[2] + 1;
if (c.v[0] < crtc->panningBorder[0]) {
c.v[0] = crtc->panningBorder[0];
panned = TRUE;
}
if (c.v[0] >= width - crtc->panningBorder[2]) {
c.v[0] = width - crtc->panningBorder[2] - 1;
panned = TRUE;
}
}
if (crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) {
if (y < crtc->y + crtc->panningBorder[1])
newY = y - crtc->panningBorder[1];
if (y >= crtc->y + height - crtc->panningBorder[3])
newY = y - height + crtc->panningBorder[3] + 1;
if (c.v[1] < crtc->panningBorder[1]) {
c.v[1] = crtc->panningBorder[1];
panned = TRUE;
}
if (c.v[1] >= height - crtc->panningBorder[3]) {
c.v[1] = height - crtc->panningBorder[3] - 1;
panned = TRUE;
}
}
if (panned)
xf86ComputeCrtcPan (crtc->transform_in_use,
&crtc->f_framebuffer_to_crtc,
x, y, c.v[0], c.v[1],
newX, newY, &newX, &newY);
}
/* Validate against [xy]1 after [xy]2, to be sure that results are > 0 for [xy]1 > 0 */
if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1) {
if (newX > crtc->panningTotalArea.x2 - width)
newX = crtc->panningTotalArea.x2 - width;
if (newX < crtc->panningTotalArea.x1)
newX = crtc->panningTotalArea.x1;
}
if (crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) {
if (newY > crtc->panningTotalArea.y2 - height)
newY = crtc->panningTotalArea.y2 - height;
if (newY < crtc->panningTotalArea.y1)
newY = crtc->panningTotalArea.y1;
/*
* Ensure that the crtc is within the panning region.
*
* XXX This computation only works when we do not have a transform
* in use.
*/
if (!crtc->transform_in_use)
{
/* Validate against [xy]1 after [xy]2, to be sure that results are > 0 for [xy]1 > 0 */
if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1) {
if (newX > crtc->panningTotalArea.x2 - width)
newX = crtc->panningTotalArea.x2 - width;
if (newX < crtc->panningTotalArea.x1)
newX = crtc->panningTotalArea.x1;
}
if (crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) {
if (newY > crtc->panningTotalArea.y2 - height)
newY = crtc->panningTotalArea.y2 - height;
if (newY < crtc->panningTotalArea.y1)
newY = crtc->panningTotalArea.y1;
}
}
if (newX != crtc->x || newY != crtc->y)
xf86CrtcSetOrigin (crtc, newX, newY);

View file

@ -145,37 +145,6 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
FreePicture (dst, None);
}
static void
xf86CrtcShadowClear (xf86CrtcPtr crtc)
{
PixmapPtr dst_pixmap = crtc->rotatedPixmap;
ScrnInfoPtr scrn = crtc->scrn;
ScreenPtr screen = scrn->pScreen;
PicturePtr dst;
PictFormatPtr format = compWindowFormat (WindowTable[screen->myNum]);
static xRenderColor black = { 0, 0, 0, 0 };
xRectangle rect;
int error;
if (!dst_pixmap)
return;
dst = CreatePicture (None,
&dst_pixmap->drawable,
format,
0L,
NULL,
serverClient,
&error);
if (!dst)
return;
rect.x = 0;
rect.y = 0;
rect.width = dst_pixmap->drawable.width;
rect.height = dst_pixmap->drawable.height;
CompositeRects (PictOpSrc, dst, &black, 1, &rect);
FreePicture (dst, None);
}
static void
xf86CrtcDamageShadow (xf86CrtcPtr crtc)
{

View file

@ -73,6 +73,8 @@ static xf86ConfigSymTabRec FilesTab[] =
{INPUTDEVICES, "inputdevices"},
{LOGFILEPATH, "logfile"},
{XKBDIR, "xkbdir"},
/* Obsolete keywords that aren't used but shouldn't cause errors: */
{OBSOLETE_TOKEN, "rgbpath"},
{-1, ""},
};
@ -189,6 +191,10 @@ xf86parseFilesSection (void)
case EOF_TOKEN:
Error (UNEXPECTED_EOF_MSG, NULL);
break;
case OBSOLETE_TOKEN:
xf86parseError (OBSOLETE_MSG, xf86tokenString ());
xf86getSubToken (&(ptr->file_comment));
break;
default:
Error (INVALID_KEYWORD_MSG, xf86tokenString ());
break;

View file

@ -70,6 +70,7 @@
typedef enum {
/* errno-style tokens */
OBSOLETE_TOKEN = -5,
EOF_TOKEN = -4,
LOCK_TOKEN = -3,
ERROR_TOKEN = -2,

View file

@ -185,21 +185,21 @@ RRTransformCompute (int x,
break;
case RR_Rotate_90:
f_rot_cos = 0; f_rot_sin = 1;
f_rot_dx = height; f_rot_dy = 0;
f_rot_dx = height-1; f_rot_dy = 0;
rot_cos = F ( 0); rot_sin = F ( 1);
rot_dx = F ( height); rot_dy = F (0);
rot_dx = F (height-1); rot_dy = F (0);
break;
case RR_Rotate_180:
f_rot_cos = -1; f_rot_sin = 0;
f_rot_dx = width; f_rot_dy = height;
f_rot_dx = width - 1; f_rot_dy = height - 1;
rot_cos = F (-1); rot_sin = F ( 0);
rot_dx = F (width); rot_dy = F ( height);
rot_dx = F (width-1); rot_dy = F ( height-1);
break;
case RR_Rotate_270:
f_rot_cos = 0; f_rot_sin = -1;
f_rot_dx = 0; f_rot_dy = width;
f_rot_dx = 0; f_rot_dy = width-1;
rot_cos = F ( 0); rot_sin = F (-1);
rot_dx = F ( 0); rot_dy = F ( width);
rot_dx = F ( 0); rot_dy = F ( width-1);
break;
}
@ -222,11 +222,11 @@ RRTransformCompute (int x,
f_scale_x = -1;
scale_x = F(-1);
if (rotation & (RR_Rotate_0|RR_Rotate_180)) {
f_scale_dx = width;
scale_dx = F(width);
f_scale_dx = width-1;
scale_dx = F(width-1);
} else {
f_scale_dx = height;
scale_dx = F(height);
f_scale_dx = height-1;
scale_dx = F(height-1);
}
}
if (rotation & RR_Reflect_Y)
@ -234,11 +234,11 @@ RRTransformCompute (int x,
f_scale_y = -1;
scale_y = F(-1);
if (rotation & (RR_Rotate_0|RR_Rotate_180)) {
f_scale_dy = height;
scale_dy = F(height);
f_scale_dy = height-1;
scale_dy = F(height-1);
} else {
f_scale_dy = width;
scale_dy = F(width);
f_scale_dy = width-1;
scale_dy = F(width-1);
}
}