Repository navigation
right mouse Button do nothing in ofEasyCam with X11/PandaBoardES #86
Description
Activity
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));this not help because i get always an error, also with left and middle button.
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.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 : 5Actually 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.ok i was too pessimstic! but does it works with raspberrypi?
so now you can open up the core and look at easyCam and see if it is correctly responding to the right clicks!
@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?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 ...
ofEasyCamlooks forofGetMousePressed(1)andofGetMousePressed(2). Currently our window is passing the masked mouse button values rather than the button numbers.Then because of this, the
pressedMouseButtonsset inofEventsis 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
mousePressedfunction.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.
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
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.
Great thanks @kalwalt!
@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?
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).
BTW, other RPi folks can test the easy cam example with a 3-button mouse to test.
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
/.
@bakercp i have just re-tried the mouse-input but still is not working at all . tested the easyCam example.
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.