Turns out there were a couple of problems:

* RootLayer still set the mouse cursor...
* mixed up "x" and "y" in the cursor thread
* but that didn't get noticed, as B_RELEASE_ALL doesn't seem to work
  (will look into that next)!

The cursor finally works as good as expected in Qemu :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15013 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-11-18 11:50:34 +00:00
parent f759822327
commit 1b120ea94a
3 changed files with 9 additions and 23 deletions

View File

@ -156,8 +156,8 @@ InputServerStream::GetNextCursorPosition(BPoint &where)
uint32 pos = fCursorBuffer->pos;
#endif
where.x = pos & 0xffff;
where.y = pos >> 16L;
where.x = pos >> 16UL;
where.y = pos & 0xffff;
atomic_and(&fCursorBuffer->read, 0);
// this tells the input_server that we've read the

View File

@ -934,9 +934,6 @@ RootLayer::MouseEventHandler(BMessage *msg)
where.ConstrainTo(Frame());
if (fLastMousePosition != where) {
// move cursor on screen
GetHWInterface()->MoveCursorTo(where.x, where.y);
// If this happens, it's input server's fault.
// There might be additional fields an application expects in B_MOUSE_MOVED
// message, and in this way it won't get them.
@ -988,9 +985,6 @@ RootLayer::MouseEventHandler(BMessage *msg)
where.ConstrainTo(fFrame);
if (fLastMousePosition != where) {
// move cursor on screen
GetHWInterface()->MoveCursorTo(where.x, where.y);
// If this happens, it's input server's fault.
// There might be additional fields an application expects in B_MOUSE_MOVED
// message, and in this way it won't get them.
@ -1032,21 +1026,10 @@ RootLayer::MouseEventHandler(BMessage *msg)
break;
}
case B_MOUSE_MOVED: {
//printf("RootLayer::MouseEventHandler(B_MOUSE_MOVED)\n");
BPoint where(0,0);
msg->FindPoint("where", &where);
where.ConstrainTo(fFrame);
// move cursor on screen
GetHWInterface()->MoveCursorTo(where.x, where.y);
case B_MOUSE_MOVED:
_ProcessMouseMovedEvent(msg);
break;
}
case B_MOUSE_WHEEL_CHANGED: {
//printf("RootLayer::MouseEventHandler(B_MOUSE_WHEEL_CHANGED)\n");
// FEATURE: This is a tentative change: mouse wheel messages are always sent to the window

View File

@ -1599,8 +1599,11 @@ InputServer::_DispatchEvent(BMessage* event)
#else
atomic_set((int32*)&fCursorBuffer->pos, (uint32)fMousePos.x << 16UL
| ((uint32)fMousePos.y & 0xffff));
if (atomic_or(&fCursorBuffer->read, 1) == 0)
release_sem_etc(fCursorSem, 0, B_RELEASE_ALL);
if (atomic_or(&fCursorBuffer->read, 1) == 0) {
release_sem(fCursorSem);
// TODO: this doesn't work for some reason...
// release_sem_etc(fCursorSem, 0, B_RELEASE_ALL);
}
#endif
}
break;