1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

fix warnings about clipboard when building ui on linux

This commit is contained in:
Delyan Angelov 2020-01-13 18:53:56 +02:00 committed by Alexander Medvednikov
parent 4c55d3677d
commit 4a82770f16

View File

@ -137,7 +137,7 @@ fn new_x11_clipboard(selection atom_type) &Clipboard {
if display == C.NULL {
println("ERROR: No X Server running. Clipboard cannot be used.")
return &Clipboard{}
return &Clipboard{ display: 0 }
}
mut cb := &Clipboard{
@ -257,7 +257,7 @@ fn (cb mut Clipboard) start_listener(){
}
C.SelectionRequest {
if event.xselectionrequest.selection == cb.selection {
mut xsre := &XSelectionRequestEvent{}
mut xsre := &XSelectionRequestEvent{ display: 0 }
xsre = &event.xselectionrequest
mut xse := XSelectionEvent{
@ -361,8 +361,6 @@ fn (cb &Clipboard) pick_target(prop Property) Atom {
//This is higher than the maximum priority.
mut priority := math.max_i32
supported_targets := cb.get_supported_targets()
for i := 0; i < prop.nitems; i++ {
//See if this data type is allowed and of higher priority (closer to zero)
//than the present one.