From d0825f05159100caec1bec90be6c0321aa2c5ee9 Mon Sep 17 00:00:00 2001 From: Lucas Murray Date: Mon, 16 Feb 2009 04:12:14 +0000 Subject: [PATCH] Fixed desktopAbove/Below/ToLeft/ToRight() coordinate detection. Prevents crashing when usign spatial desktop switching. svn path=/trunk/KDE/kdebase/workspace/; revision=926754 --- desktoplayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); }