Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit ba9ffe4

Browse files
netonjmmonojenkins
authored andcommitted
Fixes drag and drop in toolbox This commit reverts #9fdbbcf765427e48a894d96d0aeab2354a587b74 which introduces a regression doing a drag and drop
1 parent 2f48e74 commit ba9ffe4

File tree

1 file changed

+3
-5
lines changed
  • main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport

1 file changed

+3
-5
lines changed

main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/ToolboxPad.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,10 @@ void Toolbox_DragBegin (object sender, EventArgs args)
130130
// Gtk.Application.CurrentEvent and other copied gdk_events seem to have a problem
131131
// when used as they use gdk_event_copy which seems to crash on de-allocating the private slice.
132132
IntPtr currentEvent = GtkWorkarounds.GetCurrentEventHandle ();
133-
if (currentEvent != IntPtr.Zero) {
134-
Gtk.Drag.Begin (widget, targets, Gdk.DragAction.Copy | Gdk.DragAction.Move, 1, new Gdk.Event (currentEvent, false));
133+
Gtk.Drag.Begin (widget, targets, Gdk.DragAction.Copy | Gdk.DragAction.Move, 1, new Gdk.Event (currentEvent, false));
135134

136-
// gtk_drag_begin does not store the event, so we're okay
137-
GtkWorkarounds.FreeEvent (currentEvent);
138-
}
135+
// gtk_drag_begin does not store the event, so we're okay
136+
GtkWorkarounds.FreeEvent (currentEvent);
139137
}
140138
}
141139

0 commit comments

Comments
 (0)