CVS commit by waba: Fix dropping of images on desktop. M +21 -8 kdiconview.cc 1.66.2.3 --- kdebase/kdesktop/kdiconview.cc #1.66.2.2:1.66.2.3 @@ -975,16 +975,29 @@ void KDIconView::contentsDropEvent( QDro bool isColorDrag = KColorDrag::canDecode(e); bool isImageDrag = QImageDrag::canDecode(e); + bool isUrlDrag = QUriDrag::canDecode(e); bool isImmutable = KGlobal::config()->isImmutable(); - if ( isColorDrag ) { - if ( isImmutable ) // just ignore event in kiosk-mode + if ( (isColorDrag || isImageDrag) && !isUrlDrag ) { + // Hack to clear the drag shape + bool bMovable = itemsMovable(); + bool bSignals = signalsBlocked(); + setItemsMovable(false); + blockSignals(true); + KIconView::contentsDropEvent( e ); + blockSignals(bSignals); + setItemsMovable(bMovable); + // End hack + + if ( !isImmutable ) // just ignore event in kiosk-mode + { + if ( isColorDrag) emit colorDropEvent( e ); - } - else if ( isImageDrag ) { - if ( isImmutable ) // just ignore event in kiosk-mode + else if (isImageDrag) emit imageDropEvent( e ); - } else + } + } else { KonqIconViewWidget::contentsDropEvent( e ); + } }