D6142: Fix drop menu position on Wayland
Elvis Angelaccio
noreply at phabricator.kde.org
Wed Jun 7 20:35:19 UTC 2017
elvisangelaccio created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.
REVISION SUMMARY
On Wayland we can't rely on global cursor position.
In particual QCursor::pos() returns a wrong position
when called inside a dropEvent() function, which breaks
the DropJob's popup menus.
A more reliable solution is the position provided by the QDropEvent,
though this position is relative and we need a QWidget associated to the
job that can translate it to a global position.
TEST PLAN
Drop something within a single Dolphin window from a wayland session.
Without the patch the popup shows up where the drag starts.
With the patch instead it shows up where the drag ends, as expected.
REPOSITORY
R241 KIO
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D6142
AFFECTED FILES
src/widgets/dropjob.cpp
src/widgets/dropjob.h
To: elvisangelaccio, dfaure, mart
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170607/38045001/attachment.html>
More information about the Kde-frameworks-devel
mailing list