From a74de80bb075d305367ac74c3f0c1d0b0aef1e99 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 19 Jun 2010 18:12:56 -0400 Subject: [PATCH] ui.backend.cocoa.views: unregister window from notification instead of in -dealloc, fixing flakiness of show-listener/show-browser words --- basis/ui/backend/cocoa/views/views.factor | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/basis/ui/backend/cocoa/views/views.factor b/basis/ui/backend/cocoa/views/views.factor index 331f26aa32..163be4e208 100644 --- a/basis/ui/backend/cocoa/views/views.factor +++ b/basis/ui/backend/cocoa/views/views.factor @@ -138,8 +138,8 @@ CONSTANT: selector>action H{ } : validate-action ( world selector -- ? validated? ) - selector>action at - [ swap world-focus parents-handle-gesture? t ] [ drop f f ] if* ; + selector>action at + [ swap world-focus parents-handle-gesture? t ] [ drop f f ] if* ; CLASS: { { +superclass+ "NSOpenGLView" } @@ -305,8 +305,6 @@ CLASS: { ] } -! "rotateWithEvent:" void { id SEL id }} - { "acceptsFirstResponder" char { id SEL } [ 2drop 1 ] } @@ -408,10 +406,9 @@ CLASS: { { "dealloc" void { id SEL } [ drop - [ unregister-window ] [ remove-observer ] [ SUPER-> dealloc ] - tri + bi ] } ; @@ -446,8 +443,8 @@ CLASS: { [ forget-rollover 2nip -> object -> contentView - dup -> isInFullScreenMode zero? - [ window unfocus-world ] + dup -> isInFullScreenMode 0 = + [ window [ unfocus-world ] when* ] [ drop ] if ] } @@ -460,7 +457,8 @@ CLASS: { { "windowWillClose:" void { id SEL id } [ - 2nip -> object -> contentView window ungraft + 2nip -> object -> contentView + [ window ungraft ] [ unregister-window ] bi ] } ;