-
-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dropping files on Gtk/Linux/Wayland not working and crashing the application #1812
Comments
An additional note: accessing |
Got another (possibly related crash)
Code to reproduce: public class MyForm : Form
{
public MyForm() {
this.AllowDrop = true;
this.Size = new Size(800, 800);
}
private bool dragFormOpen = false;
protected override void OnDragEnter(DragEventArgs e)
{
e.Effects = DragEffects.None;
if (!dragFormOpen)
DragForm();
base.OnDragEnter(e);
}
void DragForm()
{
dragFormOpen = true;
var df = new Dialog();
df.Title = "Test";
df.AllowDrop = true;
df.Size = new Size(400, 200);
df.DragDrop += (s, e) =>
{
Uri[] files = e.Data.Uris;
};
df.DragEnter += (s, e) =>
{
e.Effects = DragEffects.Copy;
};
df.ShowModal(this);
}
}
|
Awesome, thanks for all the details! |
I'm pretty sure this issue still exists in v2.7.0. |
Expected Behavior
Drop is working, not crashing the application & returning the file Uris.
Actual Behavior
e.Data.Uris
is null despitee.Data.ContainsUris
being true. After the Drop event handler had been executed, the application crashes with the following stack trace.Steps to Reproduce the Problem
e.Data.Uris
inDragDrop
-eventOnly reproducible with dropping files, not other objects (I tested dropping text)
Code that Demonstrates the Problem
Specifications
The text was updated successfully, but these errors were encountered: