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