diff --git a/desktoplayout.cpp b/desktoplayout.cpp index d260f9001b..02070a9140 100644 --- a/desktoplayout.cpp +++ b/desktoplayout.cpp @@ -73,7 +73,7 @@ QPoint Workspace::desktopGridCoords( int id ) const { for( int y = 0; y < desktopGridSize_.height(); y++ ) for( int x = 0; x < desktopGridSize_.width(); x++ ) - if( desktopGrid_[y * desktopGridSize_.height() + x] == id ) + if( desktopGrid_[y * desktopGridSize_.width() + x] == id ) return QPoint( x, y ); return QPoint( -1, -1 ); }