Bug 117868 - Desktop icons move down at each login due to child panel at top of screen
Summary: Desktop icons move down at each login due to child panel at top of screen
Alias: None
Product: kdesktop
Classification: Miscellaneous
Component: icons (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Benoit Walter
: 114921 (view as bug list)
Depends on:
Reported: 2005-12-07 16:21 UTC by Pat Double
Modified: 2009-01-02 20:31 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:

Relevant configuration files from my system (1.85 KB, application/x-tgz)
2007-05-16 00:23 UTC, Jani-Matti Hätinen

Note You need to log in before you can comment on or make changes to this bug.
Description Pat Double 2005-12-07 16:21:34 UTC
Version:           unknown (using KDE 3.5.0, Gentoo)
Compiler:          gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)
OS:                Linux (i686) release

I have kicker at the bottom and a child panel at the top. At each login my desktop icons move down by the height of the child panel. This bug was reported in 2004 and was supposedly fixed, but it is happening with me for KDE 3.5.0. Due to the age of the resolved bug I did not add a comment to it. Please see http://bugs.kde.org/show_bug.cgi?id=82800
Comment 1 J.O. Aho 2005-12-08 08:41:16 UTC
I do second this bug for KDE 3.5.0 (Didn't have this bug under KDE 3.4.x). 

GCC: gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)
Kernel: Linux version 2.6.14-gentoo-r2 (root@lai) (gcc version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)) #2 PREEMPT Thu Nov 24 23:03:24 CET 2005
Qt: 3.3.4
KDE: 3.5.0
KDE Panel: 3.5.0

Icon options:
- Sort Icons, Directories First
- Lock in Place

Comment 2 Sebastian Noa 2005-12-13 17:27:34 UTC
i can confirm this.

same behaviour here!
Comment 3 nine 2005-12-16 22:43:19 UTC
Can confirm this problem, too with the OpenSUSE KDE 3.5.0 Level "a" binaries. I have an External Taskbar at the lower left corner of the screen and after every login the icons on the desktop are moved to the right by it's width. Also I cannot move the icons to the left end of the screen, only to the right edge of the taskbar.
Comment 4 f00bar12 2005-12-17 00:29:47 UTC
Icons on my desktop move down with every restart, at least as many pixels as there are on my top-of-desktop child panel.  Extremely annoying, did not have this problem with 3.4.  Using kde-redhat RPM builds on CentOS 4.
Comment 5 Gunter Ohrner 2006-01-03 11:49:53 UTC
I can confirm this bug, it's the same bug as #118385 (https://bugs.kde.org/show_bug.cgi?id=118385). It completely messes up my desktop icon configuration... :-(
Comment 6 Martin Koller 2006-01-08 20:46:08 UTC
SVN commit 495736 by mkoller:

BUG: 117868
Avoid to move icons on desktop when a new panel is added in case
the icons will not be covered by it anyway.

 M  +25 -5     kdiconview.cc  

--- branches/KDE/3.5/kdebase/kdesktop/kdiconview.cc #495735:495736
@@ -150,6 +150,7 @@
     setResizeMode( Fixed );
+    setIconArea( desktopRect() );  // the default is the whole desktop
     // Initialise the shadow data objects...
     m_shadowEngine = new KShadowEngine(new KDesktopShadowSettings(KGlobal::config()));
@@ -1379,24 +1380,43 @@
     if ( iconArea() == wr ) return;  // nothing changed; avoid repaint/saveIconPosition ...
-    kdDebug(1204) << "KDIconView::updateWorkArea wr: " << wr.x() << "," << wr.y()
-              << " " << wr.width() << "x" << wr.height() << endl;
     QRect oldArea = iconArea();
     setIconArea( wr );
+    kdDebug(1204) << "KDIconView::updateWorkArea wr: " << wr.x() << "," << wr.y()
+              << " " << wr.width() << "x" << wr.height() << endl;
+    kdDebug(1204) << "  oldArea:                     " << oldArea.x() << "," << oldArea.y()
+              << " " << oldArea.width() << "x" << oldArea.height() << endl;
     if ( m_autoAlign )
     else {
         bool needRepaint = false;
         QIconViewItem* item;
         int dx, dy;
         dx = wr.left() - oldArea.left();
         dy = wr.top() - oldArea.top();
         if ( dx != 0 || dy != 0 ) {
-            needRepaint = true;
-            for ( item = firstItem(); item; item = item->nextItem() )
-                item->moveBy( dx, dy );
+          if ( (dx > 0) || (dy > 0) ) // the iconArea was shifted right/down; less space now
+              for ( item = firstItem(); item; item = item->nextItem() ) {
+                  // check if there is any item inside the now unavailable area
+                  // If so, we have to move _all_ items
+                  // If not, we don't have to move any item (avoids bug:117868)
+                  if ( (item->x() < wr.x()) || (item->y() < wr.y()) ) {
+                    needRepaint = true;
+                    break;
+                  }
+              }
+          else  // the iconArea was shifted left/up; more space now - use it
+              needRepaint = true;
+            if ( needRepaint )
+                for ( item = firstItem(); item; item = item->nextItem() )
+                    item->moveBy( dx, dy );
         for ( item = firstItem(); item; item = item->nextItem() ) {
             QRect r( item->rect() );
             int dx = 0, dy = 0;
Comment 7 Martin Koller 2006-01-08 21:28:18 UTC
*** Bug 114921 has been marked as a duplicate of this bug. ***
Comment 8 Gunter Ohrner 2006-02-01 11:51:18 UTC
I just updated to KDE 3.5.1 and it's not really fixed for me. I have an auto-hidden taskbar in the top left corner and all icons stay away from the area the taskbar would occupy if it was not hidden.

Is this a different bug? Anyhow, KDE 3.5.1 made no improvements for me in this respect. :-(
Comment 9 Philipp Sternberg 2006-02-07 16:24:25 UTC
Hi guys, there seem to be several reports commenting on icons loosing their position if child panels are used. However they are all slightly different. The above described problem applies perfctly to what i can see after logging in on my desktop except of icons moving up and not down.(using Debian Sid KDE 3.5.1 packages)

Here a short list of bugs which seem to be related to this, which are not marked as duplicates but as resolved bugs:

Bug 103985: icons move to upper left corner (appaerently no child panel used)
Bug 82800: (same description, as already mentioned above)
Bug 47627: many comments describing various similar problems (exists since 2002-09-08 !!!)
Bug 91575: same problem as described here

Sorry to Martin Koller, Benoit Walter and David Faure who obviously put a lot of work in these things, this bug seems to be a realy tough one.

By the way accroding to J.R.R Gott's forumla, to calucalte how long things will still exist, this bug will live at least another 32 days or at most another 133 years and some 93 days with a probability of 95% if you take 2002-09-08 as the very opening date of this bug....let's hope that the real time to solve this is nearer to the 32 days than to 133 years....
Comment 10 J.O. Aho 2006-02-07 19:33:40 UTC
@Philipp Sternberg

I guess it's difficult to describe the problem in an universal way that everyone would think is a logical description, which makes there are many bugs that describes the problem and it can make it more difficult for the devels to figure it out.

Now of late my icons has been quite still.

I have now "Align to Grid" and "Lock in Place" enabled, the icons stopped at the grid just belove the top panel. Hiding the pannel won't move the icons (good).
I'm thinking of upgrading to the monolithic kde 3.5.1, not sure if things will work the same way as in the modular kde 3.5.0.
Comment 11 Andrew Matta 2007-01-06 05:48:18 UTC
Similar things happen for me on Debian Testing with KDE 3.5.5, I have a small panel on the bottom and one auto-hiding panel each on the left and top. If I manually arrange the icons on the desktop, log out, and log back in it shuffles them around. I assume that the panels have something to do with it but it doesn't just shift icons up or down it actually rearranges them sometimes. Over time the original columns have turned in to a sort of triangle in the upper left corner of the screen. It is extremely annoying.

What would be great is if when the user selects the "Lock In Place" option (or add a new option such as "Save Current Layout"), the desktop would record the locations of all the icons and save that configuration. When panels appear and resolutions change it might rearrange icons temporarily, but it should keep the original locked configuration. Every time resolution or panel configurations change it should attempt to lay out the icons as close to the original pattern as possible. In other words, always retain the original layout, when the original layout is not possible adjust it as needed for the moment, then each time the space given to the icons on the desktop changes repeat the process (Load original layout again, modify temporarily if necessary).
Comment 12 Jani-Matti Hätinen 2007-05-16 00:16:57 UTC
I can confirm that this (or something similar) still happens with KDE-3.5.6.

I'm running Gentoo with the following package versions:

I have a static panel at the bottom of the screen and an additional auto-hidin panel at the left edge of the screen. Furthermore I've set my desktop icons to Align to grid and to not be locked in place.

Whenever I log in (or kill and start kicker) the icons on my desktop move one step to the right.
Comment 13 Jani-Matti Hätinen 2007-05-16 00:23:50 UTC
Created attachment 20578 [details]
Relevant configuration files from my system

Attached are the configuration files for kdesktop, kicker and the child panel I
mentioned. These are taken straight out of my system with no modifications.

Please tell me if you need other config files to reproduce this issue.
Comment 14 Drew Kraus 2008-11-06 18:52:45 UTC
*** This bug has been confirmed by popular vote. ***
Comment 15 FiNeX 2009-01-02 20:31:57 UTC
Bug closed. Kdesktop is no more mantained.