2004-07-31 10:24:14 +02:00
|
|
|
/*
|
2010-12-04 01:32:01 +01:00
|
|
|
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
|
2006-03-13 22:59:55 +01:00
|
|
|
*
|
2009-05-15 20:22:32 +02:00
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
2009-12-16 00:54:22 +01:00
|
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
|
|
* to deal in the Software without restriction, including without limitation
|
|
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
* Software is furnished to do so, subject to the following conditions:
|
2009-05-15 20:22:32 +02:00
|
|
|
*
|
2009-12-16 00:54:22 +01:00
|
|
|
* The above copyright notice and this permission notice (including the next
|
|
|
|
* paragraph) shall be included in all copies or substantial portions of the
|
|
|
|
* Software.
|
2006-03-13 22:59:55 +01:00
|
|
|
*
|
2009-12-16 00:54:22 +01:00
|
|
|
* 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 AUTHORS OR COPYRIGHT HOLDERS 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.
|
2006-03-13 22:59:55 +01:00
|
|
|
*
|
2004-07-31 10:24:14 +02:00
|
|
|
* Copyright © 2003 Keith Packard
|
|
|
|
*
|
|
|
|
* 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, and that the name of Keith Packard not be used in
|
|
|
|
* advertising or publicity pertaining to distribution of the software without
|
|
|
|
* specific, written prior permission. Keith Packard makes no
|
|
|
|
* representations about the suitability of this software for any purpose. It
|
|
|
|
* is provided "as is" without express or implied warranty.
|
|
|
|
*
|
|
|
|
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
|
|
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
|
|
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
|
|
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
|
|
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
|
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
* PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
2005-07-03 09:02:09 +02:00
|
|
|
#ifdef HAVE_DIX_CONFIG_H
|
|
|
|
#include <dix-config.h>
|
|
|
|
#endif
|
|
|
|
|
2004-07-31 10:24:14 +02:00
|
|
|
#ifndef _COMPINT_H_
|
|
|
|
#define _COMPINT_H_
|
|
|
|
|
2005-07-03 10:53:54 +02:00
|
|
|
#include "misc.h"
|
2004-07-31 10:24:14 +02:00
|
|
|
#include "scrnintstr.h"
|
2005-07-03 10:53:54 +02:00
|
|
|
#include "os.h"
|
2004-07-31 10:24:14 +02:00
|
|
|
#include "regionstr.h"
|
|
|
|
#include "validate.h"
|
|
|
|
#include "windowstr.h"
|
|
|
|
#include "input.h"
|
|
|
|
#include "resource.h"
|
|
|
|
#include "colormapst.h"
|
|
|
|
#include "cursorstr.h"
|
|
|
|
#include "dixstruct.h"
|
|
|
|
#include "gcstruct.h"
|
|
|
|
#include "servermd.h"
|
|
|
|
#include "dixevents.h"
|
|
|
|
#include "globals.h"
|
|
|
|
#include "picturestr.h"
|
|
|
|
#include "extnsionst.h"
|
2007-08-28 15:28:25 +02:00
|
|
|
#include "privates.h"
|
2004-07-31 10:24:14 +02:00
|
|
|
#include "mi.h"
|
|
|
|
#include "damage.h"
|
|
|
|
#include "damageextint.h"
|
|
|
|
#include "xfixes.h"
|
|
|
|
#include <X11/extensions/compositeproto.h>
|
2012-04-19 22:25:41 +02:00
|
|
|
#include "compositeext.h"
|
2004-07-31 10:24:14 +02:00
|
|
|
#include <assert.h>
|
|
|
|
|
2004-08-15 21:05:01 +02:00
|
|
|
/*
|
|
|
|
* enable this for debugging
|
|
|
|
|
|
|
|
#define COMPOSITE_DEBUG
|
|
|
|
*/
|
|
|
|
|
2004-07-31 10:24:14 +02:00
|
|
|
typedef struct _CompClientWindow {
|
2012-03-21 20:55:09 +01:00
|
|
|
struct _CompClientWindow *next;
|
|
|
|
XID id;
|
|
|
|
int update;
|
|
|
|
} CompClientWindowRec, *CompClientWindowPtr;
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
typedef struct _CompWindow {
|
2012-03-21 20:55:09 +01:00
|
|
|
RegionRec borderClip;
|
|
|
|
DamagePtr damage; /* for automatic update mode */
|
|
|
|
Bool damageRegistered;
|
|
|
|
Bool damaged;
|
|
|
|
int update;
|
|
|
|
CompClientWindowPtr clients;
|
|
|
|
int oldx;
|
|
|
|
int oldy;
|
|
|
|
PixmapPtr pOldPixmap;
|
|
|
|
int borderClipX, borderClipY;
|
2004-07-31 10:24:14 +02:00
|
|
|
} CompWindowRec, *CompWindowPtr;
|
|
|
|
|
|
|
|
#define COMP_ORIGIN_INVALID 0x80000000
|
|
|
|
|
|
|
|
typedef struct _CompSubwindows {
|
2012-03-21 20:55:09 +01:00
|
|
|
int update;
|
|
|
|
CompClientWindowPtr clients;
|
2004-07-31 10:24:14 +02:00
|
|
|
} CompSubwindowsRec, *CompSubwindowsPtr;
|
|
|
|
|
2004-08-13 10:16:14 +02:00
|
|
|
#ifndef COMP_INCLUDE_RGB24_VISUAL
|
|
|
|
#define COMP_INCLUDE_RGB24_VISUAL 0
|
|
|
|
#endif
|
|
|
|
|
2006-03-13 22:59:55 +01:00
|
|
|
typedef struct _CompOverlayClientRec *CompOverlayClientPtr;
|
|
|
|
|
|
|
|
typedef struct _CompOverlayClientRec {
|
2012-03-21 20:55:09 +01:00
|
|
|
CompOverlayClientPtr pNext;
|
|
|
|
ClientPtr pClient;
|
|
|
|
ScreenPtr pScreen;
|
|
|
|
XID resource;
|
2006-03-13 22:59:55 +01:00
|
|
|
} CompOverlayClientRec;
|
|
|
|
|
2004-07-31 10:24:14 +02:00
|
|
|
typedef struct _CompScreen {
|
2012-03-21 20:55:09 +01:00
|
|
|
PositionWindowProcPtr PositionWindow;
|
|
|
|
CopyWindowProcPtr CopyWindow;
|
|
|
|
CreateWindowProcPtr CreateWindow;
|
|
|
|
DestroyWindowProcPtr DestroyWindow;
|
|
|
|
RealizeWindowProcPtr RealizeWindow;
|
|
|
|
UnrealizeWindowProcPtr UnrealizeWindow;
|
|
|
|
ClipNotifyProcPtr ClipNotify;
|
2004-07-31 10:24:14 +02:00
|
|
|
/*
|
2010-06-21 08:33:55 +02:00
|
|
|
* Called from ConfigureWindow, these
|
|
|
|
* three track changes to the offscreen storage
|
|
|
|
* geometry
|
2004-07-31 10:24:14 +02:00
|
|
|
*/
|
2012-03-21 20:55:09 +01:00
|
|
|
ConfigNotifyProcPtr ConfigNotify;
|
|
|
|
MoveWindowProcPtr MoveWindow;
|
|
|
|
ResizeWindowProcPtr ResizeWindow;
|
|
|
|
ChangeBorderWidthProcPtr ChangeBorderWidth;
|
2004-07-31 10:24:14 +02:00
|
|
|
/*
|
|
|
|
* Reparenting has an effect on Subwindows redirect
|
|
|
|
*/
|
2012-03-21 20:55:09 +01:00
|
|
|
ReparentWindowProcPtr ReparentWindow;
|
|
|
|
|
2004-08-13 10:16:14 +02:00
|
|
|
/*
|
|
|
|
* Colormaps for new visuals better not get installed
|
|
|
|
*/
|
2012-03-21 20:55:09 +01:00
|
|
|
InstallColormapProcPtr InstallColormap;
|
2004-08-13 10:16:14 +02:00
|
|
|
|
2007-08-25 21:08:20 +02:00
|
|
|
/*
|
|
|
|
* Fake backing store via automatic redirection
|
|
|
|
*/
|
|
|
|
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
|
|
|
|
|
2012-03-21 20:55:09 +01:00
|
|
|
ScreenBlockHandlerProcPtr BlockHandler;
|
|
|
|
CloseScreenProcPtr CloseScreen;
|
|
|
|
int numAlternateVisuals;
|
|
|
|
VisualID *alternateVisuals;
|
|
|
|
|
|
|
|
WindowPtr pOverlayWin;
|
|
|
|
Window overlayWid;
|
|
|
|
CompOverlayClientPtr pOverlayClients;
|
|
|
|
|
|
|
|
GetImageProcPtr GetImage;
|
|
|
|
SourceValidateProcPtr SourceValidate;
|
2004-07-31 10:24:14 +02:00
|
|
|
} CompScreenRec, *CompScreenPtr;
|
|
|
|
|
2010-04-27 02:22:21 +02:00
|
|
|
extern DevPrivateKeyRec CompScreenPrivateKeyRec;
|
2012-03-21 20:55:09 +01:00
|
|
|
|
2010-04-27 02:22:21 +02:00
|
|
|
#define CompScreenPrivateKey (&CompScreenPrivateKeyRec)
|
|
|
|
|
|
|
|
extern DevPrivateKeyRec CompWindowPrivateKeyRec;
|
2012-03-21 20:55:09 +01:00
|
|
|
|
2010-04-27 02:22:21 +02:00
|
|
|
#define CompWindowPrivateKey (&CompWindowPrivateKeyRec)
|
|
|
|
|
|
|
|
extern DevPrivateKeyRec CompSubwindowsPrivateKeyRec;
|
2012-03-21 20:55:09 +01:00
|
|
|
|
2010-04-27 02:22:21 +02:00
|
|
|
#define CompSubwindowsPrivateKey (&CompSubwindowsPrivateKeyRec)
|
2004-07-31 10:24:14 +02:00
|
|
|
|
2007-08-28 15:28:25 +02:00
|
|
|
#define GetCompScreen(s) ((CompScreenPtr) \
|
|
|
|
dixLookupPrivate(&(s)->devPrivates, CompScreenPrivateKey))
|
|
|
|
#define GetCompWindow(w) ((CompWindowPtr) \
|
|
|
|
dixLookupPrivate(&(w)->devPrivates, CompWindowPrivateKey))
|
|
|
|
#define GetCompSubwindows(w) ((CompSubwindowsPtr) \
|
|
|
|
dixLookupPrivate(&(w)->devPrivates, CompSubwindowsPrivateKey))
|
2004-07-31 10:24:14 +02:00
|
|
|
|
2012-03-21 20:55:09 +01:00
|
|
|
extern RESTYPE CompositeClientSubwindowsType;
|
|
|
|
extern RESTYPE CompositeClientOverlayType;
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* compalloc.c
|
|
|
|
*/
|
|
|
|
|
|
|
|
Bool
|
2012-03-21 20:55:09 +01:00
|
|
|
compRedirectWindow(ClientPtr pClient, WindowPtr pWin, int update);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
void
|
2012-03-21 20:55:09 +01:00
|
|
|
compFreeClientWindow(WindowPtr pWin, XID id);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
int
|
2012-03-21 20:55:09 +01:00
|
|
|
compUnredirectWindow(ClientPtr pClient, WindowPtr pWin, int update);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
int
|
2012-03-21 20:55:09 +01:00
|
|
|
compRedirectSubwindows(ClientPtr pClient, WindowPtr pWin, int update);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
void
|
2012-03-21 20:55:09 +01:00
|
|
|
compFreeClientSubwindows(WindowPtr pWin, XID id);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
int
|
2012-03-21 20:55:09 +01:00
|
|
|
compUnredirectSubwindows(ClientPtr pClient, WindowPtr pWin, int update);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
int
|
2012-03-21 20:55:09 +01:00
|
|
|
compRedirectOneSubwindow(WindowPtr pParent, WindowPtr pWin);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
int
|
2012-03-21 20:55:09 +01:00
|
|
|
compUnredirectOneSubwindow(WindowPtr pParent, WindowPtr pWin);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
Bool
|
2012-03-21 20:55:09 +01:00
|
|
|
compAllocPixmap(WindowPtr pWin);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
void
|
2012-03-21 20:55:09 +01:00
|
|
|
compSetParentPixmap(WindowPtr pWin);
|
2010-12-20 15:37:24 +01:00
|
|
|
|
|
|
|
void
|
2012-03-21 20:55:09 +01:00
|
|
|
compRestoreWindow(WindowPtr pWin, PixmapPtr pPixmap);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
Bool
|
2012-03-21 20:55:09 +01:00
|
|
|
|
|
|
|
compReallocPixmap(WindowPtr pWin, int x, int y,
|
|
|
|
unsigned int w, unsigned int h, int bw);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* compext.c
|
|
|
|
*/
|
|
|
|
|
|
|
|
void
|
2012-03-21 20:55:09 +01:00
|
|
|
CompositeExtensionInit(void);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* compinit.c
|
|
|
|
*/
|
|
|
|
|
|
|
|
Bool
|
2012-03-21 20:55:09 +01:00
|
|
|
compScreenInit(ScreenPtr pScreen);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
2008-05-05 06:52:58 +02:00
|
|
|
/*
|
|
|
|
* compoverlay.c
|
|
|
|
*/
|
|
|
|
|
|
|
|
void
|
2012-03-21 20:55:09 +01:00
|
|
|
compFreeOverlayClient(CompOverlayClientPtr pOcToDel);
|
2008-05-05 06:52:58 +02:00
|
|
|
|
|
|
|
CompOverlayClientPtr
|
2012-03-21 20:55:09 +01:00
|
|
|
compFindOverlayClient(ScreenPtr pScreen, ClientPtr pClient);
|
|
|
|
|
2008-05-05 06:52:58 +02:00
|
|
|
CompOverlayClientPtr
|
2012-03-21 20:55:09 +01:00
|
|
|
compCreateOverlayClient(ScreenPtr pScreen, ClientPtr pClient);
|
2008-05-05 06:52:58 +02:00
|
|
|
|
|
|
|
Bool
|
2012-03-21 20:55:09 +01:00
|
|
|
compCreateOverlayWindow(ScreenPtr pScreen);
|
2008-05-05 06:52:58 +02:00
|
|
|
|
|
|
|
void
|
2012-03-21 20:55:09 +01:00
|
|
|
compDestroyOverlayWindow(ScreenPtr pScreen);
|
2008-05-05 06:52:58 +02:00
|
|
|
|
2004-07-31 10:24:14 +02:00
|
|
|
/*
|
|
|
|
* compwindow.c
|
|
|
|
*/
|
|
|
|
|
2004-08-15 21:05:01 +02:00
|
|
|
#ifdef COMPOSITE_DEBUG
|
2004-07-31 10:24:14 +02:00
|
|
|
void
|
2012-03-21 20:55:09 +01:00
|
|
|
compCheckTree(ScreenPtr pScreen);
|
2004-08-15 21:05:01 +02:00
|
|
|
#else
|
|
|
|
#define compCheckTree(s)
|
2004-07-31 10:24:14 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
void
|
2012-03-21 20:55:09 +01:00
|
|
|
compSetPixmap(WindowPtr pWin, PixmapPtr pPixmap);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
Bool
|
2012-03-21 20:55:09 +01:00
|
|
|
compCheckRedirect(WindowPtr pWin);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
Bool
|
2012-03-21 20:55:09 +01:00
|
|
|
compPositionWindow(WindowPtr pWin, int x, int y);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
Bool
|
2012-03-21 20:55:09 +01:00
|
|
|
compRealizeWindow(WindowPtr pWin);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
Bool
|
2012-03-21 20:55:09 +01:00
|
|
|
compUnrealizeWindow(WindowPtr pWin);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
void
|
2012-03-21 20:55:09 +01:00
|
|
|
compClipNotify(WindowPtr pWin, int dx, int dy);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
2010-06-21 08:33:55 +02:00
|
|
|
void
|
2012-03-21 20:55:09 +01:00
|
|
|
compMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind);
|
2010-06-21 08:33:55 +02:00
|
|
|
|
|
|
|
void
|
2012-03-21 20:55:09 +01:00
|
|
|
|
|
|
|
compResizeWindow(WindowPtr pWin, int x, int y,
|
|
|
|
unsigned int w, unsigned int h, WindowPtr pSib);
|
2010-06-21 08:33:55 +02:00
|
|
|
|
|
|
|
void
|
2012-03-21 20:55:09 +01:00
|
|
|
compChangeBorderWidth(WindowPtr pWin, unsigned int border_width);
|
2010-06-21 08:33:55 +02:00
|
|
|
|
2004-07-31 10:24:14 +02:00
|
|
|
void
|
2012-03-21 20:55:09 +01:00
|
|
|
compReparentWindow(WindowPtr pWin, WindowPtr pPriorParent);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
Bool
|
2012-03-21 20:55:09 +01:00
|
|
|
compCreateWindow(WindowPtr pWin);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
Bool
|
2012-03-21 20:55:09 +01:00
|
|
|
compDestroyWindow(WindowPtr pWin);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
void
|
2012-03-21 20:55:09 +01:00
|
|
|
compSetRedirectBorderClip(WindowPtr pWin, RegionPtr pRegion);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
RegionPtr
|
2012-03-21 20:55:09 +01:00
|
|
|
compGetRedirectBorderClip(WindowPtr pWin);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
void
|
2012-03-21 20:55:09 +01:00
|
|
|
compCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
2004-07-31 10:24:14 +02:00
|
|
|
|
|
|
|
void
|
2012-03-21 20:55:09 +01:00
|
|
|
compPaintChildrenToWindow(WindowPtr pWin);
|
2011-01-05 19:41:07 +01:00
|
|
|
|
2006-03-13 22:59:55 +01:00
|
|
|
WindowPtr
|
2012-03-21 20:55:09 +01:00
|
|
|
CompositeRealChildHead(WindowPtr pWin);
|
2006-03-13 22:59:55 +01:00
|
|
|
|
|
|
|
int
|
2012-03-21 20:55:09 +01:00
|
|
|
DeleteWindowNoInputDevices(pointer value, XID wid);
|
2006-03-13 22:59:55 +01:00
|
|
|
|
composite: use config notify hook to do pixmap resize.
Since reallocating the backing pixmap can fail, we need to try and do
it before any other side effects of reconfiguring the window happen.
This changes the ConfigNotify hook to return status, and moves the
composite window reconfiguration wrappers to ConfigNotify. They all
basically did the same thing, so we can drop the MoveWindow,
ResizeWindow, ChangeBorderWidth wrappers, and allow ConfigNotify to do
all the work. If reallocation fails we fail before we send any
confiureNotify events, or enter the area we can't recover from.
The only place we now enforce 32k limits are in EXA/UXA/fb, so drivers
that don't use this should probably deal with it in their pixmap
allocate if they don't already.
This also breaks ABI, so we need an alternate fix for older servers,
working on the X server makes me realise why I'm a kernel hacker.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-04 03:09:46 +02:00
|
|
|
int
|
2012-03-21 20:55:09 +01:00
|
|
|
|
composite: use config notify hook to do pixmap resize.
Since reallocating the backing pixmap can fail, we need to try and do
it before any other side effects of reconfiguring the window happen.
This changes the ConfigNotify hook to return status, and moves the
composite window reconfiguration wrappers to ConfigNotify. They all
basically did the same thing, so we can drop the MoveWindow,
ResizeWindow, ChangeBorderWidth wrappers, and allow ConfigNotify to do
all the work. If reallocation fails we fail before we send any
confiureNotify events, or enter the area we can't recover from.
The only place we now enforce 32k limits are in EXA/UXA/fb, so drivers
that don't use this should probably deal with it in their pixmap
allocate if they don't already.
This also breaks ABI, so we need an alternate fix for older servers,
working on the X server makes me realise why I'm a kernel hacker.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-04 03:09:46 +02:00
|
|
|
compConfigNotify(WindowPtr pWin, int x, int y, int w, int h,
|
2012-03-21 20:55:09 +01:00
|
|
|
int bw, WindowPtr pSib);
|
composite: use config notify hook to do pixmap resize.
Since reallocating the backing pixmap can fail, we need to try and do
it before any other side effects of reconfiguring the window happen.
This changes the ConfigNotify hook to return status, and moves the
composite window reconfiguration wrappers to ConfigNotify. They all
basically did the same thing, so we can drop the MoveWindow,
ResizeWindow, ChangeBorderWidth wrappers, and allow ConfigNotify to do
all the work. If reallocation fails we fail before we send any
confiureNotify events, or enter the area we can't recover from.
The only place we now enforce 32k limits are in EXA/UXA/fb, so drivers
that don't use this should probably deal with it in their pixmap
allocate if they don't already.
This also breaks ABI, so we need an alternate fix for older servers,
working on the X server makes me realise why I'm a kernel hacker.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-04 03:09:46 +02:00
|
|
|
|
2012-03-21 20:55:09 +01:00
|
|
|
void PanoramiXCompositeInit(void);
|
|
|
|
void PanoramiXCompositeReset(void);
|
2010-01-06 20:55:48 +01:00
|
|
|
|
2012-03-21 20:55:09 +01:00
|
|
|
#endif /* _COMPINT_H_ */
|