Selection bug fixes
parent
72485f5fcb
commit
9562d06068
|
@ -6,7 +6,7 @@ IN: x11
|
||||||
! This code was inspired by McCLIM's Backends/CLX/port.lisp.
|
! This code was inspired by McCLIM's Backends/CLX/port.lisp.
|
||||||
|
|
||||||
: selection-property ( -- n )
|
: selection-property ( -- n )
|
||||||
dpy get "org.factorcode.Factor.SELECTION" f XInternAtom ;
|
dpy get "org.factorcode.Factor.SELECTION" 0 XInternAtom ;
|
||||||
|
|
||||||
: convert-selection ( win -- n )
|
: convert-selection ( win -- n )
|
||||||
>r dpy get XA_PRIMARY XA_STRING selection-property r>
|
>r dpy get XA_PRIMARY XA_STRING selection-property r>
|
||||||
|
@ -16,10 +16,10 @@ IN: x11
|
||||||
swap *ulong zero? [ drop f ] [ *char* ] if ;
|
swap *ulong zero? [ drop f ] [ *char* ] if ;
|
||||||
|
|
||||||
: window-property ( win prop delete? -- string )
|
: window-property ( win prop delete? -- string )
|
||||||
>r >r >r dpy get r> r> 0 -1 r> AnyProperty
|
>r dpy get -rot 0 -1 r> AnyProperty
|
||||||
0 <Atom> 0 <int> 0 <ulong> 0 <ulong> f <void*>
|
0 <Atom> 0 <int> 0 <ulong> 0 <ulong> f <void*>
|
||||||
[ XGetWindowProperty drop ] 2keep snarf-property ;
|
[ XGetWindowProperty ] 2keep snarf-property ;
|
||||||
|
|
||||||
: selection-from-event ( event -- string )
|
: selection-from-event ( event -- string )
|
||||||
dup XSelectionEvent-property zero?
|
dup XSelectionEvent-property zero?
|
||||||
[ drop f ] [ selection-property t window-property ] if ;
|
[ drop f ] [ selection-property 1 window-property ] if ;
|
||||||
|
|
Loading…
Reference in New Issue