Reset zoom cursor more reliably

Authored by rkflx on Jul 9 2018, 10:17 AM.

Description

Reset zoom cursor more reliably

Summary:
In View mode a magnifying glass is shown while pressing 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 View mode with the cursor over the image, press Ctrl+O and close the dialog again.
  • With the "focus follows mouse" policy set, hold Ctrl while moving the cursor to another window, release the modifier and move the cursor back to Gwenview.
  • With focusing on another application, press 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

Details

Committed
rkflxJul 9 2018, 7:47 PM
Reviewer
Gwenview
Differential Revision
D13894: Reset zoom cursor more reliably
Parents
R260:49a52e748904: Fix QFileDialog::selectUrl() setting initial directory
Branches
Unknown
Tags
Unknown