Skip to content

Commit

Permalink
Fix #56
Browse files Browse the repository at this point in the history
  • Loading branch information
gnunn1 committed Jan 25, 2016
1 parent 1ab6a61 commit eaeb3e0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions source/gx/terminix/terminal/terminal.d
Original file line number Diff line number Diff line change
Expand Up @@ -1153,10 +1153,6 @@ private:
*/
void onVTEDragDataReceived(DragContext dc, int x, int y, SelectionData data, uint info, uint time, Widget widget) {
trace("Drag data recieved for " ~ to!string(info));
//Don't allow drop on the same terminal
if (isSourceAndDestEqual(dc, this))
return;

final switch (info) {
case DropTargets.URILIST:
string[] uris = data.getUris();
Expand All @@ -1170,10 +1166,13 @@ private:
break;
case DropTargets.STRING, DropTargets.TEXT:
string text = data.getText();
if (!text)
if (text.length > 0) {
vte.feedChild(text, text.length);
}
break;
case DropTargets.VTE:
//Don't allow drop on the same terminal
if (isSourceAndDestEqual(dc, this)) return;
string uuid = to!string(data.getDataWithLength()[0 .. $ - 1]);
DragQuadrant dq = getDragQuadrant(x, y, vte);
trace(format("Receiving Terminal %s, Dropped terminal %s, x=%d, y=%d, dq=%d", _terminalUUID, uuid, x, y, dq));
Expand Down

0 comments on commit eaeb3e0

Please sign in to comment.