mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
This commit is contained in:
@ -330,7 +330,7 @@ fn (mut cb Clipboard) start_listener() {
|
|||||||
property: xsre.property
|
property: xsre.property
|
||||||
}
|
}
|
||||||
if !cb.transmit_selection(&xse) {
|
if !cb.transmit_selection(&xse) {
|
||||||
xse.property = new_atom(0)
|
xse.property = Atom(0)
|
||||||
}
|
}
|
||||||
C.XSendEvent(cb.display, xse.requestor, 0, C.PropertyChangeMask, voidptr(&xse))
|
C.XSendEvent(cb.display, xse.requestor, 0, C.PropertyChangeMask, voidptr(&xse))
|
||||||
C.XFlush(cb.display)
|
C.XFlush(cb.display)
|
||||||
@ -479,10 +479,6 @@ fn (cb &Clipboard) get_supported_targets() []Atom {
|
|||||||
return cb.get_atoms(AtomType.utf8_string, .xa_string, .text, .text_plain, .text_html)
|
return cb.get_atoms(AtomType.utf8_string, .xa_string, .text, .text_plain, .text_html)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn new_atom(value int) &Atom {
|
|
||||||
return unsafe { &Atom(&u64(u64(value))) }
|
|
||||||
}
|
|
||||||
|
|
||||||
fn create_xwindow(display &C.Display) Window {
|
fn create_xwindow(display &C.Display) Window {
|
||||||
n := C.DefaultScreen(display)
|
n := C.DefaultScreen(display)
|
||||||
return C.XCreateSimpleWindow(display, C.RootWindow(display, n), 0, 0, 1, 1, 0, C.BlackPixel(display,
|
return C.XCreateSimpleWindow(display, C.RootWindow(display, n), 0, 0, 1, 1, 0, C.BlackPixel(display,
|
||||||
|
Reference in New Issue
Block a user