]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.backend.windows: warn instead of trying to get hWnd>> from f
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 8 May 2023 01:45:02 +0000 (20:45 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 13 May 2023 01:35:42 +0000 (20:35 -0500)
Fixes #2635

basis/ui/backend/windows/windows.factor

index bd674a594a9850ebd5f55b2ac109e650bbb2f86a..0d6d31bd7a4e3bfe41b9ed05efd911ca4083f61b 100644 (file)
@@ -827,9 +827,14 @@ M: windows-ui-backend (set-fullscreen)
     [ enter-fullscreen ] [ exit-fullscreen ] if ;
 
 M: windows-ui-backend (fullscreen?)
-    handle>> hWnd>>
-    [ hwnd>RECT ] [ fullscreen-RECT ] bi
-    [ get-RECT-dimensions 2array 2nip ] same? ;
+    handle>> [
+        hWnd>>
+        [ hwnd>RECT ] [ fullscreen-RECT ] bi
+        [ get-RECT-dimensions 2array 2nip ] same?
+    ] [
+        [ "windows-ui-backend no hWnd" print ] with-global
+        f
+    ] if* ;
 
 M:: windows-ui-backend resize-window ( world dim -- )
     world handle>> hWnd>>