Bug 40418 - The desktop is scrollable when icons are dragged below the panel
Summary: The desktop is scrollable when icons are dragged below the panel
Status: CLOSED FIXED
Alias: None
Product: kdesktop
Classification: Miscellaneous
Component: icons (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
: 48865 90066 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-04-08 03:48 UTC by bokonon
Modified: 2009-01-02 20:18 UTC (History)
4 users (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 bokonon 2002-04-08 03:41:52 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kdesktop
Version:           KDE 3.0.0 
Severity:          normal
Installed from:    RedHat RPMs
Compiler:          Not Specified
OS:                Linux
OS/Compiler notes: Not Specified

If I select a column of icons and click the topmost icon in the column and drag it so that the bottom icons are below the panel I am able to scroll the desktop either by using my mouse wheel when the cursor is over the desktop or by left dragging on the desktop to draw the icon selection "rubber band" and dragging it toward the bottom of the screen (similar to the way the rubber band scrolls an ordinary file manager window)

The desktop stays scrollable until I right click on the desktop and use the "Arrange Icons" feature in the context menu (it doesn't matter which auto arrange I select).

Sometimes icons are placed "below the panel" automatically by other applications.  This should not be allowed.

(Submitted via bugs.kde.org)
Comment 1 mklencke 2003-01-12 11:42:22 UTC
This bug is still present. To replicate, make sure to have enough icons on the desktop. Then 
Icons->Line up vertically. Now use konqueror to download something to the desktop. Even 
though most of the time the icons of the downloaded file will be in the visible area of the 
desktop, the desktop is still scrollable when dragging a rubber band to the bottom of the 
screen. 
Comment 2 Wilco Greven 2003-08-23 15:09:23 UTC
*** Bug 48865 has been marked as a duplicate of this bug. ***
Comment 3 Dominique Devriese 2003-12-30 02:26:51 UTC
I can confirm this on KDE 3.1.4 on Debian.
Comment 4 Dik Takken 2004-01-30 12:43:52 UTC
Also reproducable on KDE 3.2 RC1

Comment 5 Iván Sánchez Ortega 2004-03-20 12:55:35 UTC
This seems a duplicate of #46316 to me. Also, it is reproduceable with KDE 3.2.1.
Comment 6 Will Stephenson 2004-07-27 18:03:36 UTC
Still present in CVS at 27/7/04.
Comment 7 Luis Miguel García 2004-08-04 10:14:51 UTC
This bug is still in cvs and is going to be passed to kde 3.3.0 final. I can provide screenshots very fast if you write me.

- Reply to this bug
- Write to ktech@wanadoo.es

It's not a very bad bug, but gives a very bad looking to kde.

Thanks.
Comment 8 Stephan Kulow 2004-08-04 11:38:51 UTC
like all the other 5000 open bug reports. I would say, not too many users drag their icons so far, so I don't consider it of major importance. If you got a fix, let us know.
Comment 9 Josh Goodwin 2004-09-28 07:28:39 UTC
This happens to me without the icons going to far. Hiding and bring back the taskbar would fix it before, or refreshing the desktop but with 3.3 I can't get it to go away. A tid bit annoying with my OCD'ish habits.
Comment 10 Wilco Greven 2004-10-10 18:00:14 UTC
*** Bug 90066 has been marked as a duplicate of this bug. ***
Comment 11 Wolfram R. Sieber 2005-02-16 16:53:11 UTC
The bug can still be reproduced in 3.3.2.

2Stephan Kulow: Maybe it's true, that not too many users drag their icons so far -- but some people may have arranged the icons randomly. Then it's enough to have icon placed on the bottom of the screen, entitled by one line of text ("textfile" for example), then I rename it so that it gets two lines as a title ("textfile textfile"). Then again, the lower end of the icon is off screen.
Comment 12 Andreas Kling 2006-07-29 12:20:48 UTC
SVN commit 567551 by kling:

If icons are dragged outside the desktop area, jerk them back in.
Fixes the long-hated issue with the desktop becoming scrollable.

BUG: 40418


 M  +32 -0     kdiconview.cc  


--- branches/KDE/3.5/kdebase/kdesktop/kdiconview.cc #567550:567551
@@ -1361,6 +1361,38 @@
         setLastIconPosition( e->pos() );
         KonqIconViewWidget::contentsDropEvent( e );
     }
+
+    // Check if any items have been moved outside the desktop area.
+    // If we find any, move them right back in there. (#40418)
+    QRect desk = desktopRect();
+    bool adjustedAnyItems = false;
+    for( QIconViewItem *item = firstItem(); item; item = item->nextItem() )
+    {
+        if( !desk.contains( item->rect(), true ))
+        {
+            QRect r = item->rect();
+
+            if( r.top() < 0 )
+                r.moveTop( 0 );
+            if( r.bottom() > rect().bottom() )
+                r.moveBottom( rect().bottom() );
+            if( r.left() < 0 )
+                r.moveLeft( 0 );
+            if( r.right() > rect().right() )
+                r.moveRight( rect().right() );
+
+            item->move( r.x(), r.y() );
+            adjustedAnyItems = true;
+        }
+    }
+    if( adjustedAnyItems )
+    {
+        // Make sure the viewport isn't unnecessarily resized by now,
+        // then schedule a repaint to remove any garbage pixels.
+        resizeContents( width(), height() );
+        viewport()->update();
+    }
+
     if (QIconDrag::canDecode(e)) {
       emit iconMoved();
       if ( !m_autoAlign )    // if autoAlign, positions were saved in lineupIcons
Comment 13 FiNeX 2009-01-02 20:18:44 UTC
Bug closed. Kdesktop is no more mantained.