diff --git a/TODO b/TODO index 866272f..7b0fc09 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ -* Continue rebasing from e3b13a3923cbe3e46c231b4f2817d2f0cabb58f9 +* Continue rebasing from 98d94808f26240a1e7af77513a146cc9c2a870fd * Add a focus listener interface. * Make focus apply synchronously. * Graphics and input objects for DirectX. diff --git a/src/graphics.cpp b/src/graphics.cpp index 8061b51..c38f716 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -74,6 +74,14 @@ namespace gcn bool Graphics::pushClipArea(Rectangle area) { + // Ignore area with a negative width or height + // by simple pushing an empty clip area to the stack. + if (area.width < 0 || area.height < 0) + { + ClipRectangle carea; + mClipStack.push(carea); + return true; + } if (mClipStack.empty()) { ClipRectangle carea;