Bug 114766

Summary: Align icons to grid doesn´t work
Product: [Unmaintained] kdesktop Reporter: Michael Stather <kontakt>
Component: iconsAssignee: Benoit Walter <b.walter>
Status: CLOSED FIXED    
Severity: normal CC: artserg, finex, gilboad
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Michael Stather 2005-10-20 16:46:36 UTC
Version:           Unbekannt (using KDE 3.4.91 (beta1, >= 20050910) Level "a" , SUSE 10.0.42)
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.13.2-2-default

With my build of KDE, the "align to grid" feature doesn´t work any more. I´ve set it to enabled but I can align my icons  and they don´t snap to the grid. Disabling and reenabling doesn´t help either.
Comment 1 Jocke Andersson 2005-11-25 13:55:29 UTC
Same here.
I'm running KDE 3.5 RC1 in Kubuntu 5.10
Comment 2 Jocke Andersson 2005-11-25 14:11:50 UTC
Oops, my bad. I tried with another user and there it worked fine.
If you get this problem (re)move the ~/.kde/share/apps/kdesktop folder and the ~/.kde/share/config/kdesktoprc
(I removed both and then checked, so I don't know which one was causing the problem...)
Comment 3 Jocke Andersson 2005-11-25 14:48:33 UTC
First of all, sorry for spamming...
After examining this some more, I found out that it wasn't the config's fault, kdesktop seems to behave like kicker did until 3.5 RC2, it works if it's not started from kdeinit.
If you get this problem, try running "killall kdesktop && kdesktop" in some way ("run command" or konsole, for example). That makes it work for me at least.
Comment 4 Michael Stather 2005-11-25 14:54:19 UTC
So do you mean this is fixed in RC2.
If not I suggest not to search for workarounds but some developer to fix it.
Comment 5 Jocke Andersson 2005-11-26 08:58:38 UTC
I don't know if it's fixed in RC2 (I said hat kicker was).
This isn't a very good workaround either...
Comment 6 Jocke Andersson 2005-11-26 17:39:45 UTC
I've now tested RC2 (kubuntu's testing packages) and I still have this problem.
Comment 7 Jocke Andersson 2005-11-26 19:53:45 UTC
Blowing my .kde folder fixes this (so it's a config thing), but I don't want to do that.
Any ideas what in my .kde folder that can be the problem?
Comment 8 Jocke Andersson 2005-11-26 20:25:47 UTC
Some interesting facts(?):
* When  align to grid doesn't work, the dcop call lineupIcons doesn't either, so something prevents code from running somehow.
* Changing screen size makes align to grid work again.

I guess something makes the lineupIcons function unable to read the screen size, I wonder what...
Comment 9 Michael Stather 2005-11-30 18:53:03 UTC
This is still there with KDE 3.5 final
Comment 10 Florian Ehrenthal 2005-12-08 07:27:08 UTC
i'm experiancing this bug aswell, with my users config upgraded from 3.4.3
new users work.

deactivating && activating icons on the desktop fixes the problem for a single session, but afterwards align to grid won't work...
Comment 11 jakubpol 2005-12-08 23:04:37 UTC
Also experience this problem on 3.5.0 (align to grid doesn't work).
Comment 12 Jocke Andersson 2005-12-08 23:36:36 UTC
I finally solved this one (for me at least) If it works for you, the bug seems to be resolved. It seems to be a config thing, but knowing what caused it might tell the developers that there is some coding error, I don't know that part of the code, though.

Try the following:
1. Open  your kdeglobals file (`kde-config --localprefix`/share/config/kdeglobals, usually ~/.kde/share/config/kdeglobals) in a text editor, like kate.
2. There should be a [Section] called [$Version]. Remove all of it, until (NOT including) the next [Section]. (When I removed my kdeglobals file, the [$Version] section wasn't readded in the fresh version, so I guess it isn't needed.)
3. Save the file.
4. Logout and then login again.
5. Try moving desktop icons around. Does it work? Make sure "Align to Grid" is enabled, too... ;)

This worked for me, but I don't know very much about the KDE internals, so I can't guarantee it will work for you. Trying shouldn't hurt though, especially not if you make a backup copy of the kdeglobals file.
Comment 13 Clive Messer 2006-01-02 14:29:57 UTC
Fedora Core 4 with kde-redhat 3.5.0-4.0.fc4.kde.

After starting kde, I need to kill kdesktop and restart it to get 'align to grid' to work.
Comment 14 Ross Collins 2006-01-26 17:21:00 UTC
*** This bug has been confirmed by popular vote. ***
Comment 15 Ross Collins 2006-01-26 17:26:17 UTC
I'm experiencing the exact same behaviour as Clive (comment 13), also with Fedora Core 4 and KDE version:  3.5.0-0.4.fc4 Red Hat

Jocke's solution (comment 12) doesn't work for me.
Comment 16 Johannes Eberleh 2006-01-27 20:56:24 UTC
Perhaps this is the same bug as bug 116341.
Do you use a multihead environment? The synthoms from bug 116341 are very similar to this one.
Comment 17 Michael Stather 2006-01-27 22:50:39 UTC
I don´t use a miltihead environment.
Comment 18 Florian Ehrenthal 2006-01-28 00:14:55 UTC
i fixed the problem by erasing my kickerrc.
the cause was that kconf_update had problems with that very file (spawned a amazing amount of processes! and died when system ran out of mem).

now everything works as expected again.

so this seems to be an upgrade problem really
Comment 19 jakubpol 2006-01-28 10:33:09 UTC
Erasing my kickerrc seems to have fixed the issue with icons not aligning to grid (KDE 3.5 here).


Many thanks Florian.
Comment 20 jakubpol 2006-01-28 10:34:02 UTC
BTW, I also didn't use multihead and had the same problem as everbody here.
Comment 21 Clive Messer 2006-01-28 13:15:30 UTC
This does seem to be related to Xinerama. I run dual head with a 6800GT and the proprietary nvidia driver. Delete my kickerrc, stop X and restart, icons are aligned to grid. The problem is related to kpanel spanning both screens. ie. if I then configure the panel to span both screens and restart X the icons are no longer aligned to grid. (Configure kpanel -> Arrangement -> Screen -> Xinerama Screen -> All Screens) I can now reproduce this at will. For me it is solely related to whether the kpanel is set to span a single screen or both.
Comment 22 Michael Stather 2006-01-28 13:21:17 UTC
I fixed this also by deleting the kickerrc (I don´t use xinerama).
I attached it so the bug can be fixed.
Comment 23 Ross Collins 2006-02-14 19:27:20 UTC
In my case I didn't need to delete kickerrc completely.

I just had to replaced the Xinerama=-1 option in kickerrc with Xinerama=0

I don't use Xinerama.
Comment 24 Michael Stather 2006-03-11 11:12:29 UTC
I fixed it by deleting kickerrc, now it happened again.
The solution was also to replace Xinerama=-1 with Xinerama=0
So there must be a bug somewhere which saves the value wrong.
Now it´s IMHO time for one of the developers to fix it :)
Comment 25 Ross Collins 2006-03-11 11:40:13 UTC
Any chance you are also suffering from same, additional, bug as I am? Whenever I log in or out of KDE, for a brief second it displays a different wallpaper to one specified in my desktop settings. It just flashes up for a second and then returns to my normal wallpaper (if logging in) or to KDM/GDM (if logging out). I haven't quite yet got to the bottom of this one yet!

Ross
Comment 26 Christian Schuerer 2006-03-11 18:12:01 UTC
Changing Xinerama=-1 to Xinerama=0 in kickerrc solved this problem for me too.
Comment 27 Christian Schuerer 2006-04-13 20:11:29 UTC
Changing the Xinerama-Option in kickerrc is only a success for a short while. For some reasons, this options is set to "-1" again after some time. Couldn't figure out when this happens yet.
Are there any news on this bug?

Christian
Comment 28 Ross Collins 2006-04-13 20:14:22 UTC
Christian's right. Sometime this week my Xinerama setting also returned to "-1" and messed up my icons again!

Ross
Comment 29 giovanni 2006-04-26 07:09:07 UTC
Changing Xinerama=-1 to Xinerama=0 in kickerrc solved this problem for me too. pero cual sera la solucion real? 
Comment 30 Fabian Köster 2006-05-21 15:15:43 UTC
Same problem here with Kubuntu 'Dapper Drake' beta.

What graphic cards, respectively drivers do yo use? I have a nVidia 6600GT driven by the propietary nVidia-driver. Clive Messer also uses this driver. Can this possible cause the problem? So, anyone using other drivers?

I am not using multi-head environment.

This bug is related to the bug #45173 in ubuntu bug-database (https://launchpad.net/distros/ubuntu/+source/kdebase/+bug/45713)
Comment 31 Gilboa Davara 2006-05-21 18:09:11 UTC
nVidia binary drivers here.
Machine A: GF6800GT, Xinerama (CRT, TV)
Machine B: Quadro FX1400, Single head. (LCD)
Comment 32 Ross Collins 2006-05-24 09:49:10 UTC
I doubt it's a video driver related issue.

Mine's the standard Xorg Inteli810 driver.
Comment 33 Ross Collins 2006-06-19 21:25:56 UTC
I've spotted *when* the Xinerama setting is set to -1 in the kickerrc file, but I still don't know *why*.

I'm using a laptop with a native resolution of 1024x768, which I use at home, but at work it's plugged into an external monitor with a higher 1600x1200 resolution. Now occasionally when I log back into the laptop in it's native resolution the Xinerama setting has reverted back -1, and the desktop icons are no longer aligned. I've not seen this effect happen the other way around though, i.e. when I log in to the laptop with the external monitor connected.

Any ideas?
Comment 34 Dirk Mueller 2006-06-23 02:14:38 UTC
SVN commit 554047 by mueller:

fix align-to-grid option which regressed due to the startup performance
patches. 
BUG: 122001
BUG: 127672
BUG: 114766
BUG: 117952


 M  +9 -0      desktop.cc  


--- branches/KDE/3.5/kdebase/kdesktop/desktop.cc #554046:554047
@@ -735,6 +735,15 @@
     // hurra! kicker is alive
     if ( m_waitForKicker ) m_waitForKicker->stop();
 
+    // -2: all screens
+    // -1: primary screen
+    // else: screen number
+
+    if (screen <= -2)
+       screen = kdesktop_screen_number;
+    else if (screen == -1)
+       screen = kapp->desktop()->primaryScreen();
+
     if ( (screen == kdesktop_screen_number) && m_pIconView )
         m_pIconView->updateWorkArea(area);
 }
Comment 35 Markus Grob 2008-02-23 22:47:32 UTC
Bug is here again in KDE 4.0.1. Should I open a new bug, because it seems, that the problem is not the same?
Comment 36 FiNeX 2009-01-02 20:31:39 UTC
Bug closed. Kdesktop is no more mantained.