diff --git a/effects/desktopgrid/desktopgrid.cpp b/effects/desktopgrid/desktopgrid.cpp index b7512a17c8..0bb4245eca 100644 --- a/effects/desktopgrid/desktopgrid.cpp +++ b/effects/desktopgrid/desktopgrid.cpp @@ -809,7 +809,7 @@ void DesktopGridEffect::setup() gridSize = effects->desktopGridSize(); break; case LayoutAutomatic: - y = sqrt( numDesktops ) + 0.5; + y = sqrt( float( numDesktops ) ) + 0.5; x = float( numDesktops ) / float( y ) + 0.5; if( x * y < numDesktops ) x++;