Skip to content

Work/xwl fixes

David Edmundson requested to merge work/xwl_fixes into master

[xwl] Cache KWaylandServer::DataSourceInterface as a QPointer

Seat correctly emits dragEnded when a DataSourceInterface is destroyed, and stops the drag.

However WlToXSource lives slightly longer to finish handling any other visits. See the guarded delete statement in Dnd::endDrag.

With the other fixes use is mostly now a hypothetical, but we still don't want dangling pointers in our code.


[xwl] Cancel the visit when a drag ends

XWL only clears up when a "visit" finishes.

If we end a WlToXDrag through clicking we call "WlToXDrag::end" but the visit object stays alive, which obviously will never finish.

Both the visit and the drag object then effectively leak and are used on the next drag.


[xwl] Avoid deletion of Transfer in signals from Transfer.

Transfer emits "finished" mid way through it's own methods. If we delete here transfer is left in the middle of methods like Transfer::timeout with a dangling "this".

Edited by David Edmundson

Merge request reports

Loading