Pressure level is always the same if dragged off window
Status: Beta
Brought to you by:
nicarran
If you are getting the current pressure from the tablet pen, and drag it off the window, then drag it back on (make sure not to switch window focus).
For example, using the Simple Usage Example, if you change the penLevelEvent to the code below:
@Override
public void penLevelEvent(PLevelEvent ev)
{
System.out.println(ev.pen.getLevelValue(PLevel.Type.PRESSURE));
}
For example, when you're on the window, your pressure is 0.7370479. When you drag off the window, and then back on, all the levels after will be 0.7370479 as well, until you release the pen, resetting event.
Logged In: YES
user_id=289641
Originator: NO
hi John. I think that the sanest way to solve this issue is to disable pen events when the pointer is not touching the managed component . I didn't find a "good" way to avoid missing pen tablet events when the pointer is outside the window (for example, as you noted, pressure data is lost when dragging and moving the pointer over another window).
You can try the attached prototype (jpen-2-080505-lib.zip) and tell me what you think about this new behavior. Does it play well in your use case?
Thanks for reporting this bug.
cheers,
Nicolas
File Added: jpen-2-080505-lib.zip
Logged In: YES
user_id=289641
Originator: NO
jpen version 2-080509 solves this issue as explained.