Fix an occasional crash on VT switches: the server would save a pointer to
the current cursor when disabling FB access and would try to restore that cursor when re-enabling. However, that cursor might have been destroyed in between. This fixes it by updating the saved cursor pointer when a cursor is set and vtSema is FALSE.
This commit is contained in:
parent
c845e152f5
commit
c8acb34269
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2006-02-16 Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
||||||
|
|
||||||
|
* hw/xfree86/ramdac/xf86Cursor.c:
|
||||||
|
(xf86CursorEnableDisableFBAccess), (xf86CursorSetCursor):
|
||||||
|
Fix an occasional crash on VT switches: the server would save a
|
||||||
|
pointer to the current cursor when disabling FB access and would try
|
||||||
|
to restore that cursor when re-enabling. However, that cursor might
|
||||||
|
have been destroyed in between. This fixes it by updating the saved
|
||||||
|
cursor pointer when a cursor is set and vtSema is FALSE.
|
||||||
|
|
||||||
2006-02-15 Eric Anholt <anholt@FreeBSD.org>
|
2006-02-15 Eric Anholt <anholt@FreeBSD.org>
|
||||||
|
|
||||||
* XTrap/Makefile.am:
|
* XTrap/Makefile.am:
|
||||||
|
|
|
@ -198,7 +198,6 @@ xf86CursorEnableDisableFBAccess(
|
||||||
ScreenPtr pScreen = screenInfo.screens[index];
|
ScreenPtr pScreen = screenInfo.screens[index];
|
||||||
xf86CursorScreenPtr ScreenPriv =
|
xf86CursorScreenPtr ScreenPriv =
|
||||||
pScreen->devPrivates[xf86CursorScreenIndex].ptr;
|
pScreen->devPrivates[xf86CursorScreenIndex].ptr;
|
||||||
xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr;
|
|
||||||
|
|
||||||
if (!enable && ScreenPriv->CurrentCursor != NullCursor) {
|
if (!enable && ScreenPriv->CurrentCursor != NullCursor) {
|
||||||
ScreenPriv->SavedCursor = ScreenPriv->CurrentCursor;
|
ScreenPriv->SavedCursor = ScreenPriv->CurrentCursor;
|
||||||
|
@ -291,6 +290,9 @@ xf86CursorSetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y)
|
||||||
ScreenPriv->y = y;
|
ScreenPriv->y = y;
|
||||||
ScreenPriv->CursorToRestore = NULL;
|
ScreenPriv->CursorToRestore = NULL;
|
||||||
|
|
||||||
|
if (!infoPtr->pScrn->vtSema)
|
||||||
|
ScreenPriv->SavedCursor = pCurs;
|
||||||
|
|
||||||
if (pCurs == NullCursor) { /* means we're supposed to remove the cursor */
|
if (pCurs == NullCursor) { /* means we're supposed to remove the cursor */
|
||||||
if (ScreenPriv->SWCursor)
|
if (ScreenPriv->SWCursor)
|
||||||
(*ScreenPriv->spriteFuncs->SetCursor)(pScreen, NullCursor, x, y);
|
(*ScreenPriv->spriteFuncs->SetCursor)(pScreen, NullCursor, x, y);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user