diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c index fe78111e8..bb97ee058 100644 --- a/hw/xfree86/drivers/modesetting/driver.c +++ b/hw/xfree86/drivers/modesetting/driver.c @@ -42,6 +42,7 @@ #include "config/hotplug_priv.h" #include "dix/dix_priv.h" +#include "mi/mi_priv.h" #include "xf86.h" #include "xf86Priv.h" @@ -1744,18 +1745,15 @@ msStopFlippingPixmapTracking(DrawablePtr src, } static Bool -CreateScreenResources(ScreenPtr pScreen) +modsetCreateScreenResources(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); modesettingPtr ms = modesettingPTR(pScrn); PixmapPtr rootPixmap; - Bool ret; void *pixels = NULL; int err; - pScreen->CreateScreenResources = ms->createScreenResources; - ret = pScreen->CreateScreenResources(pScreen); - pScreen->CreateScreenResources = CreateScreenResources; + Bool ret = miCreateScreenResources(pScreen); if (!drmmode_set_desired_modes(pScrn, &ms->drmmode, pScrn->is_gpu, FALSE)) return FALSE; @@ -2057,8 +2055,7 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv) return FALSE; } - ms->createScreenResources = pScreen->CreateScreenResources; - pScreen->CreateScreenResources = CreateScreenResources; + pScreen->CreateScreenResources = modsetCreateScreenResources; xf86SetBlackWhitePixels(pScreen); @@ -2325,7 +2322,6 @@ CloseScreen(ScreenPtr pScreen) LeaveVT(pScrn); } - pScreen->CreateScreenResources = ms->createScreenResources; pScreen->BlockHandler = ms->BlockHandler; pScrn->vtSema = FALSE; diff --git a/hw/xfree86/drivers/modesetting/driver.h b/hw/xfree86/drivers/modesetting/driver.h index 74630cac4..62b0db0cc 100644 --- a/hw/xfree86/drivers/modesetting/driver.h +++ b/hw/xfree86/drivers/modesetting/driver.h @@ -108,7 +108,6 @@ typedef struct _modesettingRec { CreateWindowProcPtr CreateWindow; unsigned int SaveGeneration; - CreateScreenResourcesProcPtr createScreenResources; ScreenBlockHandlerProcPtr BlockHandler; miPointerSpriteFuncPtr SpriteFuncs; void *driver; diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 1264e03b1..3eb094adc 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -53,7 +53,10 @@ void miWindowExposures(WindowPtr pWin, RegionPtr prgn); void miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what); void miSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h, unsigned int subWindowMode); -Bool miCreateScreenResources(ScreenPtr pScreen); + +/* only exported for modesetting, not for external drivers (yet) */ +_X_EXPORT Bool miCreateScreenResources(ScreenPtr pScreen); + int miShapedWindowIn(RegionPtr universe, RegionPtr bounding, BoxPtr rect, int x, int y); int miValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind);