Adding drag auto-scrolling to trees. bug 28226, r=hyatt

This commit is contained in:
pinkerton%netscape.com 2000-06-22 08:41:49 +00:00
Родитель d049c7ede6
Коммит 2458b2edf8
1 изменённых файлов: 24 добавлений и 0 удалений

Просмотреть файл

@ -1847,6 +1847,20 @@ nsWidget::OnDragEnterSignal(GdkDragContext *aGdkDragContext,
nsWidget::OnDragLeaveSignal(GdkDragContext *context,
guint aTime)
{
// tell anyone who is interested to stop tracking drags, but only when
// we're leaving a window, not a child widget
nsCOMPtr<nsIWidget> parent ( dont_AddRef(GetParent()) );
if ( !parent ) {
printf("stopping\n");
nsCOMPtr<nsIDragService> dragServ ( do_GetService("component://netscape/widget/dragservice") );
if ( dragServ ) {
nsCOMPtr<nsIDragSession> session;
dragServ->GetCurrentSession ( getter_AddRefs(session) );
if ( session )
session->StopTracking();
}
}
// update our drag context
UpdateDragContext(NULL, NULL, aTime);
@ -1898,6 +1912,16 @@ nsWidget::OnDragDropSignal(GtkWidget *aWidget,
gint y,
guint aTime)
{
// tell anyone who is interested to stop tracking drags, but only when
// we're leaving a window, not a child widget
nsCOMPtr<nsIDragService> dragServ ( do_GetService("component://netscape/widget/dragservice") );
if ( dragServ ) {
nsCOMPtr<nsIDragSession> session;
dragServ->GetCurrentSession ( getter_AddRefs(session) );
if ( session )
session->StopTracking();
}
UpdateDragContext(aWidget, aDragContext, aTime);
nsMouseEvent event;