Remove two rot usages from UI
parent
5aec661b92
commit
9bf2675fa3
|
@ -177,27 +177,25 @@ M: world selection-request-event
|
||||||
} cond ;
|
} cond ;
|
||||||
|
|
||||||
M: x11-ui-backend (close-window) ( handle -- )
|
M: x11-ui-backend (close-window) ( handle -- )
|
||||||
dup xic>> XDestroyIC
|
[ xic>> XDestroyIC ]
|
||||||
dup glx>> destroy-glx
|
[ glx>> destroy-glx ]
|
||||||
window>> dup unregister-window
|
[ window>> [ unregister-window ] [ destroy-window ] bi ]
|
||||||
destroy-window ;
|
tri ;
|
||||||
|
|
||||||
M: world client-event
|
M: world client-event
|
||||||
swap close-box? [ ungraft ] [ drop ] if ;
|
swap close-box? [ ungraft ] [ drop ] if ;
|
||||||
|
|
||||||
: gadget-window ( world -- )
|
: gadget-window ( world -- )
|
||||||
dup window-loc>> over rect-dim glx-window
|
[ [ window-loc>> ] [ dim>> ] bi glx-window ]
|
||||||
over "Factor" create-xic rot <x11-handle>
|
[ "Factor" create-xic ]
|
||||||
2dup window>> register-window
|
[ ] tri <x11-handle>
|
||||||
>>handle drop ;
|
[ window>> register-window ] [ >>handle drop ] 2bi ;
|
||||||
|
|
||||||
: wait-event ( -- event )
|
: wait-event ( -- event )
|
||||||
QueuedAfterFlush events-queued 0 > [
|
QueuedAfterFlush events-queued 0 > [
|
||||||
next-event dup
|
next-event dup
|
||||||
None XFilterEvent zero? [ drop wait-event ] unless
|
None XFilterEvent 0 = [ drop wait-event ] unless
|
||||||
] [
|
] [ ui-wait wait-event ] if ;
|
||||||
ui-wait wait-event
|
|
||||||
] if ;
|
|
||||||
|
|
||||||
M: x11-ui-backend do-events
|
M: x11-ui-backend do-events
|
||||||
wait-event dup XAnyEvent-window window dup
|
wait-event dup XAnyEvent-window window dup
|
||||||
|
|
|
@ -137,7 +137,7 @@ TUPLE: gradient < caching-pen colors last-vertices last-colors ;
|
||||||
:: gradient-vertices ( direction dim colors -- seq )
|
:: gradient-vertices ( direction dim colors -- seq )
|
||||||
direction dim v* dim over v- swap
|
direction dim v* dim over v- swap
|
||||||
colors length dup 1- v/n [ v*n ] with map
|
colors length dup 1- v/n [ v*n ] with map
|
||||||
[ dup rot v+ 2array ] with map
|
swap [ over v+ 2array ] curry map
|
||||||
concat concat >float-array ;
|
concat concat >float-array ;
|
||||||
|
|
||||||
: gradient-colors ( colors -- seq )
|
: gradient-colors ( colors -- seq )
|
||||||
|
|
Loading…
Reference in New Issue