Fix clipboard bugs

db4
Doug Coleman 2009-03-19 17:36:38 -05:00
parent e951fb773a
commit ebaf05f26b
2 changed files with 4 additions and 3 deletions

View File

@ -8,7 +8,8 @@ continuations ui.clipboards ui.commands ui.gadgets ui.gadgets.borders
ui.gadgets.buttons ui.gadgets.labels ui.gadgets.scrollers ui.gadgets.buttons ui.gadgets.labels ui.gadgets.scrollers
ui.gadgets.menus ui.gadgets.wrappers ui.render ui.pens.solid ui.gadgets.menus ui.gadgets.wrappers ui.render ui.pens.solid
ui.gadgets.line-support ui.text ui.gestures ui.baseline-alignment ui.gadgets.line-support ui.text ui.gestures ui.baseline-alignment
math.rectangles splitting unicode.categories fonts grouping ; math.rectangles splitting unicode.categories grouping ;
EXCLUDE: fonts => selection ;
IN: ui.gadgets.editors IN: ui.gadgets.editors
TUPLE: editor < line-gadget TUPLE: editor < line-gadget

View File

@ -26,7 +26,7 @@ TUPLE: x-clipboard atom contents ;
CurrentTime XConvertSelection drop ; CurrentTime XConvertSelection drop ;
: snarf-property ( prop-return -- string ) : snarf-property ( prop-return -- string )
dup *void* [ *void* ascii alien>string ] [ drop f ] if ; dup *void* [ *void* utf8 alien>string ] [ drop f ] if ;
: window-property ( win prop delete? -- string ) : window-property ( win prop delete? -- string )
[ [ dpy get ] 2dip 0 -1 ] dip AnyPropertyType [ [ dpy get ] 2dip 0 -1 ] dip AnyPropertyType
@ -37,7 +37,7 @@ TUPLE: x-clipboard atom contents ;
swap XSelectionEvent-property zero? [ swap XSelectionEvent-property zero? [
drop f drop f
] [ ] [
selection-property 1 window-property utf8 decode selection-property 1 window-property
] if ; ] if ;
: own-selection ( prop win -- ) : own-selection ( prop win -- )