D20200: [Dialog] Don't forward hover event when there is nowhere to forward it to

Kai Uwe Broulik noreply at phabricator.kde.org
Tue Apr 2 11:26:08 BST 2019


broulik created this revision.
broulik added a reviewer: Plasma.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
broulik requested review of this revision.

REVISION SUMMARY
  Dialog has this clever way of re-sending a mouse event inside the bounardies of the dialog, so despite visual padding, the items can be clicked on any corner following Fitt's law.
  However, when the `mainItem` has no size, adjusting the position will adjust it inside the border since there is no pixel inside the main item, leading to infinite recursion as the event is processed again and again and again leading to a crash.

TEST PLAN
  Opened a `Dialog` with a `mainItem` without a `width`, dialog showed up tiny, hovered it, no longer crashed
  Verified that event is still forwarded in the normal case.
  
  I bet there's a tonne of crash reports like this (crash in `Dialog::event` in recursion) on bugzilla since an empty dialog could happen in case of a failure to load some QML bits.

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D20200

AFFECTED FILES
  src/plasmaquick/dialog.cpp

To: broulik, #plasma
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190402/ddf5bec5/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list