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

Renderers but JAVA2D have problem for mouseButton under P3 #4361

Closed
iizuna opened this Issue Mar 17, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@iizuna

iizuna commented Mar 17, 2016

while left mouse button is plessed, mouseButton ignores that right mouse button plessed or released.

void setup() {
  size(100, 100);
  //size(100, 100, P3D);

  fill(255);
}

boolean LMB, RMB;

void draw() {
  if (LMB) {
    background(0);
    if (RMB) {
      rect(30, 30, 40, 40);
    }
  } else {
    background(255);
  }
}

void mousePressed() {
  if (mouseButton==LEFT) {
    LMB=true;
  } else {
    RMB=true;
  }
}

void mouseReleased() {
  if (mouseButton==LEFT) {
    LMB=false;
  } else {
    RMB=false;
    if (LMB) {
      println("success");
    }
  }
}

for more details here: https://forum.processing.org/two/discussion/15531/how-to-detect-right-mouse-button-press-release-while-left-mouse-button-is-plessed-in-p3d-mode

@codeanticode codeanticode self-assigned this Mar 18, 2016

@codeanticode codeanticode added the opengl label Mar 18, 2016

@codeanticode

This comment has been minimized.

Show comment
Hide comment
@codeanticode

codeanticode Mar 18, 2016

Member

Must be related to the event handling in JOGL's NEWT. Will look into it. This is on windows, right?

Member

codeanticode commented Mar 18, 2016

Must be related to the event handling in JOGL's NEWT. Will look into it. This is on windows, right?

@codeanticode

This comment has been minimized.

Show comment
Hide comment
@codeanticode

codeanticode Mar 20, 2016

Member

Looks like this issue is due to an upstream bug in JOGL, see this thread, in particular this comment. I can reproduce it on OS X 10.10.5, i.e.: releasing the right button when both left and right are pressed does not differentiate between which one was actually released. I will probably need to get in touch with the JOGL developers to figure a solution out.

Member

codeanticode commented Mar 20, 2016

Looks like this issue is due to an upstream bug in JOGL, see this thread, in particular this comment. I can reproduce it on OS X 10.10.5, i.e.: releasing the right button when both left and right are pressed does not differentiate between which one was actually released. I will probably need to get in touch with the JOGL developers to figure a solution out.

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