Hello Guest

[FIXED] Mouse.isbuttondown not updating correctly

  • 56 Replies
  • 51427 Views
*

Offline Matzon

  • *****
  • 2242
Re: Mouse.isbuttondown not updating correctly
« Reply #30 on: October 13, 2009, 12:07:52 »
you could add some debugging to see whats going on...
could be applets that behave differently

*

Offline kappa

  • *****
  • 1314
Re: Mouse.isbuttondown not updating correctly
« Reply #31 on: October 13, 2009, 12:42:52 »
I think but not entirely sure that the Applet SecurityManager does not allow you to change System Properties (System.setProperty) unless its explicitly one of the exceptions. That could explain the current behaviour.

A possible solution (other than signing your applet) would be to have a publically exposed API in LWJGL e.g. Mouse.enableNegativeCoords(boolean). Technically its not just unlocking negative coords but any coords outside the Display, so could also be something like Mouse.clipCoords(boolean), Display.clipMouseCoords(boolean), etc.

Re: Mouse.isbuttondown not updating correctly
« Reply #32 on: October 13, 2009, 13:01:29 »
A possible solution (other than signing your applet) would be to have a publically exposed API in LWJGL e.g. Mouse.enableNegativeCoords(boolean). Technically its not just unlocking negative coords but any coords outside the Display, so could also be something like Mouse.clipCoords(boolean), Display.clipMouseCoords(boolean), etc.

*wink* *wink* Matzon? *wink* *wink*

Re: Mouse.isbuttondown not updating correctly
« Reply #33 on: October 27, 2009, 16:12:27 »
Need more winks? ;) *wink* *wink*

Re: Mouse.isbuttondown not updating correctly
« Reply #34 on: August 20, 2010, 20:50:10 »
I'll go on with winking at you Matzon :) *wink* *wink*

*

Offline Matzon

  • *****
  • 2242
Re: Mouse.isbuttondown not updating correctly
« Reply #35 on: August 21, 2010, 08:33:32 »
I'll go on with winking at you Matzon :) *wink* *wink*
;) I had forgotten all about this thread. I will look into it soon - but I'll be drunk tonight, so I think I'll wait till tomorrow.

Re: Mouse.isbuttondown not updating correctly
« Reply #36 on: August 21, 2010, 16:38:02 »
;) I had forgotten all about this thread. I will look into it soon - but I'll be drunk tonight, so I think I'll wait till tomorrow.

Lol, have a nice evening :)

I put the programming on hold for a year and just started up again three or so weeks ago with motivation again so no rush :)

*

Offline Matzon

  • *****
  • 2242
Re: Mouse.isbuttondown not updating correctly
« Reply #37 on: August 23, 2010, 18:45:27 »
several of the flags are initialized statically. So setter methods may or may not have any effect, depending on how stuff is initialized :/
not sure how to handle this ...

Re: Mouse.isbuttondown not updating correctly
« Reply #38 on: August 24, 2010, 05:42:37 »
several of the flags are initialized statically. So setter methods may or may not have any effect, depending on how stuff is initialized :/
not sure how to handle this ...

It doesn't matter that they are static as long as they aren't final, right? But I barely know any Java, how I managed to make this much of a game is just because I'm stubborn and spent more than a thousand hours :P

*

Offline Matzon

  • *****
  • 2242
Re: Mouse.isbuttondown not updating correctly
« Reply #39 on: August 24, 2010, 07:46:35 »
several of the flags are initialized statically. So setter methods may or may not have any effect, depending on how stuff is initialized :/
not sure how to handle this ...

It doesn't matter that they are static as long as they aren't final, right? But I barely know any Java, how I managed to make this much of a game is just because I'm stubborn and spent more than a thousand hours :P
The problem is that the flags are set in static initializers - and passed down to native code. So if you change then after, then differnet parts of the code will not be told about the value change.
I'll look into how and if we can change that behavior.

Re: Mouse.isbuttondown not updating correctly
« Reply #40 on: August 24, 2010, 21:38:56 »
Ah, right, thanks for the explanation. Maybe give the option to set such things before creating the OpenGL context and not allow them to be changed afterwards?

Re: Mouse.isbuttondown not updating correctly
« Reply #41 on: September 29, 2010, 20:12:39 »
It wasn't as easy as I'd have hoped eh?

Oh, and as thanks for you all answering my weird questions and bugs without snapping at me I made my first donation :-)

Mike

Re: Mouse.isbuttondown not updating correctly
« Reply #42 on: November 07, 2010, 15:58:12 »
More than 6.000 views :) Was the conclusion that it wasn't possible so you need to sign applets if you want to use it a non gripping mouse?

Mike

Re: [RFE] Mouse.isbuttondown not updating correctly
« Reply #43 on: January 09, 2011, 21:17:15 »
Getting close to 7.000 views :), Matzon?

*

Offline Matzon

  • *****
  • 2242
Re: [RFE] Mouse.isbuttondown not updating correctly
« Reply #44 on: January 10, 2011, 06:18:56 »
Getting close to 7.000 views :), Matzon?

heh, honestly, haven't looked at it. However the main problem still remains. The options are really meant the be static, which it is passed as VM parameters.

Since this is an applet specific issues, I am thinking about being able to set lwjgl specific (or at least generally specific) parameters through out applet loader, since that is signed. kappa, does that make sense?