ui.backend.cocoa.views: unregister window from notification instead of in -dealloc, fixing flakiness of show-listener/show-browser words
							parent
							
								
									1a94ce5927
								
							
						
					
					
						commit
						a74de80bb0
					
				| 
						 | 
					@ -138,8 +138,8 @@ CONSTANT: selector>action H{
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: validate-action ( world selector -- ? validated? )
 | 
					: validate-action ( world selector -- ? validated? )
 | 
				
			||||||
    selector>action at 
 | 
					    selector>action at
 | 
				
			||||||
    [ swap world-focus parents-handle-gesture? t ] [ drop f f ] if* ; 
 | 
					    [ swap world-focus parents-handle-gesture? t ] [ drop f f ] if* ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CLASS: {
 | 
					CLASS: {
 | 
				
			||||||
    { +superclass+ "NSOpenGLView" }
 | 
					    { +superclass+ "NSOpenGLView" }
 | 
				
			||||||
| 
						 | 
					@ -305,8 +305,6 @@ CLASS: {
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
! "rotateWithEvent:" void { id SEL id }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{ "acceptsFirstResponder" char { id SEL }
 | 
					{ "acceptsFirstResponder" char { id SEL }
 | 
				
			||||||
    [ 2drop 1 ]
 | 
					    [ 2drop 1 ]
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -408,10 +406,9 @@ CLASS: {
 | 
				
			||||||
{ "dealloc" void { id SEL }
 | 
					{ "dealloc" void { id SEL }
 | 
				
			||||||
    [
 | 
					    [
 | 
				
			||||||
        drop
 | 
					        drop
 | 
				
			||||||
        [ unregister-window ]
 | 
					 | 
				
			||||||
        [ remove-observer ]
 | 
					        [ remove-observer ]
 | 
				
			||||||
        [ SUPER-> dealloc ]
 | 
					        [ SUPER-> dealloc ]
 | 
				
			||||||
        tri
 | 
					        bi
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
} ;
 | 
					} ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -446,8 +443,8 @@ CLASS: {
 | 
				
			||||||
    [
 | 
					    [
 | 
				
			||||||
        forget-rollover
 | 
					        forget-rollover
 | 
				
			||||||
        2nip -> object -> contentView
 | 
					        2nip -> object -> contentView
 | 
				
			||||||
        dup -> isInFullScreenMode zero? 
 | 
					        dup -> isInFullScreenMode 0 =
 | 
				
			||||||
        [ window unfocus-world ]
 | 
					        [ window [ unfocus-world ] when* ]
 | 
				
			||||||
        [ drop ] if
 | 
					        [ drop ] if
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -460,7 +457,8 @@ CLASS: {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{ "windowWillClose:" void { id SEL id }
 | 
					{ "windowWillClose:" void { id SEL id }
 | 
				
			||||||
    [
 | 
					    [
 | 
				
			||||||
        2nip -> object -> contentView window ungraft
 | 
					        2nip -> object -> contentView
 | 
				
			||||||
 | 
					        [ window ungraft ] [ unregister-window ] bi
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
} ;
 | 
					} ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue