Don't split window quads which have a size of zero. This should prevent crashes due to assert failing.
BUG: 177927 svn path=/trunk/KDE/kdebase/workspace/; revision=897801
This commit is contained in:
parent
84c28985fb
commit
fe9092dd89
1 changed files with 10 additions and 0 deletions
|
@ -597,6 +597,11 @@ WindowQuadList WindowQuadList::splitAtX( double x ) const
|
||||||
ret.append( quad );
|
ret.append( quad );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if( quad.left() == quad.right() ) // quad has no size
|
||||||
|
{
|
||||||
|
ret.append( quad );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
ret.append( quad.makeSubQuad( quad.left(), quad.top(), x, quad.bottom()));
|
ret.append( quad.makeSubQuad( quad.left(), quad.top(), x, quad.bottom()));
|
||||||
ret.append( quad.makeSubQuad( x, quad.top(), quad.right(), quad.bottom()));
|
ret.append( quad.makeSubQuad( x, quad.top(), quad.right(), quad.bottom()));
|
||||||
}
|
}
|
||||||
|
@ -628,6 +633,11 @@ WindowQuadList WindowQuadList::splitAtY( double y ) const
|
||||||
ret.append( quad );
|
ret.append( quad );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if( quad.top() == quad.bottom() ) // quad has no size
|
||||||
|
{
|
||||||
|
ret.append( quad );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
ret.append( quad.makeSubQuad( quad.left(), quad.top(), quad.right(), y ));
|
ret.append( quad.makeSubQuad( quad.left(), quad.top(), quad.right(), y ));
|
||||||
ret.append( quad.makeSubQuad( quad.left(), y, quad.right(), quad.bottom()));
|
ret.append( quad.makeSubQuad( quad.left(), y, quad.right(), quad.bottom()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue