dnkl/foot
41
2.0k
Fork
You've already forked foot
243

Drag-and-drop: be better at rejecting offers with unsupported mime-types, and workaround buggy compositors #1093

Manually merged
dnkl merged 4 commits from drag-and-drop-unsupported-mime-types into master 2022年06月23日 20:47:09 +02:00
Owner
Copy link

Explicitly reject all dnd offers that aren't targeting the main grid, by calling wl_data_offer_accept() with a NULL mime-type.

Also handle buggy compositors calling data_device::drop() even though we rejected the dnd offer. Before this patch, we'd end up calling wl_data_offer_receive() with a NULL mime-type, which would trip libwayland, causing foot to exit. Now we log a warning, and ignore the drop.

Closes #1092

Explicitly reject all dnd offers that aren't targeting the main grid, by calling `wl_data_offer_accept()` with a `NULL` mime-type. Also handle buggy compositors calling `data_device::drop()` even though we rejected the dnd offer. Before this patch, we'd end up calling `wl_data_offer_receive()` with a `NULL` mime-type, which would trip libwayland, causing foot to exit. Now we log a warning, and ignore the drop. Closes #1092
Specifically, make sure we do *not* call wl_data_offer_receive() with
a NULL mime-type, as this causes libwayland to error out, which in
turn causes foot to exit.
Closes #1092 
selection: reject dnd offers with unsupported mime-types
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
6d4d4502e9
We were already doing this, implicitly, *if* the offer was for the
main grid.
This patch makes it more clear that we do not accept the offer.
selection: wl_data_offer_set_action: use enum values instead of magic integers
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
206e9a1050
dnkl manually merged commit 206e9a1050 into master 2022年06月23日 20:47:09 +02:00
First-time contributor
Copy link

Sorry that I'm coming back to this so late. I just tried 206e9a1050 and it works flawlessly. Thanks for merging and fixing it so quickly!

Sorry that I'm coming back to this so late. I just tried 206e9a1050 and it works flawlessly. Thanks for merging and fixing it so quickly!
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dnkl/foot!1093
Reference in a new issue
dnkl/foot
No description provided.
Delete branch "drag-and-drop-unsupported-mime-types"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?