https://bugs.kde.org/show_bug.cgi?id=283130
Boudewijn Rempt
boud at valdyas.org
Tue Nov 8 18:15:09 UTC 2011
On Tuesday 08 November 2011 Nov, Boudewijn Rempt wrote:
> On Tuesday 08 November 2011 Nov, Cyrille Berger Skott wrote:
> > On Tuesday 08 November 2011, Boudewijn Rempt wrote:
> > > > 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_TAB
> > > >LET_EVENT_RECEIVED); }
> > > > if (inputDevice == device) return;
> > > >
> > > > - if (device.isMouse() && tabletEventTimer.isActive()) {
> > > > + if (device.isMouse() && !inputDevice.isMouse()) { //
> > > > tabletEventTimer.isActive()) {
>
> > isn't equivalent to if(false) ?
> >
>
> Er no... The new device can be a mouse, and the old device can either be a mouse, or another device, at the very beginning. In any case, this didn't solve the problem on Ubuntu, though adding a "return;" at theb beginning of switchInputDevice solves it. Some debug after the if blocks shows a big difference.
>
> This is OpenSUSE:
>
> going to do switcheroo from mouse to pen stylus (id: 0 )
> going to do switcheroo from pen stylus (id: 0 ) to eraser stylus (id: 0 )
> going to do switcheroo from eraser stylus (id: 0 ) to pen stylus (id: 0 )
> going to do switcheroo from pen stylus (id: 0 ) to eraser stylus (id: 0 )
>
> This is the same on Ubuntu:
>
> going to do switcheroo from to
> going to do switcheroo from to
The weird thing is that inputDevice == device still apparently returns false -- I guess I need more debug & ask animtim to do some more tests for me.
--
Boudewijn Rempt
http://www.valdyas.org, http://www.krita.org, http://www.boudewijnrempt.nl
More information about the kimageshop
mailing list