From ae87f2594b9439cb63a6b52e42e09504b687aea3 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 23 May 2011 12:30:27 +0000 Subject: xserver git update 23 May 2011 --- xorg-server/hw/xquartz/quartz.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'xorg-server/hw/xquartz/quartz.c') diff --git a/xorg-server/hw/xquartz/quartz.c b/xorg-server/hw/xquartz/quartz.c index 0e71d3629..c395b42e6 100644 --- a/xorg-server/hw/xquartz/quartz.c +++ b/xorg-server/hw/xquartz/quartz.c @@ -239,8 +239,6 @@ void QuartzUpdateScreens(void) { AppleWMSetScreenOrigin(pRoot); pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL); - miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND); - /* pointer events are clipped to old display region after display reconfiguration * http://xquartz.macosforge.org/trac/ticket/346 */ @@ -268,6 +266,9 @@ void QuartzUpdateScreens(void) { quartzProcs->UpdateScreen(pScreen); + /* miPaintWindow needs to be called after RootlessUpdateScreenPixmap (from xprUpdateScreen) */ + miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND); + /* Tell RandR about the new size, so new connections get the correct info */ RRScreenSizeNotify(pScreen); } @@ -464,11 +465,15 @@ void QuartzSpaceChanged(uint32_t space_id) { void QuartzCopyDisplayIDs(ScreenPtr pScreen, int displayCount, CGDirectDisplayID *displayIDs) { QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); - int size = displayCount * sizeof(CGDirectDisplayID); free(pQuartzScreen->displayIDs); - pQuartzScreen->displayIDs = malloc(size); - memcpy(pQuartzScreen->displayIDs, displayIDs, size); + if(displayCount) { + size_t size = displayCount * sizeof(CGDirectDisplayID); + pQuartzScreen->displayIDs = malloc(size); + memcpy(pQuartzScreen->displayIDs, displayIDs, size); + } else { + pQuartzScreen->displayIDs = NULL; + } pQuartzScreen->displayCount = displayCount; } -- cgit v1.2.3