xserver: Branch 'server-1.11-branch' - 2 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Tue Oct 4 20:07:05 PDT 2011
Xext/shm.c | 6 +-----
dix/dispatch.c | 1 -
hw/xquartz/X11Application.m | 2 +-
3 files changed, 2 insertions(+), 7 deletions(-)
New commits:
commit 7b74bb67528033bf2d2a1714a801c38e7822642e
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Tue Sep 20 20:39:06 2011 -0700
XQuartz: Use set_front_process rather than X11ApplicationSetFrontProcess since we're already in the AppKit thread
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
(cherry picked from commit 38e9e28ba2fbffee52ad9889ef6d4e94c7af3e10)
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 7fd7dab..12ff53c 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -356,7 +356,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
*/
_appFlags._active = YES;
- X11ApplicationSetFrontProcess();
+ [self set_front_process:nil];
/* Get the Spaces preference for SwitchOnActivate */
(void)CFPreferencesAppSynchronize(CFSTR("com.apple.dock"));
commit bd6ea85209e5ab80375d4ec9994d10a89fd1374a
Author: Jamey Sharp <jamey at minilop.net>
Date: Tue Sep 14 18:35:21 2010 -0700
Fix pixmap double-frees on error paths.
If AddResource fails, it will automatically free the object that was
passed to it by calling the appropriate deleteFunc; and of course
FreeResource also calls the deleteFunc. In both cases it's wrong to call
the destroy hook manually.
Commit by Jamey Sharp and Josh Triplett.
Signed-off-by: Jamey Sharp <jamey at minilop.net>
Signed-off-by: Josh Triplett <josh at joshtriplett.org>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Aaron Plattner <aplattner at nvidia.com>
(cherry picked from commit 0f380a5005f800572773cd4667ce43c7459cc467)
diff --git a/Xext/shm.c b/Xext/shm.c
index b08af82..4141a8f 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -991,7 +991,6 @@ CreatePmap:
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
pMap->drawable.id = newPix->info[j].id;
if (!AddResource(newPix->info[j].id, RT_PIXMAP, (pointer)pMap)) {
- (*pScreen->DestroyPixmap)(pMap);
result = BadAlloc;
break;
}
@@ -1002,10 +1001,8 @@ CreatePmap:
}
if(result == BadAlloc) {
- while(j--) {
- (*pScreen->DestroyPixmap)(pMap);
+ while(j--)
FreeResource(newPix->info[j].id, RT_NONE);
- }
free(newPix);
} else
AddResource(stuff->pid, XRT_PIXMAP, newPix);
@@ -1110,7 +1107,6 @@ CreatePmap:
{
return Success;
}
- pDraw->pScreen->DestroyPixmap(pMap);
}
return BadAlloc;
}
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 192c8c3..f8200b1 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -1419,7 +1419,6 @@ CreatePmap:
}
if (AddResource(stuff->pid, RT_PIXMAP, (pointer)pMap))
return Success;
- (*pDraw->pScreen->DestroyPixmap)(pMap);
}
return BadAlloc;
}
More information about the xorg-commit
mailing list