[gnome-shell] Fix negative height request in WellGrid
- From: Siegfried-Angel Gevatter Pujals <sgevatter src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Fix negative height request in WellGrid
- Date: Sun, 9 Aug 2009 01:37:03 +0000 (UTC)
commit 4495f98dcec83c2726cedf9aba5afd3c1d97ddea
Author: Siegfried-Angel Gevatter Pujals <rainct ubuntu com>
Date: Sun Aug 9 03:34:35 2009 +0200
Fix negative height request in WellGrid
When WellGrid had no child it was doing a division by zero,
which screwed up the calculation for the height request and
having it ask for a negative number. This commit fixes this
by always requesting 0 in this case.
js/ui/appDisplay.js | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index f992404..1558f71 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -686,6 +686,8 @@ WellGrid.prototype = {
let columnsNatural;
let i;
let children = this._getItemChildren();
+ if (children.length == 0)
+ return [0, WELL_DEFAULT_COLUMNS, 0, 0];
let nColumns;
if (children.length < WELL_DEFAULT_COLUMNS)
nColumns = children.length;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]