diff --git a/src/kits/tracker/ContainerWindow.cpp b/src/kits/tracker/ContainerWindow.cpp index 23050429e9..6d18153806 100644 --- a/src/kits/tracker/ContainerWindow.cpp +++ b/src/kits/tracker/ContainerWindow.cpp @@ -3790,7 +3790,7 @@ BContainerWindow::SaveWindowState(BMessage &message) const status_t BContainerWindow::DragStart(const BMessage *incoming) { - if (!incoming) + if (incoming == NULL) return B_ERROR; // if already dragging, or diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp index 322cf379ba..07b08d291a 100644 --- a/src/kits/tracker/PoseView.cpp +++ b/src/kits/tracker/PoseView.cpp @@ -6709,14 +6709,14 @@ BPoseView::MouseMoved(BPoint mouseLoc, uint32 moveCode, const BMessage *message) if (fSelectionRectInfo.isDragging) _UpdateSelectionRect(mouseLoc); - if (!fDropEnabled || !message) + if (!fDropEnabled || message == NULL) return; BContainerWindow* window = ContainerWindow(); if (!window) return; - if (message != NULL && !window->Dragging()) + if (!window->Dragging()) window->DragStart(message); switch (moveCode) { @@ -6731,6 +6731,7 @@ BPoseView::MouseMoved(BPoint mouseLoc, uint32 moveCode, const BMessage *message) break; case B_EXITED_VIEW: + DragStop(); // reset cursor in case we set it to the copy cursor // in UpdateDropTarget SetViewCursor(B_CURSOR_SYSTEM_DEFAULT); @@ -6786,9 +6787,12 @@ BPoseView::MouseIdle(const BMessage *message) BPoint where; uint32 buttons = 0; GetMouse(&where, &buttons); + // We could retrieve 'where' from the incoming + // message but we need the buttons state anyway + // and B_MOUSE_IDLE message doesn't pass it BContainerWindow* window = ContainerWindow(); - if (buttons == 0 || window == NULL) + if (buttons == 0 || window == NULL || !window->Dragging()) return; if (fDropTarget != NULL) {