TARGETS list is now properly assembled

This commit is contained in:
Sasha Koshka 2023-03-30 18:32:14 -04:00
parent 017543aa0f
commit a16f3c2cd7
2 changed files with 1 additions and 2 deletions

View File

@ -264,7 +264,6 @@ func (window *window) handleSelectionRequest (
connection *xgbutil.XUtil, connection *xgbutil.XUtil,
event xevent.SelectionRequestEvent, event xevent.SelectionRequestEvent,
) { ) {
println("got sel req")
if window.selectionClaim == nil { return } if window.selectionClaim == nil { return }
window.selectionClaim.handleSelectionRequest(connection, event) window.selectionClaim.handleSelectionRequest(connection, event)
} }

View File

@ -144,7 +144,7 @@ func (claim *selectionClaim) handleSelectionRequest (
for index, name := range targetNames { for index, name := range targetNames {
atom, err := xprop.Atm(claim.window.backend.connection, name) atom, err := xprop.Atm(claim.window.backend.connection, name)
if err != nil { die(); return } if err != nil { die(); return }
xgb.Put32(data[:(index + 1) * 4], uint32(atom)) xgb.Put32(data[(index) * 4:], uint32(atom))
} }
claim.window.fulfillSelectionRequest(data, 8, event) claim.window.fulfillSelectionRequest(data, 8, event)