SFML community forums

Help => Window => Topic started by: Olof on December 20, 2013, 08:16:12 pm

Title: Bug in OSX SFOpenGLView.mm?
Post by: Olof on December 20, 2013, 08:16:12 pm
This isn't as much a help request, but a (possible) bug report.
I hope someone can tell me where to send it if this isn't the place :)

I've just started using SFML though, so not sure how to try to reproduce it, but I was looking through SFOpenGLView.mm.
(I was adding raw multitouch trackpad event support to it, needed by my project)

Then I saw this:
////////////////////////////////////////////////////////
-(void)otherMouseDragged:(NSEvent *)theEvent
{
    if (m_requester != 0) {
        NSPoint loc = [self cursorPositionFromEvent:theEvent];

        // Make sure the point is inside the view.
        // (mouseEntered: and mouseExited: are not immediately called
        //  when the mouse is dragged. That would be too easy!)
        [self updateMouseState];
        if (m_mouseIsIn) {
            m_requester->mouseMovedAt(loc.x, loc.y);
        }
    }

    // If the event is not forwarded by mouseDragged or rightMouseDragged...
    sf::Mouse::Button button = [self mouseButtonFromEvent:theEvent];
    if (button != sf::Mouse::Left && button != sf::Mouse::Right) {
        // ... transmit to non-SFML responder
        [[self nextResponder] otherMouseUp:theEvent];
    }
}


Shouldn't that forward to otherMouseDragged: and not to otherMouseUp?

Just wanted to let you know..
Title: Re: Bug in OSX SFOpenGLView.mm?
Post by: Hiura on December 23, 2013, 05:03:00 pm
That's why I shouldn't use copy / past... I feel bad about it. Thanks for the head up.