镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

right mouse Button do nothing in ofEasyCam with X11/PandaBoardES #86

Description

@kalwalt

this happens with the easyCamExample and when using ofEasyCam in general. Dragging with right mouse button do nothing. Left and middle mouse works. but not sure if left mouse works properly . i can't understand the difference.

Activity

  1. danzeeeman commented on Dec 17, 2012

    @danzeeeman
    Member

    can you add a debugging statement to the mousePressed function and have it spit out the out of the buttons int :

    void testApp::mousePressed(int x, int y, int button)

    something like

    ofLog(OF_LOG_ERROR, "button : "+ofToString(button));

  2. kalwalt commented on Dec 17, 2012

    @kalwalt
    Author

    this not help because i get always an error, also with left and middle button.

  3. danzeeeman commented on Dec 17, 2012

    @danzeeeman
    Member

    Not sure what errors you are hitting? Are you getting anything at the
    commandline? Trying to see if each of the mouse buttons are triggered
    correctly.
    On Dec 17, 2012 12:17 PM, "Walter Perdan" notifications@github.com wrote:

    this not help because i get always an error, also with left and middle
    button.

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/86#issuecomment-11450574.

  4. kalwalt commented on Dec 17, 2012

    @kalwalt
    Author

    this is the output, as i said does not help a lot:
    [error] button : 1
    [error] button : 1
    [error] button : 3
    [error] button : 2
    [error] button : 4
    [error] button : 5

  5. danzeeeman commented on Dec 17, 2012

    @danzeeeman
    Member

    Actually it does. So the OF_LOG_ERROR sets the log level of anything you
    print to logs. So the call to the logs makes it an error. So the mouse is
    correctly reading the different buttons as the int values are changing. Now
    we can see if easyCam is correctly handling the different cases.
    On Dec 17, 2012 12:28 PM, "Walter Perdan" notifications@github.com wrote:

    this is the output, as i said does not help a lot:
    [error] button : 1
    [error] button : 1
    [error] button : 3
    [error] button : 2
    [error] button : 4
    [error] button : 5

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/86#issuecomment-11451036.

  6. kalwalt commented on Dec 17, 2012

    @kalwalt
    Author

    ok i was too pessimstic! but does it works with raspberrypi?

  7. danzeeeman commented on Dec 17, 2012

    @danzeeeman
    Member

    so now you can open up the core and look at easyCam and see if it is correctly responding to the right clicks!

  8. bakercp commented on Dec 20, 2012

    @bakercp
    Member

    @kalwalt I don't think the latest changes will affect you (as Panda is still using the x11 events), but @danthemellowman could you test this on RPI with the latest develop-raspberrypi?

  9. bakercp commented on Dec 20, 2012

    @bakercp
    Member

    This is still a bit broken on the RPI.

    I believe it is because the button "number" is not consisten w/ GLUT. Mouse events emitted by GLUT (particularly drag) do not keep track of multiple mouse buttons being held down on. RPI does, but they need to be unmasked when multiple mouse buttons are pressed.

    There is also an issue happening with easycam that prevents the terminal from being set back to its pre-launch settings. More investigation is needed ...

  10. bakercp commented on Jan 3, 2013

    @bakercp
    Member

    ofEasyCam looks for ofGetMousePressed(1) and ofGetMousePressed(2). Currently our window is passing the masked mouse button values rather than the button numbers.

    see https://github.com/openFrameworks-RaspberryPi/openFrameworks/blob/develop-raspberrypi/libs/openFrameworks/app/ofAppEGLWindow.cpp#L1694

    Then because of this, the pressedMouseButtons set in ofEvents is keeping track of the maskedMouseButton state, rather than the individual mouse buttons.

    In of currently, if you hold down all mouse buttons and drag, you only one mouse button will be passed with the mousePressed function.

    Basically, to fix this, we need to just accept that issue and pass the individual mouse buttons with each mouse event, rather than the full mouse button state (like we are doing in ofAppEGLWindow).

    I'm away from my PI right now, but will make these changes tomorrow.

  11. bakercp commented on Jan 6, 2013

    @bakercp
    Member

    Hi @kalwalt I just added some better mouse support (the stuff I could test on RPi) and added the x11 version in the bugfix-mouse-input branch. Could you try out the bugfix-mouse-input branch and let me know if it works (scrolling, mouse buttons, etc).

    Mouse buttons are now identified by defines here for reference: b63f5db

  12. kalwalt commented on Jan 6, 2013

    @kalwalt
    Author

    Hi @bakercp I will have a look tomorrow at bugfix-mouse-input branch when I have some time. I also hope to be able to work a little on the project generator issue.

  13. bakercp commented on Jan 6, 2013

    @bakercp
    Member

    Great thanks @kalwalt!

  14. kalwalt commented on Jan 7, 2013

    @kalwalt
    Author

    @bakercp i tested right now your new branch. I tryed with easyCamExample. adding an ofLog i can see the notification in the console of the buttons pressed but easyCam is not responding. Scrolling nor translation nor dolling is working now.Does it works for you in rpi?

  15. bakercp commented on Jan 9, 2013

    @bakercp
    Member

    This is all fixed now on the Rpi side. I'm looking into it on the x11 side (a little blind of course w/o a PB).

  16. bakercp commented on Jan 9, 2013

    @bakercp
    Member

    BTW, other RPi folks can test the easy cam example with a 3-button mouse to test.

  17. danzeeeman commented on Jan 9, 2013

    @danzeeeman
    Member

    I'll look at it tonight or tomorrow

    On Wed, Jan 9, 2013 at 2:40 PM, Christopher Baker
    notifications@github.comwrote:

    BTW, other RPi folks can test the easy cam example with a 3-button mouse
    to test.

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/86#issuecomment-12062769.

    "I believe in science. Unlike mathematical theorems, scientific results
    can't be proved. They can only be tested again and again, until only a fool
    would not believe them.

    I cannot prove that electrons exist, but I believe fervently in their
    existence. And if you don't believe in them, I have a high voltage cattle
    prod I'm willing to apply as an argument on their behalf. Electrons speak
    for themselves."

    -- Seth Lloyd: Quantum Mechanical Engineer, MIT

    /.

  18. kalwalt commented on Jan 9, 2013

    @kalwalt
    Author

    @bakercp i have just re-tried the mouse-input but still is not working at all . tested the easyCam example.

  19. bakercp commented on Jan 10, 2013

    @bakercp
    Member

    @arturoc @kalwalt can you all take a look at these issues? I'd love to help further but I'm a bit lost without a pandaboard :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions