From dc0022cf51ad8991352cf1ec7993eabe539b9af6 Mon Sep 17 00:00:00 2001 From: nico Date: Tue, 12 Dec 2000 18:45:22 +0000 Subject: [PATCH] Do not draw in deferred windows git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8311 72102866-910b-0410-8b05-ffd578937521 --- Source/NSMenuItemCell.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Source/NSMenuItemCell.m b/Source/NSMenuItemCell.m index ab9f42367..389cb8550 100644 --- a/Source/NSMenuItemCell.m +++ b/Source/NSMenuItemCell.m @@ -543,6 +543,10 @@ static NSImage *arrowImageH = nil; if (NSIsEmptyRect(cellFrame)) return; + // Do nothing if the window is deferred + if ([[controlView window] gState] == 0) + return; + [controlView lockFocus]; // Draw the border if needed @@ -563,6 +567,14 @@ static NSImage *arrowImageH = nil; if (_buttoncell_is_transparent) return; + // Do nothing if the cell frame is empty + if (NSIsEmptyRect(cellFrame)) + return; + + // Do nothing if the window is deferred + if ([[controlView window] gState] == 0) + return; + cellFrame = [self drawingRectForBounds: cellFrame]; // Pushed in buttons contents are displaced to the bottom right 1px