Skip to content
Commit 84e6a0a9 authored by rk flx's avatar rk flx
Browse files

Reset zoom cursor more reliably

Summary:
In {nav View} mode a magnifying glass is shown while pressing {key Ctrl}
to indicate the image's zoom level could be changed in that state.

Restoring the regular cursor after the user stopped holding the modifier
relied on `AbstractImageView::keyReleaseEvent`. However, that event is
not guaranteed to be delivered, e.g. when another window got focus
before releasing the modifier.

The issue can be mitigated by updating the cursor more eagerly for focus
changes.

FIXED-IN: 18.04.3

Test Plan:
- In {nav View} mode with the cursor over the image, press {key Ctrl O} and close the dialog again.
- With the "focus follows mouse" policy set, hold {key Ctrl} while moving the cursor to another window, release the modifier and move the cursor back to Gwenview.
- With focusing on another application, press {key Ctrl}, move cursor back to Gwenview and focus the window while still holding the modifier.
In all cases the zoom cursor should be set correctly according to the actual keyboard state.

Reviewers: #gwenview, muhlenpfordt

Reviewed By: #gwenview, muhlenpfordt

Subscribers: muhlenpfordt

Differential Revision: https://phabricator.kde.org/D13894
parent 49a52e74
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment