Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kalwalt opened this issue Dec 17, 2012 · 19 comments
Open

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

kalwalt opened this issue Dec 17, 2012 · 19 comments

Comments

@kalwalt
Copy link

kalwalt commented Dec 17, 2012

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.

@danzeeeman
Copy link
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));

@kalwalt
Copy link
Author

kalwalt commented Dec 17, 2012

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

@danzeeeman
Copy link
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" [email protected] 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.

@kalwalt
Copy link
Author

kalwalt commented Dec 17, 2012

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

@danzeeeman
Copy link
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" [email protected] 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.

@kalwalt
Copy link
Author

kalwalt commented Dec 17, 2012

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

@danzeeeman
Copy link
Member

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

@bakercp
Copy link
Member

bakercp commented Dec 20, 2012

@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?

@bakercp
Copy link
Member

bakercp commented Dec 20, 2012

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 ...

@bakercp
Copy link
Member

bakercp commented Jan 3, 2013

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.

@bakercp
Copy link
Member

bakercp commented Jan 6, 2013

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

@kalwalt
Copy link
Author

kalwalt commented Jan 6, 2013

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.

@bakercp
Copy link
Member

bakercp commented Jan 6, 2013

Great thanks @kalwalt!

@kalwalt
Copy link
Author

kalwalt commented Jan 7, 2013

@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?

@bakercp
Copy link
Member

bakercp commented Jan 9, 2013

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).

@bakercp
Copy link
Member

bakercp commented Jan 9, 2013

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

@danzeeeman
Copy link
Member

I'll look at it tonight or tomorrow

On Wed, Jan 9, 2013 at 2:40 PM, Christopher Baker
[email protected]:

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

/.

@kalwalt
Copy link
Author

kalwalt commented Jan 9, 2013

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

@bakercp
Copy link
Member

bakercp commented Jan 10, 2013

@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
Projects
None yet
Development

No branches or pull requests

3 participants