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

Dmitry Kazakov <dimul...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|DUPLICATE                   |FIXED
      Latest Commit|                            |http://commits.kde.org/krit
                   |                            |a/d64d85fb10a58b6ed3b9451ab
                   |                            |eb1927576052e4d

--- Comment #5 from Dmitry Kazakov <dimul...@gmail.com> ---
Git commit d64d85fb10a58b6ed3b9451abeb1927576052e4d by Dmitry Kazakov.
Committed on 27/04/2016 at 17:38.
Pushed by dkazakov into branch 'master'.

Fix shortcuts when the cursor is outside the canvas

This patch needs testing on Windows, OSX and all the variations
of DE on Linux!

Before today the focus was automatically transferred to the canvas
when the cursor was hovering over it. That caused all input boxes
in the dockers work only when you keep the cursor over them. That
was hardly convenient.

Now the focus can be transferred in a semi-automatic way.

* if you move the cursor outside the canvas without clicking anywhere
  the focus is kept on the canvas and you can still use the shortcuts

* if you click in any input box outside the canvas, the focus will be
  transferred to that input box. Therefore the shortcuts will not work.

* to return input focus to the canvas you should do one of the following:
    - just start a stroke on it
    - keep your cursor *moving* over the canvas for 2 seconds and
      the focus will be transferred automatically. "Moving" condition is
      needed for a case when you drop your mouse or a stylus in a fixed
      position on a canvas and move your hands to the keyboard to fill
      in input boxes in the dockers. If you do this "dropping" quick
      enough (< 2 sec), the focus will be kept on your input box :)

To implement such behavior I had to create a special class
KisTimedSignalThreshold which uses almost the same interface as
KisSignalsCompressor, but does what we need: emit the signal if the
flow of events is strong enough.

Fixes T2346
Related: bug 343763
CC:kimages...@kde.org

M  +1    -0    libs/image/CMakeLists.txt
A  +82   -0    libs/image/kis_timed_signal_threshold.cpp     [License: GPL
(v2+)]
A  +71   -0    libs/image/kis_timed_signal_threshold.h     [License: GPL (v2+)]
M  +3    -15   libs/ui/input/kis_input_manager.cpp
M  +39   -5    libs/ui/input/kis_input_manager_p.cpp
M  +8    -1    libs/ui/input/kis_input_manager_p.h
M  +5    -1    libs/ui/input/kis_shortcut_matcher.cpp

http://commits.kde.org/krita/d64d85fb10a58b6ed3b9451abeb1927576052e4d

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to