Bootstrap fix, stop event loop after all windows closed, start UI by default if $DISPLAY is set

slava 2006-03-22 07:39:36 +00:00
parent 3f4907c304
commit 7570b189cf
3 changed files with 6 additions and 4 deletions

View File

@ -46,8 +46,10 @@ GENERIC: client-event ( event window -- )
} cond ;
: event-loop ( -- )
wait-event dup XAnyEvent-window windows get hash dup
[ handle-event ] [ 2drop ] if event-loop ;
windows get hash-empty? [
wait-event dup XAnyEvent-window windows get hash dup
[ handle-event ] [ 2drop ] if event-loop
] unless ;
: char-array>string ( n <char-array> -- string )
swap >string [ swap char-nth ] map-with ;

View File

@ -8,8 +8,8 @@ USING: kernel parser words compiler sequences ;
"/library/x11/constants.factor"
"/library/x11/utilities.factor"
"/library/x11/events.factor"
"/library/x11/windows.factor"
"/library/x11/glx-utils.factor"
"/library/x11/windows.factor"
"/library/x11/ui.factor"
} [ run-resource ] each

View File

@ -121,4 +121,4 @@ IN: shells
IN: kernel
! : default-shell "DISPLAY" os-env empty? "tty" "ui" ? ;
: default-shell "DISPLAY" os-env empty? "tty" "ui" ? ;