Opened 9 years ago
Last modified 4 years ago
#4685 assigned enhancement
[patch] Don't register mouse click when Wacom pen slightly touches tablet
Reported by: | idefix | Owned by: | stippi |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Drivers/Input/Wacom | Version: | R1/alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Has a Patch: | no | Platform: | All |
Attachments (1)
Change History (11)
Changed 9 years ago by
Attachment: | wacom_pressure.patch added |
---|
comment:1 follow-up: 2 Changed 9 years ago by
The code already implements that. Cutting of a range of the pressure is not the way to go. You need to find the place in the code where it uses the proximity as a threshold for the click. This value seems to be too low for your tablet. Since this is obviously tablet specific, and I even remember this value being different depending on where you touched the tablet, this should definitely go into a future preference panel.
comment:2 Changed 9 years ago by
Replying to stippi:
The code already implements that.
You mean (in case of a Wacom Graphire) line 288 in TabletDevice.cpp?
Cutting of a range of the pressure is not the way to go.
No, and it wasn't my first intention to do that. I was going to use only this line:
if (pressure <= MIN_CLICK_PRESSURE && mode == MODE_PEN) firstButton = false;
But this caused Wonderbrush to ignore the pressure-levels below MIN_CLICK_PRESSURE, so drawing thin lines didn't work anymore.
You need to find the place in the code where it uses the proximity as a threshold for the click. This value seems to be too low for your tablet. Since this is obviously tablet specific, and I even remember this value being different depending on where you touched the tablet, this should definitely go into a future preference panel.
Well, I had a more generic solution in mind. But a preference panel does sound good. :)
comment:3 follow-up: 4 Changed 9 years ago by
Hm, maybe line 288 should be
firstButton = (data[1] & 0x01) != 0;
If that doesn't work, you can cut off the pressure, but do it like this:
pressure = max_c(0.0, (pressure - 0.1)) / 0.9;
which will make it range from 0.0 to 1.0 again.
comment:4 Changed 9 years ago by
Replying to stippi:
Hm, maybe line 288 should be
firstButton = (data[1] & 0x01) != 0;
This causes firstButton
to be true
at a pressure of approximately 0.12
. But this also causes WonderBrush to ignore the pressure-levels below that. Maybe WonderBrush should only act on the pressure-level and not on the button-data when one of the parameters is configured for pressure-sensitivity and the user is using a Wacom pen? That way you can use the full pressure-range when drawing and still have a trigger-point for firstButton
when using any other application.
If that doesn't work, you can cut off the pressure, but do it like this:
pressure = max_c(0.0, (pressure - 0.1)) / 0.9;
which will make it range from 0.0 to 1.0 again.
This works, but as you said, it will cut a range of the pressure which the driver shouldn't do at default. Maybe one day this can be implemented in a preference panel.
comment:5 Changed 9 years ago by
Owner: | changed from mmlr to stippi |
---|---|
Status: | new → assigned |
Reassigning as the wacom driver's not really my area.
comment:6 Changed 9 years ago by
Has a Patch: | set |
---|
comment:7 Changed 9 years ago by
Has a Patch: | unset |
---|
comment:8 Changed 4 years ago by
Component: | Drivers/Mouse/USB → Drivers/Input/Wacom |
---|
comment:9 Changed 4 years ago by
Milestone: | R1 → Unscheduled |
---|
(patch) set minimum click pressure for Wacom pen