summaryrefslogtreecommitdiff
path: root/dix/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'dix/window.c')
-rw-r--r--dix/window.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/dix/window.c b/dix/window.c
index 99b594b63..caff1cbff 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -1457,8 +1457,8 @@ GetWindowAttributes(WindowPtr pWin, ClientPtr client, xGetWindowAttributesReply
wa->backingStore = NotUseful;
else
wa->backingStore = pWin->backingStore;
- wa->length = (sizeof(xGetWindowAttributesReply) -
- sizeof(xGenericReply)) >> 2;
+ wa->length = bytes_to_int32(sizeof(xGetWindowAttributesReply) -
+ sizeof(xGenericReply));
wa->sequenceNumber = client->sequence;
wa->backingBitPlanes = wBackingBitPlanes (pWin);
wa->backingPixel = wBackingPixel (pWin);
@@ -3128,8 +3128,6 @@ dixSaveScreens(ClientPtr client, int on, int mode)
if (on == SCREEN_SAVER_FORCER)
{
- UpdateCurrentTimeIf();
- lastDeviceEventTime = currentTime;
if (mode == ScreenSaverReset)
what = SCREEN_SAVER_OFF;
else
@@ -3388,7 +3386,7 @@ CheckWindowOptionalNeed (WindowPtr w)
WindowOptPtr optional;
WindowOptPtr parentOptional;
- if (!w->parent)
+ if (!w->parent || !w->optional)
return;
optional = w->optional;
if (optional->dontPropagateMask != DontPropagateMasks[w->dontPropagate])
@@ -3543,7 +3541,7 @@ ChangeWindowDeviceCursor(WindowPtr pWin,
pWin->optional->deviceCursors = pNode->next;
xfree(pNode);
- return Success;
+ goto out;
}
} else
@@ -3588,6 +3586,7 @@ ChangeWindowDeviceCursor(WindowPtr pWin,
}
}
+out:
if (pWin->realized)
WindowHasNewCursor(pWin);