diff --git a/src/servers/app/EventStream.cpp b/src/servers/app/EventStream.cpp index 20819e1eee..e93e0e7a33 100644 --- a/src/servers/app/EventStream.cpp +++ b/src/servers/app/EventStream.cpp @@ -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 diff --git a/src/servers/app/RootLayer.cpp b/src/servers/app/RootLayer.cpp index 9299efaa5c..1915c3483f 100644 --- a/src/servers/app/RootLayer.cpp +++ b/src/servers/app/RootLayer.cpp @@ -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 diff --git a/src/servers/input/InputServer.cpp b/src/servers/input/InputServer.cpp index 3960748be1..3576c630f2 100644 --- a/src/servers/input/InputServer.cpp +++ b/src/servers/input/InputServer.cpp @@ -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;