chip@alex.pcs.COM (Edward E Fraser Jr.) (03/08/91)
I'm having a couple problems with server porting involving a machine with
2 frame buffers. One frame buffer has a hardware cursor and the 2nd has
a software (misprite)cursor.
Problem 1:
----------
My Server comes up with the cursor on the
hardware-cursored-frame-buffer and then I move it to the
software-cursored-frame-buffer which is handled by the misprite.c
and mipointer.c software-cursor code. My mouse server code detects that
a screen change needs to take place and calls NewCurrentScreen in dix
with the new screen. The software-cursored-frame-buffer has not yet had to
display a cursor up until this point.
I would expect either :
a) the NewCurrentScreen procedure to at some time call
newScreen->DisplayCursor because until this occurs the misprite
code has no cursor to display. (by the way - If I move the
"not displayed" cursor into a window then the first DisplayCursor
procedure gets called and the cursor functions ok).
or
b) to ultimately get a DisplayCursor call in dix from
static void
ChangeToCursor(cursor)
CursorPtr cursor;
{
if (cursor != sprite.current)
{
if ((sprite.current->bits->xhot != cursor->bits->xhot) ||
(sprite.current->bits->yhot != cursor->bits->yhot))
CheckPhysLimits(cursor, FALSE, (ScreenPtr)NULL);
(*sprite.hotPhys.pScreen->DisplayCursor) (sprite.hotPhys.pScreen,
cursor);
sprite.current = cursor;
}
}
but this does not always work if the old screen cursor equals the
new screen cursor. if (cursor != sprite.current)
I know that in dix/events.c/DefineInitialRootWindow() the
DisplayCursor procedure is called but why not on the call of
dix/events.c/NewCurrentScreen() ?.
Problem 2:
----------
This problem exists also when one framebuffer is a
hardware-cursored-frame-buffer and the 2nd is a
software-cursored-frame-buffer with misprite.c and mipointer.c
cursor-code. If the cursor is on the hardware-cursored-frame-buffer
and moves to the software-cursored-frame-buffer how should I tell the
software-cursored-frame-buffer with misprite.c and mipointer.c cursor_code
to UndisplayCursor ?.
It seems to me that there should be a UndisplayCursor in the Screen
structure so that
(*oldScreen->UndisplayCursor) (oldScreen);
(*newScreen->DisplayCursor) (newScreen, newRootWindowDefaultCursor);
in dix/events.c/NewCurrentScreen() can be called.
This might also solve the 1st problem as well.
Chip Fraser Munich Germany.