Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Bug in OSX SFOpenGLView.mm?  (Read 1843 times)

0 Members and 1 Guest are viewing this topic.

Olof

  • Newbie
  • *
  • Posts: 3
    • View Profile
Bug in OSX SFOpenGLView.mm?
« 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..
« Last Edit: December 20, 2013, 08:19:46 pm by Olof »

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Bug in OSX SFOpenGLView.mm?
« Reply #1 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.
SFML / OS X developer

 

anything