Merge remote branch 'vignatti/for-keith'
Conflicts: exa/exa.c Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
commit
7ac6a6b7d0
|
@ -99,13 +99,6 @@ BUILTIN_SRCS += $(XCALIBRATE_SRCS)
|
||||||
# XCalibrate needs tslib
|
# XCalibrate needs tslib
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Multi-buffering extension
|
|
||||||
MULTIBUFFER_SRCS = mbuf.c
|
|
||||||
EXTRA_MULTIBUFFER_SRCS = mbufbf.c mbufpx.c
|
|
||||||
if MULTIBUFFER
|
|
||||||
MODULE_SRCS += $(MULTIBUFFER_SRCS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# XF86 Big Font extension
|
# XF86 Big Font extension
|
||||||
BIGFONT_SRCS = xf86bigfont.c xf86bigfontsrv.h
|
BIGFONT_SRCS = xf86bigfont.c xf86bigfontsrv.h
|
||||||
if XF86BIGFONT
|
if XF86BIGFONT
|
||||||
|
@ -140,8 +133,6 @@ EXTRA_DIST = \
|
||||||
$(XSELINUX_SRCS) \
|
$(XSELINUX_SRCS) \
|
||||||
$(XCALIBRATE_SRCS) \
|
$(XCALIBRATE_SRCS) \
|
||||||
$(XINERAMA_SRCS) \
|
$(XINERAMA_SRCS) \
|
||||||
$(MULTIBUFFER_SRCS) \
|
|
||||||
$(EXTRA_MULTIBUFFER_SRCS) \
|
|
||||||
$(FONTCACHE_SRCS) \
|
$(FONTCACHE_SRCS) \
|
||||||
$(BIGFONT_SRCS) \
|
$(BIGFONT_SRCS) \
|
||||||
$(DPMS_SRCS) \
|
$(DPMS_SRCS) \
|
||||||
|
|
2014
Xext/mbuf.c
2014
Xext/mbuf.c
File diff suppressed because it is too large
Load Diff
1007
Xext/mbufbf.c
1007
Xext/mbufbf.c
File diff suppressed because it is too large
Load Diff
648
Xext/mbufpx.c
648
Xext/mbufpx.c
|
@ -1,648 +0,0 @@
|
||||||
/************************************************************
|
|
||||||
|
|
||||||
Copyright 1989, 1998 The Open Group
|
|
||||||
|
|
||||||
Permission to use, copy, modify, distribute, and sell this software and its
|
|
||||||
documentation for any purpose is hereby granted without fee, provided that
|
|
||||||
the above copyright notice appear in all copies and that both that
|
|
||||||
copyright notice and this permission notice appear in supporting
|
|
||||||
documentation.
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
||||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
||||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of The Open Group shall not be
|
|
||||||
used in advertising or otherwise to promote the sale, use or other dealings
|
|
||||||
in this Software without prior written authorization from The Open Group.
|
|
||||||
|
|
||||||
********************************************************/
|
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <X11/X.h>
|
|
||||||
#include <X11/Xproto.h>
|
|
||||||
#include "misc.h"
|
|
||||||
#include "os.h"
|
|
||||||
#include "windowstr.h"
|
|
||||||
#include "scrnintstr.h"
|
|
||||||
#include "pixmapstr.h"
|
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "dixstruct.h"
|
|
||||||
#include "resource.h"
|
|
||||||
#include "opaque.h"
|
|
||||||
#include "regionstr.h"
|
|
||||||
#include "gcstruct.h"
|
|
||||||
#include "inputstr.h"
|
|
||||||
#include <sys/time.h>
|
|
||||||
|
|
||||||
#define _MULTIBUF_SERVER_ /* don't want Xlib structures */
|
|
||||||
#define _MULTIBUF_PIXMAP_
|
|
||||||
#include <X11/extensions/multibufst.h>
|
|
||||||
|
|
||||||
|
|
||||||
static Bool NoopDDA_True() { return TRUE; }
|
|
||||||
|
|
||||||
static Bool pixPositionWindow();
|
|
||||||
static int pixCreateImageBuffers();
|
|
||||||
static void pixDisplayImageBuffers();
|
|
||||||
static void pixClearImageBufferArea();
|
|
||||||
static void pixDeleteBufferDrawable();
|
|
||||||
static void pixWrapScreenFuncs();
|
|
||||||
static void pixResetProc();
|
|
||||||
|
|
||||||
Bool
|
|
||||||
pixMultibufferInit(pScreen, pMBScreen)
|
|
||||||
ScreenPtr pScreen;
|
|
||||||
mbufScreenPtr pMBScreen;
|
|
||||||
{
|
|
||||||
int i, j, k;
|
|
||||||
xMbufBufferInfo *pInfo;
|
|
||||||
int nInfo;
|
|
||||||
DepthPtr pDepth;
|
|
||||||
mbufPixmapPrivPtr pMBPriv;
|
|
||||||
|
|
||||||
pMBScreen->CreateImageBuffers = pixCreateImageBuffers;
|
|
||||||
pMBScreen->DestroyImageBuffers = (void (*)())NoopDDA;
|
|
||||||
pMBScreen->DisplayImageBuffers = pixDisplayImageBuffers;
|
|
||||||
pMBScreen->ClearImageBufferArea = pixClearImageBufferArea;
|
|
||||||
pMBScreen->ChangeMBufferAttributes = NoopDDA_True;
|
|
||||||
pMBScreen->ChangeBufferAttributes = NoopDDA_True;
|
|
||||||
pMBScreen->DeleteBufferDrawable = pixDeleteBufferDrawable;
|
|
||||||
pMBScreen->WrapScreenFuncs = pixWrapScreenFuncs;
|
|
||||||
pMBScreen->ResetProc = pixResetProc;
|
|
||||||
|
|
||||||
/* Support every depth and visual combination that the screen does */
|
|
||||||
|
|
||||||
nInfo = 0;
|
|
||||||
for (i = 0; i < pScreen->numDepths; i++)
|
|
||||||
{
|
|
||||||
pDepth = &pScreen->allowedDepths[i];
|
|
||||||
nInfo += pDepth->numVids;
|
|
||||||
}
|
|
||||||
|
|
||||||
pInfo = xalloc (nInfo * sizeof (xMbufBufferInfo));
|
|
||||||
if (!pInfo)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
k = 0;
|
|
||||||
for (i = 0; i < pScreen->numDepths; i++)
|
|
||||||
{
|
|
||||||
pDepth = &pScreen->allowedDepths[i];
|
|
||||||
for (j = 0; j < pDepth->numVids; j++)
|
|
||||||
{
|
|
||||||
pInfo[k].visualID = pDepth->vids[j];
|
|
||||||
pInfo[k].maxBuffers = 0;
|
|
||||||
pInfo[k].depth = pDepth->depth;
|
|
||||||
k++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pMBScreen->nInfo = nInfo;
|
|
||||||
pMBScreen->pInfo = pInfo;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Setup the devPrivate to mbufScreenRec
|
|
||||||
*/
|
|
||||||
|
|
||||||
pMBPriv = xalloc(sizeof(* pMBPriv));
|
|
||||||
if (!pMBPriv)
|
|
||||||
{
|
|
||||||
xfree(pInfo);
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
pMBScreen->devPrivate.ptr = (pointer) pMBPriv;
|
|
||||||
pMBPriv->PositionWindow = NULL;
|
|
||||||
pMBPriv->funcsWrapped = 0;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
static int
|
|
||||||
pixCreateImageBuffers (pWin, nbuf, ids, action, hint)
|
|
||||||
WindowPtr pWin;
|
|
||||||
int nbuf;
|
|
||||||
XID *ids;
|
|
||||||
int action;
|
|
||||||
int hint;
|
|
||||||
{
|
|
||||||
mbufWindowPtr pMBWindow;
|
|
||||||
mbufBufferPtr pMBBuffer;
|
|
||||||
ScreenPtr pScreen;
|
|
||||||
int width, height, depth;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
pMBWindow = MB_WINDOW_PRIV(pWin);
|
|
||||||
|
|
||||||
width = pWin->drawable.width;
|
|
||||||
height = pWin->drawable.height;
|
|
||||||
depth = pWin->drawable.depth;
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
for (i = 0; i < nbuf; i++)
|
|
||||||
{
|
|
||||||
pMBBuffer = &pMBWindow->buffers[i];
|
|
||||||
pMBBuffer->pDrawable = (DrawablePtr)
|
|
||||||
(*pScreen->CreatePixmap) (pScreen, width, height, depth, 0);
|
|
||||||
if (!pMBBuffer->pDrawable)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (!AddResource (ids[i], MultibufferDrawableResType,
|
|
||||||
(pointer) pMBBuffer->pDrawable))
|
|
||||||
{
|
|
||||||
(*pScreen->DestroyPixmap) ((PixmapPtr) pMBBuffer->pDrawable);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
pMBBuffer->pDrawable->id = ids[i];
|
|
||||||
|
|
||||||
/*
|
|
||||||
* In the description of the CreateImageBuffers request:
|
|
||||||
* "If the window is mapped, or if these image buffers have
|
|
||||||
* backing store, their contents will be tiled with the window
|
|
||||||
* background, and zero or more expose events will be generated
|
|
||||||
* for each of these buffers."
|
|
||||||
*/
|
|
||||||
|
|
||||||
(* MB_SCREEN_PRIV(pScreen)->ClearImageBufferArea)
|
|
||||||
(pMBBuffer, 0,0, 0,0, TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* set up the gc to clear the pixmaps;
|
|
||||||
*/
|
|
||||||
static Bool
|
|
||||||
SetupBackgroundPainter (pWin, pGC)
|
|
||||||
WindowPtr pWin;
|
|
||||||
GCPtr pGC;
|
|
||||||
{
|
|
||||||
XID gcvalues[4];
|
|
||||||
int ts_x_origin, ts_y_origin;
|
|
||||||
PixUnion background;
|
|
||||||
int backgroundState;
|
|
||||||
Mask gcmask;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* First take care of any ParentRelative stuff by altering the
|
|
||||||
* tile/stipple origin to match the coordinates of the upper-left
|
|
||||||
* corner of the first ancestor without a ParentRelative background.
|
|
||||||
* This coordinate is, of course, negative.
|
|
||||||
*/
|
|
||||||
|
|
||||||
ts_x_origin = ts_y_origin = 0;
|
|
||||||
while (pWin->backgroundState == ParentRelative) {
|
|
||||||
ts_x_origin -= pWin->origin.x;
|
|
||||||
ts_y_origin -= pWin->origin.y;
|
|
||||||
pWin = pWin->parent;
|
|
||||||
}
|
|
||||||
backgroundState = pWin->backgroundState;
|
|
||||||
background = pWin->background;
|
|
||||||
|
|
||||||
switch (backgroundState)
|
|
||||||
{
|
|
||||||
case BackgroundPixel:
|
|
||||||
gcvalues[0] = (XID) background.pixel;
|
|
||||||
gcvalues[1] = FillSolid;
|
|
||||||
gcmask = GCForeground|GCFillStyle;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case BackgroundPixmap:
|
|
||||||
gcvalues[0] = FillTiled;
|
|
||||||
gcvalues[1] = (XID) background.pixmap;
|
|
||||||
gcvalues[2] = ts_x_origin;
|
|
||||||
gcvalues[3] = ts_y_origin;
|
|
||||||
gcmask = GCFillStyle|GCTile|GCTileStipXOrigin|GCTileStipYOrigin;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
DoChangeGC(pGC, gcmask, gcvalues, TRUE);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
MultibufferPaintBackgroundRectangles(pWin, pDrawable, nrects, pRects)
|
|
||||||
WindowPtr pWin;
|
|
||||||
DrawablePtr pDrawable;
|
|
||||||
int nrects;
|
|
||||||
xRectangle *pRects;
|
|
||||||
{
|
|
||||||
GCPtr pGC;
|
|
||||||
|
|
||||||
pGC = GetScratchGC (pWin->drawable.depth, pWin->drawable.pScreen);
|
|
||||||
if (SetupBackgroundPainter(pWin, pGC))
|
|
||||||
{
|
|
||||||
ValidateGC(pDrawable, pGC);
|
|
||||||
(*pGC->ops->PolyFillRect) (pDrawable, pGC, nrects, pRects);
|
|
||||||
}
|
|
||||||
FreeScratchGC(pGC);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
MultibufferPaintBackgroundRegion(pWin, pDrawable, pRegion)
|
|
||||||
WindowPtr pWin;
|
|
||||||
DrawablePtr pDrawable;
|
|
||||||
RegionPtr pRegion;
|
|
||||||
{
|
|
||||||
xRectangle *pRects;
|
|
||||||
int nrects = REGION_NUM_RECTS(pRegion);
|
|
||||||
BoxPtr pbox = REGION_RECTS(pRegion);
|
|
||||||
|
|
||||||
pRects = xalloc(nrects * sizeof(xRectangle));
|
|
||||||
if (pRects)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < nrects; i++)
|
|
||||||
{
|
|
||||||
pRects[i].x = pbox->x1;
|
|
||||||
pRects[i].y = pbox->y1;
|
|
||||||
pRects[i].width = pbox->x2 - pbox->x1;
|
|
||||||
pRects[i].height = pbox->y2 - pbox->y1;
|
|
||||||
}
|
|
||||||
MultibufferPaintBackgroundRectangles(pWin, pDrawable, nrects, pRects);
|
|
||||||
xfree(pRects);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
pixDisplayImageBuffers(pScreen, ppMBWindow, ppMBBuffer, nbuf)
|
|
||||||
mbufBufferPtr *ppMBBuffer;
|
|
||||||
mbufWindowPtr *ppMBWindow;
|
|
||||||
int nbuf;
|
|
||||||
{
|
|
||||||
GCPtr pGC = NULL;
|
|
||||||
PixmapPtr pPrevPixmap, pNewPixmap;
|
|
||||||
WindowPtr pWin;
|
|
||||||
RegionPtr pExposed;
|
|
||||||
int i;
|
|
||||||
mbufBufferPtr pPrevMBBuffer;
|
|
||||||
XID bool;
|
|
||||||
xRectangle r;
|
|
||||||
|
|
||||||
UpdateCurrentTime ();
|
|
||||||
for (i = 0; i < nbuf; i++)
|
|
||||||
{
|
|
||||||
pWin = ppMBWindow[i]->pWindow;
|
|
||||||
|
|
||||||
/* Time to get a different scratch GC? */
|
|
||||||
|
|
||||||
if (!pGC
|
|
||||||
|| pGC->depth != pWin->drawable.depth
|
|
||||||
|| pGC->pScreen != pWin->drawable.pScreen)
|
|
||||||
{
|
|
||||||
if (pGC) FreeScratchGC(pGC);
|
|
||||||
pGC = GetScratchGC (pWin->drawable.depth, pWin->drawable.pScreen);
|
|
||||||
}
|
|
||||||
pPrevMBBuffer = MB_DISPLAYED_BUFFER(ppMBWindow[i]);
|
|
||||||
pPrevPixmap = (PixmapPtr) pPrevMBBuffer->pDrawable;
|
|
||||||
pNewPixmap = (PixmapPtr) ppMBBuffer[i]->pDrawable;
|
|
||||||
|
|
||||||
if (pPrevPixmap == pNewPixmap)
|
|
||||||
{
|
|
||||||
/* "If a specified buffer is already displayed, any delays and
|
|
||||||
* update action will still be performed for that buffer."
|
|
||||||
*
|
|
||||||
* We special-case this because applications do occasionally
|
|
||||||
* request a redundant DisplayImageBuffers, and we can save
|
|
||||||
* strokes by recognizing that the only update action that will
|
|
||||||
* change the buffer contents in this case is Background.
|
|
||||||
*/
|
|
||||||
if (ppMBWindow[i]->updateAction == MultibufferUpdateActionBackground)
|
|
||||||
{
|
|
||||||
r.x = r.y = 0;
|
|
||||||
r.width = pWin->drawable.width;
|
|
||||||
r.height = pWin->drawable.height;
|
|
||||||
MultibufferPaintBackgroundRectangles(pWin, (DrawablePtr)pWin,
|
|
||||||
1, &r);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else /* different buffer is being displayed */
|
|
||||||
{
|
|
||||||
/* perform update action */
|
|
||||||
|
|
||||||
switch (ppMBWindow[i]->updateAction)
|
|
||||||
{
|
|
||||||
case MultibufferUpdateActionUndefined:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MultibufferUpdateActionBackground:
|
|
||||||
|
|
||||||
r.x = r.y = 0;
|
|
||||||
r.width = pPrevPixmap->drawable.width;
|
|
||||||
r.height = pPrevPixmap->drawable.height;
|
|
||||||
MultibufferPaintBackgroundRectangles(pWin,
|
|
||||||
(DrawablePtr)pPrevPixmap,
|
|
||||||
1, &r);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MultibufferUpdateActionUntouched:
|
|
||||||
|
|
||||||
/* copy the window to the pixmap that represents the
|
|
||||||
* currently displayed buffer
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (pPrevMBBuffer->eventMask & ExposureMask)
|
|
||||||
{
|
|
||||||
bool = TRUE;
|
|
||||||
DoChangeGC (pGC, GCGraphicsExposures, &bool, FALSE);
|
|
||||||
}
|
|
||||||
ValidateGC ((DrawablePtr)pPrevPixmap, pGC);
|
|
||||||
pExposed = (*pGC->ops->CopyArea)((DrawablePtr) pWin,
|
|
||||||
(DrawablePtr) pPrevPixmap,
|
|
||||||
pGC,
|
|
||||||
0, 0,
|
|
||||||
pWin->drawable.width,
|
|
||||||
pWin->drawable.height,
|
|
||||||
0, 0);
|
|
||||||
|
|
||||||
/* if we couldn't copy the whole window to the buffer,
|
|
||||||
* send expose events (if any client wants them)
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (pPrevMBBuffer->eventMask & ExposureMask)
|
|
||||||
{ /* some client wants expose events */
|
|
||||||
if (pExposed)
|
|
||||||
{
|
|
||||||
RegionPtr pWinSize;
|
|
||||||
extern RegionPtr CreateUnclippedWinSize();
|
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
pWinSize = CreateUnclippedWinSize (pWin);
|
|
||||||
/*
|
|
||||||
* pExposed is window-relative, but at this point
|
|
||||||
* pWinSize is screen-relative. Make pWinSize be
|
|
||||||
* window-relative so that region ops involving
|
|
||||||
* pExposed and pWinSize behave sensibly.
|
|
||||||
*/
|
|
||||||
REGION_TRANSLATE(pScreen, pWinSize,
|
|
||||||
-pWin->drawable.x,
|
|
||||||
-pWin->drawable.y);
|
|
||||||
REGION_INTERSECT(pScreen, pExposed, pExposed, pWinSize);
|
|
||||||
REGION_DESTROY(pScreen, pWinSize);
|
|
||||||
MultibufferExpose (pPrevMBBuffer, pExposed);
|
|
||||||
REGION_DESTROY(pScreen, pExposed);
|
|
||||||
}
|
|
||||||
bool = FALSE;
|
|
||||||
DoChangeGC (pGC, GCGraphicsExposures, &bool, FALSE);
|
|
||||||
} /* end some client wants expose events */
|
|
||||||
|
|
||||||
break; /* end case MultibufferUpdateActionUntouched */
|
|
||||||
|
|
||||||
case MultibufferUpdateActionCopied:
|
|
||||||
|
|
||||||
ValidateGC ((DrawablePtr)pPrevPixmap, pGC);
|
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr)pNewPixmap,
|
|
||||||
(DrawablePtr)pPrevPixmap, pGC,
|
|
||||||
0, 0, pWin->drawable.width,
|
|
||||||
pWin->drawable.height, 0, 0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
} /* end switch on update action */
|
|
||||||
|
|
||||||
/* display the new buffer */
|
|
||||||
|
|
||||||
ValidateGC ((DrawablePtr)pWin, pGC);
|
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr)pNewPixmap, (DrawablePtr)pWin,
|
|
||||||
pGC, 0, 0,
|
|
||||||
pWin->drawable.width, pWin->drawable.height,
|
|
||||||
0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
ppMBWindow[i]->lastUpdate = currentTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pGC) FreeScratchGC (pGC);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* resize the buffers when the window is resized
|
|
||||||
*/
|
|
||||||
|
|
||||||
static Bool
|
|
||||||
pixPositionWindow (pWin, x, y)
|
|
||||||
WindowPtr pWin;
|
|
||||||
int x, y;
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen;
|
|
||||||
mbufPixmapPrivPtr pMBPriv;
|
|
||||||
mbufWindowPtr pMBWindow;
|
|
||||||
mbufBufferPtr pMBBuffer;
|
|
||||||
int width, height;
|
|
||||||
int i;
|
|
||||||
int dx, dy, dw, dh;
|
|
||||||
int sourcex, sourcey;
|
|
||||||
int destx, desty;
|
|
||||||
PixmapPtr pPixmap;
|
|
||||||
GCPtr pGC;
|
|
||||||
int savewidth, saveheight;
|
|
||||||
Bool clear;
|
|
||||||
RegionRec exposedRegion;
|
|
||||||
Bool ret;
|
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
pMBPriv = MB_SCREEN_PRIV_PIXMAP(pScreen);
|
|
||||||
|
|
||||||
UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, Bool, PositionWindow);
|
|
||||||
ret = (* pScreen->PositionWindow) (pWin, x, y);
|
|
||||||
REWRAP_SCREEN_FUNC(pScreen, pMBPriv, Bool, PositionWindow);
|
|
||||||
|
|
||||||
if (!(pMBWindow = MB_WINDOW_PRIV(pWin)))
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
/* if new size is same as old, we're done */
|
|
||||||
|
|
||||||
if (pMBWindow->width == pWin->drawable.width &&
|
|
||||||
pMBWindow->height == pWin->drawable.height)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
width = pWin->drawable.width;
|
|
||||||
height = pWin->drawable.height;
|
|
||||||
dx = pWin->drawable.x - pMBWindow->x;
|
|
||||||
dy = pWin->drawable.x - pMBWindow->y;
|
|
||||||
dw = width - pMBWindow->width;
|
|
||||||
dh = height - pMBWindow->height;
|
|
||||||
GravityTranslate (0, 0, -dx, -dy, dw, dh,
|
|
||||||
pWin->bitGravity, &destx, &desty);
|
|
||||||
|
|
||||||
/* if the window grew, remember to paint the window background,
|
|
||||||
* and maybe send expose events, for the new areas of the buffers
|
|
||||||
*/
|
|
||||||
|
|
||||||
clear = pMBWindow->width < width || pMBWindow->height < height ||
|
|
||||||
pWin->bitGravity == ForgetGravity;
|
|
||||||
|
|
||||||
sourcex = 0;
|
|
||||||
sourcey = 0;
|
|
||||||
savewidth = pMBWindow->width;
|
|
||||||
saveheight = pMBWindow->height;
|
|
||||||
/* clip rectangle to source and destination */
|
|
||||||
if (destx < 0)
|
|
||||||
{
|
|
||||||
savewidth += destx;
|
|
||||||
sourcex -= destx;
|
|
||||||
destx = 0;
|
|
||||||
}
|
|
||||||
if (destx + savewidth > width)
|
|
||||||
savewidth = width - destx;
|
|
||||||
if (desty < 0)
|
|
||||||
{
|
|
||||||
saveheight += desty;
|
|
||||||
sourcey -= desty;
|
|
||||||
desty = 0;
|
|
||||||
}
|
|
||||||
if (desty + saveheight > height)
|
|
||||||
saveheight = height - desty;
|
|
||||||
|
|
||||||
pMBWindow->width = width;
|
|
||||||
pMBWindow->height = height;
|
|
||||||
pMBWindow->x = pWin->drawable.x;
|
|
||||||
pMBWindow->y = pWin->drawable.y;
|
|
||||||
|
|
||||||
if (clear)
|
|
||||||
{
|
|
||||||
BoxRec box;
|
|
||||||
|
|
||||||
box.x1 = box.y1 = 0;
|
|
||||||
box.x2 = width;
|
|
||||||
box.y2 = height;
|
|
||||||
REGION_INIT(pScreen, &exposedRegion, &box, 1);
|
|
||||||
if (pWin->bitGravity != ForgetGravity)
|
|
||||||
{
|
|
||||||
RegionRec preservedRegion;
|
|
||||||
box.x1 = destx;
|
|
||||||
box.y1 = desty;
|
|
||||||
box.x2 = destx + savewidth;
|
|
||||||
box.y2 = desty + saveheight;
|
|
||||||
REGION_INIT(pScreen, &preservedRegion, &box, 1);
|
|
||||||
REGION_SUBTRACT(pScreen, &exposedRegion, &exposedRegion, &preservedRegion);
|
|
||||||
REGION_UNINIT(pScreen, &preservedRegion);
|
|
||||||
}
|
|
||||||
|
|
||||||
} /* end if (clear) */
|
|
||||||
|
|
||||||
pGC = GetScratchGC (pWin->drawable.depth, pScreen);
|
|
||||||
|
|
||||||
/* create buffers with new window size */
|
|
||||||
|
|
||||||
for (i = 0; i < pMBWindow->numMultibuffer; i++)
|
|
||||||
{
|
|
||||||
pMBBuffer = &pMBWindow->buffers[i];
|
|
||||||
pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, pWin->drawable.depth,
|
|
||||||
CREATE_PIXMAP_USAGE_SCRATCH);
|
|
||||||
if (!pPixmap)
|
|
||||||
{
|
|
||||||
(* MB_SCREEN_PRIV(pScreen)->DestroyImageBuffers)(pWin);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (clear)
|
|
||||||
{
|
|
||||||
MultibufferPaintBackgroundRegion(pWin, (DrawablePtr)pPixmap, &exposedRegion);
|
|
||||||
MultibufferExpose(pMBBuffer, &exposedRegion);
|
|
||||||
}
|
|
||||||
if (pWin->bitGravity != ForgetGravity)
|
|
||||||
{
|
|
||||||
ValidateGC ((DrawablePtr)pPixmap, pGC);
|
|
||||||
(*pGC->ops->CopyArea) (pMBBuffer->pDrawable, (DrawablePtr)pPixmap,
|
|
||||||
pGC,
|
|
||||||
sourcex, sourcey, savewidth, saveheight,
|
|
||||||
destx, desty);
|
|
||||||
}
|
|
||||||
pPixmap->drawable.id = pMBBuffer->pDrawable->id;
|
|
||||||
(*pScreen->DestroyPixmap) ((PixmapPtr) pMBBuffer->pDrawable);
|
|
||||||
pMBBuffer->pDrawable = (DrawablePtr) pPixmap;
|
|
||||||
if (i != pMBWindow->displayedMultibuffer)
|
|
||||||
{
|
|
||||||
ChangeResourceValue (pPixmap->drawable.id,
|
|
||||||
MultibufferDrawableResType,
|
|
||||||
(pointer) pPixmap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FreeScratchGC (pGC);
|
|
||||||
if (clear)
|
|
||||||
REGION_UNINIT(pScreen, &exposedRegion);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
pixWrapScreenFuncs(pScreen)
|
|
||||||
ScreenPtr pScreen;
|
|
||||||
{
|
|
||||||
mbufPixmapPrivPtr pMBPriv = MB_SCREEN_PRIV_PIXMAP(pScreen);
|
|
||||||
WRAP_SCREEN_FUNC(pScreen, pMBPriv, PositionWindow, pixPositionWindow);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
pixResetProc(pScreen)
|
|
||||||
ScreenPtr pScreen;
|
|
||||||
{
|
|
||||||
mbufScreenPtr pMBScreen = MB_SCREEN_PRIV(pScreen);
|
|
||||||
mbufPixmapPrivPtr pMBPriv = MB_SCREEN_PRIV_PIXMAP(pScreen);
|
|
||||||
|
|
||||||
xfree(pMBScreen->pInfo);
|
|
||||||
xfree(pMBPriv);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
pixClearImageBufferArea(pMBBuffer, x,y, width,height, exposures)
|
|
||||||
mbufBufferPtr pMBBuffer;
|
|
||||||
short x, y;
|
|
||||||
unsigned short width, height;
|
|
||||||
Bool exposures;
|
|
||||||
{
|
|
||||||
WindowPtr pWin;
|
|
||||||
ScreenPtr pScreen;
|
|
||||||
BoxRec box;
|
|
||||||
RegionRec region;
|
|
||||||
int w_width, w_height;
|
|
||||||
DrawablePtr pDrawable;
|
|
||||||
|
|
||||||
pWin = pMBBuffer->pMBWindow->pWindow;
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
w_width = pWin->drawable.width;
|
|
||||||
w_height = pWin->drawable.height;
|
|
||||||
|
|
||||||
box.x1 = x;
|
|
||||||
box.y1 = y;
|
|
||||||
box.x2 = width ? (box.x1 + width) : w_width;
|
|
||||||
box.y2 = height ? (box.y1 + height) : w_height;
|
|
||||||
|
|
||||||
if (box.x1 < 0) box.x1 = 0;
|
|
||||||
if (box.y1 < 0) box.y1 = 0;
|
|
||||||
if (box.x2 > w_width) box.x2 = w_width;
|
|
||||||
if (box.y2 > w_height) box.y2 = w_height;
|
|
||||||
|
|
||||||
REGION_INIT(pScreen, ®ion, &box, 1);
|
|
||||||
|
|
||||||
if (pMBBuffer->number == pMBBuffer->pMBWindow->displayedMultibuffer)
|
|
||||||
pDrawable = (DrawablePtr) pWin;
|
|
||||||
else
|
|
||||||
pDrawable = pMBBuffer->pDrawable;
|
|
||||||
|
|
||||||
MultibufferPaintBackgroundRegion(pWin, pDrawable, ®ion);
|
|
||||||
|
|
||||||
if (exposures)
|
|
||||||
MultibufferExpose(pMBBuffer, ®ion);
|
|
||||||
|
|
||||||
REGION_UNINIT(pScreen, ®ion);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
pixDeleteBufferDrawable(pDrawable)
|
|
||||||
DrawablePtr pDrawable;
|
|
||||||
{
|
|
||||||
(* pDrawable->pScreen->DestroyPixmap)((PixmapPtr) pDrawable);
|
|
||||||
}
|
|
|
@ -2174,7 +2174,7 @@ static XSyncValue *pnext_time;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*** Server Block Handler
|
*** Server Block Handler
|
||||||
*** code inspired by multibuffer extension
|
*** code inspired by multibuffer extension (now deprecated)
|
||||||
*/
|
*/
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -357,7 +357,8 @@ ProcXTestFakeInput(ClientPtr client)
|
||||||
activateTime.milliseconds = ms;
|
activateTime.milliseconds = ms;
|
||||||
ev->u.keyButtonPointer.time = 0;
|
ev->u.keyButtonPointer.time = 0;
|
||||||
|
|
||||||
/* see mbuf.c:QueueDisplayRequest for code similar to this */
|
/* see mbuf.c:QueueDisplayRequest (from the deprecated Multibuffer
|
||||||
|
* extension) for code similar to this */
|
||||||
|
|
||||||
if (!ClientSleepUntil(client, &activateTime, NULL, NULL))
|
if (!ClientSleepUntil(client, &activateTime, NULL, NULL))
|
||||||
{
|
{
|
||||||
|
|
|
@ -138,9 +138,10 @@ ProcXSendExtensionEvent(ClientPtr client)
|
||||||
|
|
||||||
first = ((xEvent *) & stuff[1]);
|
first = ((xEvent *) & stuff[1]);
|
||||||
if (!((EXTENSION_EVENT_BASE <= first->u.u.type) &&
|
if (!((EXTENSION_EVENT_BASE <= first->u.u.type) &&
|
||||||
(first->u.u.type < lastEvent)))
|
(first->u.u.type < lastEvent))) {
|
||||||
client->errorValue = first->u.u.type;
|
client->errorValue = first->u.u.type;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
|
}
|
||||||
|
|
||||||
list = (XEventClass *) (first + stuff->num_events);
|
list = (XEventClass *) (first + stuff->num_events);
|
||||||
if ((ret = CreateMaskFromList(client, list, stuff->count, tmp, dev,
|
if ((ret = CreateMaskFromList(client, list, stuff->count, tmp, dev,
|
||||||
|
|
|
@ -247,6 +247,9 @@ ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info, Bool reportState)
|
||||||
int mask_len;
|
int mask_len;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (!dev || !dev->button)
|
||||||
|
return 0;
|
||||||
|
|
||||||
mask_len = bytes_to_int32(bits_to_bytes(dev->button->numButtons));
|
mask_len = bytes_to_int32(bits_to_bytes(dev->button->numButtons));
|
||||||
|
|
||||||
info->type = ButtonClass;
|
info->type = ButtonClass;
|
||||||
|
@ -259,7 +262,7 @@ ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info, Bool reportState)
|
||||||
memset(bits, 0, mask_len * 4);
|
memset(bits, 0, mask_len * 4);
|
||||||
|
|
||||||
if (reportState)
|
if (reportState)
|
||||||
for (i = 0; dev && dev->button && i < dev->button->numButtons; i++)
|
for (i = 0; i < dev->button->numButtons; i++)
|
||||||
if (BitIsOn(dev->button->down, i))
|
if (BitIsOn(dev->button->down, i))
|
||||||
SetBit(bits, i);
|
SetBit(bits, i);
|
||||||
|
|
||||||
|
|
|
@ -632,7 +632,6 @@ AC_ARG_ENABLE(xselinux, AS_HELP_STRING([--disable-xselinux], [Build SELinu
|
||||||
AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: disabled)]), [XCSECURITY=$enableval], [XCSECURITY=no])
|
AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: disabled)]), [XCSECURITY=$enableval], [XCSECURITY=no])
|
||||||
AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no])
|
AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no])
|
||||||
AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no])
|
AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no])
|
||||||
AC_ARG_ENABLE(multibuffer, AS_HELP_STRING([--enable-multibuffer], [Build Multibuffer extension (default: disabled)]), [MULTIBUFFER=$enableval], [MULTIBUFFER=no])
|
|
||||||
AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes])
|
AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes])
|
||||||
AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: disabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=no])
|
AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: disabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=no])
|
||||||
AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes])
|
AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes])
|
||||||
|
@ -1095,12 +1094,6 @@ if test "x$XCSECURITY" = xyes; then
|
||||||
AC_DEFINE(XCSECURITY, 1, [Build Security extension])
|
AC_DEFINE(XCSECURITY, 1, [Build Security extension])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL(MULTIBUFFER, [test "x$MULTIBUFFER" = xyes])
|
|
||||||
if test "x$MULTIBUFFER" = xyes; then
|
|
||||||
AC_DEFINE(MULTIBUFFER, 1, [Build Multibuffer extension])
|
|
||||||
# Requires xextproto which is always required
|
|
||||||
fi
|
|
||||||
|
|
||||||
AM_CONDITIONAL(DBE, [test "x$DBE" = xyes])
|
AM_CONDITIONAL(DBE, [test "x$DBE" = xyes])
|
||||||
if test "x$DBE" = xyes; then
|
if test "x$DBE" = xyes; then
|
||||||
AC_DEFINE(DBE, 1, [Support DBE extension])
|
AC_DEFINE(DBE, 1, [Support DBE extension])
|
||||||
|
|
14
exa/exa.c
14
exa/exa.c
|
@ -776,14 +776,12 @@ exaCloseScreen(int i, ScreenPtr pScreen)
|
||||||
unwrap(pExaScr, pScreen, ChangeWindowAttributes);
|
unwrap(pExaScr, pScreen, ChangeWindowAttributes);
|
||||||
unwrap(pExaScr, pScreen, BitmapToRegion);
|
unwrap(pExaScr, pScreen, BitmapToRegion);
|
||||||
unwrap(pExaScr, pScreen, CreateScreenResources);
|
unwrap(pExaScr, pScreen, CreateScreenResources);
|
||||||
if (ps) {
|
unwrap(pExaScr, ps, Composite);
|
||||||
unwrap(pExaScr, ps, Composite);
|
if (pExaScr->SavedGlyphs)
|
||||||
if (pExaScr->SavedGlyphs)
|
unwrap(pExaScr, ps, Glyphs);
|
||||||
unwrap(pExaScr, ps, Glyphs);
|
unwrap(pExaScr, ps, Trapezoids);
|
||||||
unwrap(pExaScr, ps, Trapezoids);
|
unwrap(pExaScr, ps, Triangles);
|
||||||
unwrap(pExaScr, ps, Triangles);
|
unwrap(pExaScr, ps, AddTraps);
|
||||||
unwrap(pExaScr, ps, AddTraps);
|
|
||||||
}
|
|
||||||
|
|
||||||
xfree (pExaScr);
|
xfree (pExaScr);
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ Bool
|
||||||
exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int depth,
|
exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int depth,
|
||||||
int bitsPerPixel, int devKind, pointer pPixData)
|
int bitsPerPixel, int devKind, pointer pPixData)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
ScreenPtr pScreen;
|
||||||
ExaScreenPrivPtr pExaScr;
|
ExaScreenPrivPtr pExaScr;
|
||||||
ExaPixmapPrivPtr pExaPixmap;
|
ExaPixmapPrivPtr pExaPixmap;
|
||||||
Bool ret;
|
Bool ret;
|
||||||
|
@ -156,6 +156,7 @@ exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int dept
|
||||||
if (!pPixmap)
|
if (!pPixmap)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
pScreen = pPixmap->drawable.pScreen;
|
||||||
pExaScr = ExaGetScreenPriv(pScreen);
|
pExaScr = ExaGetScreenPriv(pScreen);
|
||||||
pExaPixmap = ExaGetPixmapPriv(pPixmap);
|
pExaPixmap = ExaGetPixmapPriv(pPixmap);
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,7 @@ Bool
|
||||||
exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth,
|
exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth,
|
||||||
int bitsPerPixel, int devKind, pointer pPixData)
|
int bitsPerPixel, int devKind, pointer pPixData)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
ScreenPtr pScreen;
|
||||||
ExaScreenPrivPtr pExaScr;
|
ExaScreenPrivPtr pExaScr;
|
||||||
ExaPixmapPrivPtr pExaPixmap;
|
ExaPixmapPrivPtr pExaPixmap;
|
||||||
Bool ret;
|
Bool ret;
|
||||||
|
@ -134,6 +134,7 @@ exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth
|
||||||
if (!pPixmap)
|
if (!pPixmap)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
pScreen = pPixmap->drawable.pScreen;
|
||||||
pExaScr = ExaGetScreenPriv(pScreen);
|
pExaScr = ExaGetScreenPriv(pScreen);
|
||||||
pExaPixmap = ExaGetPixmapPriv(pPixmap);
|
pExaPixmap = ExaGetPixmapPriv(pPixmap);
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ Bool
|
||||||
exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
|
exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
|
||||||
int bitsPerPixel, int devKind, pointer pPixData)
|
int bitsPerPixel, int devKind, pointer pPixData)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
ScreenPtr pScreen;
|
||||||
ExaScreenPrivPtr pExaScr;
|
ExaScreenPrivPtr pExaScr;
|
||||||
ExaPixmapPrivPtr pExaPixmap;
|
ExaPixmapPrivPtr pExaPixmap;
|
||||||
Bool ret, has_gpu_copy;
|
Bool ret, has_gpu_copy;
|
||||||
|
@ -132,6 +132,7 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
|
||||||
if (!pPixmap)
|
if (!pPixmap)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
pScreen = pPixmap->drawable.pScreen;
|
||||||
pExaScr = ExaGetScreenPriv(pScreen);
|
pExaScr = ExaGetScreenPriv(pScreen);
|
||||||
pExaPixmap = ExaGetPixmapPriv(pPixmap);
|
pExaPixmap = ExaGetPixmapPriv(pPixmap);
|
||||||
|
|
||||||
|
|
|
@ -47,15 +47,6 @@ static ExtensionModule extensionModules[] = {
|
||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
#ifdef MULTIBUFFER
|
|
||||||
{
|
|
||||||
MultibufferExtensionInit,
|
|
||||||
MULTIBUFFER_PROTOCOL_NAME,
|
|
||||||
&noMultibufferExtension,
|
|
||||||
NULL,
|
|
||||||
NULL
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
#ifdef SCREENSAVER
|
#ifdef SCREENSAVER
|
||||||
{
|
{
|
||||||
ScreenSaverExtensionInit,
|
ScreenSaverExtensionInit,
|
||||||
|
|
|
@ -9,11 +9,6 @@
|
||||||
|
|
||||||
#include <X11/extensions/shapeproto.h>
|
#include <X11/extensions/shapeproto.h>
|
||||||
|
|
||||||
#ifdef MULTIBUFFER
|
|
||||||
extern void MultibufferExtensionInit(INITARGS);
|
|
||||||
#include <X11/extensions/multibufproto.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef XTEST
|
#ifdef XTEST
|
||||||
extern void XTestExtensionInit(INITARGS);
|
extern void XTestExtensionInit(INITARGS);
|
||||||
#include <X11/extensions/xtestproto.h>
|
#include <X11/extensions/xtestproto.h>
|
||||||
|
|
|
@ -340,14 +340,9 @@ xf86SetSerial (int fd, pointer options)
|
||||||
|
|
||||||
if ((xf86SetBoolOption (options, "ClearRTS", FALSE)))
|
if ((xf86SetBoolOption (options, "ClearRTS", FALSE)))
|
||||||
{
|
{
|
||||||
#ifdef CLEARRTS_SUPPORT
|
|
||||||
val = TIOCM_RTS;
|
|
||||||
SYSCALL (ioctl(fd, TIOCMBIC, &val));
|
|
||||||
#else
|
|
||||||
xf86Msg (X_WARNING,
|
xf86Msg (X_WARNING,
|
||||||
"Option ClearRTS not supported on this OS\n");
|
"Option ClearRTS not supported on this OS\n");
|
||||||
return (-1);
|
return (-1);
|
||||||
#endif
|
|
||||||
xf86MarkOptionUsedByName (options, "ClearRTS");
|
xf86MarkOptionUsedByName (options, "ClearRTS");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -219,15 +219,15 @@ xf86readConfigFile (void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Error (INVALID_SECTION_MSG, xf86tokenString ());
|
|
||||||
free(val.str);
|
free(val.str);
|
||||||
val.str = NULL;
|
val.str = NULL;
|
||||||
|
Error (INVALID_SECTION_MSG, xf86tokenString ());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Error (INVALID_KEYWORD_MSG, xf86tokenString ());
|
|
||||||
free(val.str);
|
free(val.str);
|
||||||
val.str = NULL;
|
val.str = NULL;
|
||||||
|
Error (INVALID_KEYWORD_MSG, xf86tokenString ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -845,10 +845,13 @@ static int
|
||||||
ConfigFilter(const struct dirent *de)
|
ConfigFilter(const struct dirent *de)
|
||||||
{
|
{
|
||||||
const char *name = de->d_name;
|
const char *name = de->d_name;
|
||||||
size_t len = strlen(name);
|
size_t len;
|
||||||
size_t suflen = strlen(XCONFIGSUFFIX);
|
size_t suflen = strlen(XCONFIGSUFFIX);
|
||||||
|
|
||||||
if (!name || name[0] == '.' || len <= suflen)
|
if (!name || name[0] == '.')
|
||||||
|
return 0;
|
||||||
|
len = strlen(name);
|
||||||
|
if(len <= suflen)
|
||||||
return 0;
|
return 0;
|
||||||
if (strcmp(&name[len-suflen], XCONFIGSUFFIX) != 0)
|
if (strcmp(&name[len-suflen], XCONFIGSUFFIX) != 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -360,9 +360,6 @@
|
||||||
/* Support Xv extension */
|
/* Support Xv extension */
|
||||||
#undef XV
|
#undef XV
|
||||||
|
|
||||||
/* Build Multibuffer extension */
|
|
||||||
#undef MULTIBUFFER
|
|
||||||
|
|
||||||
/* Support DRI extension */
|
/* Support DRI extension */
|
||||||
#undef XF86DRI
|
#undef XF86DRI
|
||||||
|
|
||||||
|
@ -411,9 +408,6 @@
|
||||||
/* Support HAL for hotplug */
|
/* Support HAL for hotplug */
|
||||||
#undef CONFIG_HAL
|
#undef CONFIG_HAL
|
||||||
|
|
||||||
/* Use only built-in fonts */
|
|
||||||
#undef BUILTIN_FONTS
|
|
||||||
|
|
||||||
/* Have a monotonic clock from clock_gettime() */
|
/* Have a monotonic clock from clock_gettime() */
|
||||||
#undef MONOTONIC_CLOCK
|
#undef MONOTONIC_CLOCK
|
||||||
|
|
||||||
|
|
|
@ -69,10 +69,6 @@ extern _X_EXPORT Bool noScreenSaverExtension;
|
||||||
extern _X_EXPORT Bool noMITShmExtension;
|
extern _X_EXPORT Bool noMITShmExtension;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MULTIBUFFER
|
|
||||||
extern _X_EXPORT Bool noMultibufferExtension;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef RANDR
|
#ifdef RANDR
|
||||||
extern _X_EXPORT Bool noRRExtension;
|
extern _X_EXPORT Bool noRRExtension;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -55,7 +55,6 @@ SOFTWARE.
|
||||||
|
|
||||||
#ifdef HAVE_DMX_CONFIG_H
|
#ifdef HAVE_DMX_CONFIG_H
|
||||||
#include <dmx-config.h>
|
#include <dmx-config.h>
|
||||||
#undef MULTIBUFFER
|
|
||||||
#undef XV
|
#undef XV
|
||||||
#undef DBE
|
#undef DBE
|
||||||
#undef XF86VIDMODE
|
#undef XF86VIDMODE
|
||||||
|
@ -116,9 +115,6 @@ extern Bool noScreenSaverExtension;
|
||||||
#ifdef MITSHM
|
#ifdef MITSHM
|
||||||
extern Bool noMITShmExtension;
|
extern Bool noMITShmExtension;
|
||||||
#endif
|
#endif
|
||||||
#ifdef MULTIBUFFER
|
|
||||||
extern Bool noMultibufferExtension;
|
|
||||||
#endif
|
|
||||||
#ifdef RANDR
|
#ifdef RANDR
|
||||||
extern Bool noRRExtension;
|
extern Bool noRRExtension;
|
||||||
#endif
|
#endif
|
||||||
|
@ -193,9 +189,6 @@ typedef void (*InitExtension)(INITARGS);
|
||||||
#ifdef MITSHM
|
#ifdef MITSHM
|
||||||
extern void ShmExtensionInit(INITARGS);
|
extern void ShmExtensionInit(INITARGS);
|
||||||
#endif
|
#endif
|
||||||
#ifdef MULTIBUFFER
|
|
||||||
extern void MultibufferExtensionInit(INITARGS);
|
|
||||||
#endif
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
extern void PanoramiXExtensionInit(INITARGS);
|
extern void PanoramiXExtensionInit(INITARGS);
|
||||||
#endif
|
#endif
|
||||||
|
@ -304,9 +297,6 @@ static ExtensionToggle ExtensionToggleList[] =
|
||||||
#ifdef MITSHM
|
#ifdef MITSHM
|
||||||
{ SHMNAME, &noMITShmExtension },
|
{ SHMNAME, &noMITShmExtension },
|
||||||
#endif
|
#endif
|
||||||
#ifdef MULTIBUFFER
|
|
||||||
{ "Multi-Buffering", &noMultibufferExtension },
|
|
||||||
#endif
|
|
||||||
#ifdef RANDR
|
#ifdef RANDR
|
||||||
{ "RANDR", &noRRExtension },
|
{ "RANDR", &noRRExtension },
|
||||||
#endif
|
#endif
|
||||||
|
@ -409,9 +399,6 @@ InitExtensions(int argc, char *argv[])
|
||||||
ShapeExtensionInit();
|
ShapeExtensionInit();
|
||||||
#ifdef MITSHM
|
#ifdef MITSHM
|
||||||
if (!noMITShmExtension) ShmExtensionInit();
|
if (!noMITShmExtension) ShmExtensionInit();
|
||||||
#endif
|
|
||||||
#ifdef MULTIBUFFER
|
|
||||||
if (!noMultibufferExtension) MultibufferExtensionInit();
|
|
||||||
#endif
|
#endif
|
||||||
XInputExtensionInit();
|
XInputExtensionInit();
|
||||||
#ifdef XTEST
|
#ifdef XTEST
|
||||||
|
|
|
@ -497,14 +497,14 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y)
|
||||||
|
|
||||||
miPointerPtr pPointer;
|
miPointerPtr pPointer;
|
||||||
|
|
||||||
|
if (!pDev || !pDev->coreEvents)
|
||||||
|
return;
|
||||||
|
|
||||||
pPointer = MIPOINTER(pDev);
|
pPointer = MIPOINTER(pDev);
|
||||||
pScreen = pPointer->pScreen;
|
pScreen = pPointer->pScreen;
|
||||||
if (!pScreen)
|
if (!pScreen)
|
||||||
return; /* called before ready */
|
return; /* called before ready */
|
||||||
|
|
||||||
if (!pDev || !pDev->coreEvents)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (*x < 0 || *x >= pScreen->width || *y < 0 || *y >= pScreen->height)
|
if (*x < 0 || *x >= pScreen->width || *y < 0 || *y >= pScreen->height)
|
||||||
{
|
{
|
||||||
pScreenPriv = GetScreenPrivate (pScreen);
|
pScreenPriv = GetScreenPrivate (pScreen);
|
||||||
|
|
|
@ -146,9 +146,6 @@ Bool noScreenSaverExtension = FALSE;
|
||||||
#ifdef MITSHM
|
#ifdef MITSHM
|
||||||
Bool noMITShmExtension = FALSE;
|
Bool noMITShmExtension = FALSE;
|
||||||
#endif
|
#endif
|
||||||
#ifdef MULTIBUFFER
|
|
||||||
Bool noMultibufferExtension = FALSE;
|
|
||||||
#endif
|
|
||||||
#ifdef RANDR
|
#ifdef RANDR
|
||||||
Bool noRRExtension = FALSE;
|
Bool noRRExtension = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1041,8 +1041,7 @@ XkbInterestPtr interest;
|
||||||
return ((interest->resource==id)?interest:NULL);
|
return ((interest->resource==id)?interest:NULL);
|
||||||
interest = interest->next;
|
interest = interest->next;
|
||||||
}
|
}
|
||||||
interest = xalloc(sizeof(XkbInterestRec));
|
interest = xcalloc(1, sizeof(XkbInterestRec));
|
||||||
bzero(interest,sizeof(XkbInterestRec));
|
|
||||||
if (interest) {
|
if (interest) {
|
||||||
interest->dev = dev;
|
interest->dev = dev;
|
||||||
interest->client = client;
|
interest->client = client;
|
||||||
|
|
|
@ -353,9 +353,13 @@ XkbClientMapPtr map;
|
||||||
XkbServerMapPtr srv;
|
XkbServerMapPtr srv;
|
||||||
Bool showActions;
|
Bool showActions;
|
||||||
|
|
||||||
|
if (!xkb) {
|
||||||
|
_XkbLibError(_XkbErrMissingSymbols,"XkbWriteXKBSymbols",0);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
map= xkb->map;
|
map= xkb->map;
|
||||||
srv= xkb->server;
|
if ((!map)||(!map->syms)||(!map->key_sym_map)) {
|
||||||
if ((!xkb)||(!map)||(!map->syms)||(!map->key_sym_map)) {
|
|
||||||
_XkbLibError(_XkbErrMissingSymbols,"XkbWriteXKBSymbols",0);
|
_XkbLibError(_XkbErrMissingSymbols,"XkbWriteXKBSymbols",0);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -376,6 +380,7 @@ Bool showActions;
|
||||||
}
|
}
|
||||||
if (tmp>0)
|
if (tmp>0)
|
||||||
fprintf(file,"\n");
|
fprintf(file,"\n");
|
||||||
|
srv= xkb->server;
|
||||||
for (i=xkb->min_key_code;i<=xkb->max_key_code;i++) {
|
for (i=xkb->min_key_code;i<=xkb->max_key_code;i++) {
|
||||||
Bool simple;
|
Bool simple;
|
||||||
if ((int)XkbKeyNumSyms(xkb,i)<1)
|
if ((int)XkbKeyNumSyms(xkb,i)<1)
|
||||||
|
|
Loading…
Reference in New Issue