https://bugs.kde.org/show_bug.cgi?id=283130

Boudewijn Rempt boud at valdyas.org
Tue Nov 8 15:40:19 UTC 2011


On Tuesday 08 November 2011 Nov, Boudewijn Rempt wrote:
> On Saturday 05 November 2011 Nov, Cyrille Berger Skott wrote:
> > On Saturday 05 November 2011, David Revoy wrote:
> > > Hi,
> > > 
> > > Just to say on Mint 11 ( Ubuntu Natty Narval errors also ) I'm affected
> > > by this even with Gimp-painter.
> > > If I take mouse to check emails , when take back stylus, the brush
> > > change to a default preset, as if it was a new device.
> > > So, really 's not Krita fault.
> > Might be a different bug, but yeah, might require more investigation.
> >  
> > > On 05/11/2011 09:22, Boudewijn Rempt wrote:
> > > > 2) Completely remove the tool-per-input-device hack
> > > > 3) Try to only switch tools when we discover a switch in wacom id. That
> > > > is, the mouse always activates the latest activated tablet stylus, which
> > > > means no switch unless the user has two wacom pens (problem: I cannot
> > > > test that, since Cyrille has the Krita Project Art Pen)
> > > 
> > > I woud be ok with the 2 ,  but why other system ok and not buggy with
> > > tablets have to suffer of a removal ?
> > > Maybe a preference option to unactivate tool-per-input-device can be
> > > good for users with a buggy distrib as me.
> > 
> > I reluctantly go for 3), that break my personal use case of having hand on the 
> > mouse to pan, and stylus to draw. But to be honest that hack is the third 
> > version, and until Qt get fixed (ie until we find someone who understand X11 
> > code), it is better to go without it.
> > 
> > I can test/review the patch for 3 (if I find where the art pen is ;) ).
> > 
> > 
> This is, I think, the minimal change that's needed to see if
> 
> a) we don't wantonly switch from tablet to mouse anymore. This seems to work for me
> b) still can switch between wacom devices. I only have one pen here, so I cannot test that.

it works for eraser/stylus end, though.

> 
> 
> diff --git a/libs/flake/KoToolManager.cpp b/libs/flake/KoToolManager.cpp
> index b3a9120..b8110e5 100644
> --- a/libs/flake/KoToolManager.cpp
> +++ b/libs/flake/KoToolManager.cpp
> @@ -655,7 +655,7 @@ void KoToolManager::Private::switchInputDevice(const KoInputDevice &device)
>          tabletEventTimer.start(MSECS_TO_IGNORE_SWITCH_TO_MOUSE_AFTER_TABLET_EVENT_RECEIVED);
>      }
>      if (inputDevice == device) return;
> -    if (device.isMouse() && tabletEventTimer.isActive()) {
> +    if (device.isMouse() && !inputDevice.isMouse()) { // tabletEventTimer.isActive()) {
>          // Ignore switch to mouse for a short time after a tablet event
>          // is received, as this is likely to be either the mouse event sent
>          // to a widget that doesn't accept the tablet event, or, on X11,
> lines 1-13/13 (END) 
> 
> 
> 
> 


-- 
Boudewijn Rempt
http://www.valdyas.org, http://www.krita.org, http://www.boudewijnrempt.nl


More information about the kimageshop mailing list