Review Request 129960: Work round missing right click event after dismissing a context menu

David Edmundson david at davidedmundson.co.uk
Mon Feb 20 12:55:48 GMT 2017


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129960/
-----------------------------------------------------------

(Updated Feb. 20, 2017, 12:55 p.m.)


Status
------

This change has been discarded.


Review request for Dolphin.


Repository: dolphin


Description
-------

There is a bug that can happen in the following situation:
- user right clicks to open a menu

- that context menu grabs input

- the QGrabphicsView also notes the mouse was pressed, but not that the
mouse was released because it doesn't have mouse events any more

- Normally clicking twice on different objects results in two sendMouse events instead of a double click, but because lastMouseGrabberItem hasn't had a mouseReleaseEvent it still points to the old item. 

This is a known bug in QGraphicsView and you can see
QGraphicsScenePrivate::sendMouseEvent has a workaround to reset the
lastMouseGrabberItemHasImplicitMouseGrab on mouse moves, with the
comment: "This is a temporary fix for until we get proper mouse
grab events."

Realistically this isn't going to happen in QGraphicsView now.

We do get a double click event though. By checking for double click
events we can grab those missed clicks. It doesn't cause any other side
effects because normally the context menu will fire after the first
click and this rarely gets processed.


Diffs
-----

  src/kitemviews/kitemlistcontroller.cpp 1c86ff03ff9b0b12bb0d2927f8e4ed1e0b67b38d 

Diff: https://git.reviewboard.kde.org/r/129960/diff/


Testing
-------

Opened dolphin. Right clicked on lots of things quickly. Set my double click interval to 2seconds to make this easier to reproduce.
Got context menus all the time.


Thanks,

David Edmundson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20170220/f1bbe9b0/attachment.htm>


More information about the kfm-devel mailing list