use change-global in a couple of places, formatting

db4
U-C4\Administrator 2009-05-10 14:24:13 -05:00
parent 23e3c55d2f
commit 5e07dc04a5
1 changed files with 9 additions and 6 deletions

View File

@ -616,19 +616,21 @@ M: windows-ui-backend do-events
GetDoubleClickTime milliseconds double-click-timeout set-global ; GetDoubleClickTime milliseconds double-click-timeout set-global ;
: cleanup-win32-ui ( -- ) : cleanup-win32-ui ( -- )
class-name-ptr get-global [ dup f UnregisterClass drop free ] when* class-name-ptr [
msg-obj get-global [ free ] when* [ [ f UnregisterClass drop ] [ free ] bi ] when* f
f class-name-ptr set-global ] change-global
f msg-obj set-global ; msg-obj change-global [ [ free ] when* f ] ;
: get-dc ( world -- ) handle>> dup hWnd>> GetDC dup win32-error=0/f >>hDC drop ; : get-dc ( world -- )
handle>> dup hWnd>> GetDC dup win32-error=0/f >>hDC drop ;
: get-rc ( world -- ) : get-rc ( world -- )
handle>> dup hDC>> dup wglCreateContext dup win32-error=0/f handle>> dup hDC>> dup wglCreateContext dup win32-error=0/f
[ wglMakeCurrent win32-error=0/f ] keep >>hRC drop ; [ wglMakeCurrent win32-error=0/f ] keep >>hRC drop ;
: set-pixel-format ( pixel-format hdc -- ) : set-pixel-format ( pixel-format hdc -- )
swap handle>> "PIXELFORMATDESCRIPTOR" <c-object> SetPixelFormat win32-error=0/f ; swap handle>>
"PIXELFORMATDESCRIPTOR" <c-object> SetPixelFormat win32-error=0/f ;
: setup-gl ( world -- ) : setup-gl ( world -- )
[ get-dc ] keep [ get-dc ] keep
@ -715,6 +717,7 @@ M: windows-ui-backend beep ( -- )
M: windows-ui-backend (grab-input) ( handle -- ) M: windows-ui-backend (grab-input) ( handle -- )
0 ShowCursor drop 0 ShowCursor drop
hWnd>> client-area>RECT ClipCursor drop ; hWnd>> client-area>RECT ClipCursor drop ;
M: windows-ui-backend (ungrab-input) ( handle -- ) M: windows-ui-backend (ungrab-input) ( handle -- )
drop drop
f ClipCursor drop f ClipCursor drop