Skip to content

Fix: Premature finish request while copy-pasting

Harish Krupo requested to merge harishkrupo/weston:fix_premature_finish into master

The issue:

When we try to copy and paste using the weston-editor, the client crashes with the error "premature finish request".

Steps to reproduce:

  • Open weston-editor
  • Copy text from one text entry and paste into the other entry.
  • Client crashes with error "premature finish request"

Analysis:

As per the wl_data_offer::finish docs:

Notifies the compositor that the drag destination successfully finished the drag-and-drop operation.

The request should be used to signify that the dnd operation has been completed. It shouldn't be set for copy-paste operations. This MR adds a patch to modify the client code to send finish request only when the operation is drag n drop. Additionally, it also adds a check in compositor side code for wl_data_offer::finish to send INVALID_FINISH error when the finish request is called for a non dnd operation

Signed-off-by: Harish Krupo harish.krupo.kps@intel.com

Edited by Harish Krupo

Merge request reports

Loading