Bug 45796 - Dotted rectangle remains visible after setting wallpaper via drag & drop
Summary: Dotted rectangle remains visible after setting wallpaper via drag & drop
Status: CLOSED FIXED
Alias: None
Product: kdesktop
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-26 14:49 UTC by dpavlotzky
Modified: 2009-01-02 20:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dpavlotzky 2002-07-26 14:36:18 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kdesktop
Version:           KDE 3.0.2 
Severity:          normal
Installed from:    Gentoo Packages
Compiler:          gcc 2.95.3
OS:                Linux
OS/Compiler notes: Not Specified

Well the short discription says it all really. Try draging an image from a webpage to the desktop and release it there. Whether you choose to use it as a wallpaper or not doesn't matter. The dotted rectangle around the mime-type icon remains visible.

(Submitted via bugs.kde.org)
Comment 1 Waldo Bastian 2003-04-29 18:17:29 UTC
Subject: kdebase/kdesktop

CVS commit by waba: 

CCMAIL: 45796-done@bugs.kde.org
Fix dropping of images on desktop.


  M +21 -8     kdiconview.cc   1.71


--- kdebase/kdesktop/kdiconview.cc  #1.70:1.71
@@ -985,16 +985,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 );
+    }
 }
 


Comment 2 FiNeX 2009-01-02 20:19:10 UTC
Bug closed. Kdesktop is no more mantained.