File nautilus-fix-desktop-icon-smash.patch of Package nautilus

diff -Nura nautilus-3.20.1/libnautilus-private/nautilus-canvas-container.c nautilus-3.20.1_new/libnautilus-private/nautilus-canvas-container.c
--- nautilus-3.20.1/libnautilus-private/nautilus-canvas-container.c	2016-04-28 09:27:24.000000000 +0000
+++ nautilus-3.20.1_new/libnautilus-private/nautilus-canvas-container.c	2016-06-23 14:03:49.500258624 +0000
@@ -1824,7 +1824,8 @@
 				}
 				    
 				/* Check and see if we need to move to a new column */
-				if (y != DESKTOP_PAD_VERTICAL && y + icon_height_for_bound_check > height) {
+				if (y != DESKTOP_PAD_VERTICAL && y + icon_height_for_bound_check > height &&
+                                    height > 0 && total > 3) {
 					break;
 				}
 
@@ -1867,7 +1868,7 @@
 				/* Check and see if we need to move to a new column */
 				if (y != DESKTOP_PAD_VERTICAL && y > height - icon_height_for_bound_check &&
 				    /* Make sure we lay out at least one icon per column, to make progress */
-				    p != icons) {
+				    p != icons && height > 0 && total > 3) {
 					x += column_width + DESKTOP_PAD_HORIZONTAL;
 					break;
 				}
openSUSE Build Service is sponsored by