b=497498 use event and widget coordinates for drop point instead of new cursor position r=roc
--- a/widget/gtk2/nsWindow.cpp
+++ b/widget/gtk2/nsWindow.cpp
@@ -3443,16 +3443,18 @@ nsWindow::OnDragDropEvent(GtkWidget *aWi
{
LOGDRAG(("nsWindow::OnDragDropSignal\n"));
// get our drag context
nsCOMPtr<nsIDragService> dragService = do_GetService(kCDragServiceCID);
nsDragService *dragServiceGTK = static_cast<nsDragService*>(dragService.get());
+ dragServiceGTK->SetDragEndPoint(nsIntPoint(aX, aY) + WidgetToScreenOffset());
+
nscoord retx = 0;
nscoord rety = 0;
GdkWindow *innerWindow = get_inner_gdk_window(gtk_widget_get_window(aWidget), aX, aY,
&retx, &rety);
nsRefPtr<nsWindow> innerMostWidget = get_window_for_gdk_window(innerWindow);
if (!innerMostWidget)
@@ -3535,23 +3537,16 @@ nsWindow::OnDragDropEvent(GtkWidget *aWi
// event and and that case is handled in that handler.
dragServiceGTK->TargetSetLastContext(0, 0, 0);
// clear the sLastDragMotion window
sLastDragMotionWindow = 0;
// Make sure to end the drag session. If this drag started in a
// different app, we won't get a drag_end signal to end it from.
- gint x, y;
- GdkDisplay* display = gdk_display_get_default();
- if (display) {
- // get the current cursor position
- gdk_display_get_pointer(display, NULL, &x, &y, NULL);
- dragServiceGTK->SetDragEndPoint(nsIntPoint(x, y));
- }
dragService->EndDragSession(true);
return TRUE;
}
void
nsWindow::OnDragDataReceivedEvent(GtkWidget *aWidget,
GdkDragContext *aDragContext,