From 849ad5af851fc5bfe75e76cdd0bac44e5f9ec6dd Mon Sep 17 00:00:00 2001 From: "yangsu@google.com" Date: Tue, 30 Aug 2011 15:27:57 +0000 Subject: Fixed key handling code in Mac SampleApp git-svn-id: http://skia.googlecode.com/svn/trunk@2192 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/utils/mac/SkNSView.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utils') diff --git a/src/utils/mac/SkNSView.mm b/src/utils/mac/SkNSView.mm index 5d1ec3a60b..a21a4bb56e 100644 --- a/src/utils/mac/SkNSView.mm +++ b/src/utils/mac/SkNSView.mm @@ -156,7 +156,7 @@ static SkKey raw2key(UInt32 raw) } - (void)keyDown:(NSEvent *)event { - if (NULL != fWind) + if (NULL == fWind) return; SkKey key = raw2key([event keyCode]); @@ -169,7 +169,7 @@ static SkKey raw2key(UInt32 raw) } - (void)keyUp:(NSEvent *)event { - if (NULL != fWind) + if (NULL == fWind) return; SkKey key = raw2key([event keyCode]); -- cgit v1.2.3