From 959a1eaf1c15a691141f1b0dc53757fe9b6e9b13 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 4 Jun 2010 11:09:46 +1000 Subject: 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 Reviewed-by: Keith Packard Signed-off-by: Keith Packard --- dix/window.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'dix') diff --git a/dix/window.c b/dix/window.c index 9e1f491d8..ea729dbfd 100644 --- a/dix/window.c +++ b/dix/window.c @@ -2302,7 +2302,14 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) ActuallyDoSomething: if (pWin->drawable.pScreen->ConfigNotify) - (*pWin->drawable.pScreen->ConfigNotify)(pWin, x, y, w, h, bw, pSib); + { + int ret; + ret = (*pWin->drawable.pScreen->ConfigNotify)(pWin, x, y, w, h, bw, pSib); + if (ret) { + client->errorValue = 0; + return ret; + } + } if (SubStrSend(pWin, pParent)) { -- cgit v1.2.3