aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xquartz/quartz.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-05-23 12:30:27 +0000
committermarha <marha@users.sourceforge.net>2011-05-23 12:30:27 +0000
commitae87f2594b9439cb63a6b52e42e09504b687aea3 (patch)
treea0a59232ccde314cb2032d2856f1eb3b8701d3f8 /xorg-server/hw/xquartz/quartz.c
parent52011cfedaa930d61d8f60b283a2051093727582 (diff)
downloadvcxsrv-ae87f2594b9439cb63a6b52e42e09504b687aea3.tar.gz
vcxsrv-ae87f2594b9439cb63a6b52e42e09504b687aea3.tar.bz2
vcxsrv-ae87f2594b9439cb63a6b52e42e09504b687aea3.zip
xserver git update 23 May 2011
Diffstat (limited to 'xorg-server/hw/xquartz/quartz.c')
-rw-r--r--xorg-server/hw/xquartz/quartz.c15
1 files changed, 10 insertions, 5 deletions
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);
-
/* <rdar://problem/7770779> 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;
}