clipboard: wrap vstring call in unsafe (#6170)
parent
e6e1011e47
commit
88bca9d17a
|
@ -309,8 +309,10 @@ fn (mut cb Clipboard) start_listener(){
|
||||||
C.XDeleteProperty(event.xselection.display, event.xselection.requestor, event.xselection.property)
|
C.XDeleteProperty(event.xselection.display, event.xselection.requestor, event.xselection.property)
|
||||||
if cb.is_supported_target(prop.actual_type) {
|
if cb.is_supported_target(prop.actual_type) {
|
||||||
cb.got_text = true
|
cb.got_text = true
|
||||||
|
unsafe {
|
||||||
cb.text = byteptr(prop.data).vstring() //TODO: return byteptr to support other mimetypes
|
cb.text = byteptr(prop.data).vstring() //TODO: return byteptr to support other mimetypes
|
||||||
}
|
}
|
||||||
|
}
|
||||||
cb.mutex.unlock()
|
cb.mutex.unlock()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue