From a16f3c2cd7bef96766f008a125c615ab3e27b948 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Thu, 30 Mar 2023 18:32:14 -0400 Subject: [PATCH] TARGETS list is now properly assembled --- backends/x/event.go | 1 - backends/x/selectionclaim.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/backends/x/event.go b/backends/x/event.go index 58c6cf4..53552d4 100644 --- a/backends/x/event.go +++ b/backends/x/event.go @@ -264,7 +264,6 @@ func (window *window) handleSelectionRequest ( connection *xgbutil.XUtil, event xevent.SelectionRequestEvent, ) { - println("got sel req") if window.selectionClaim == nil { return } window.selectionClaim.handleSelectionRequest(connection, event) } diff --git a/backends/x/selectionclaim.go b/backends/x/selectionclaim.go index f3e0b6e..2ccb0b6 100644 --- a/backends/x/selectionclaim.go +++ b/backends/x/selectionclaim.go @@ -144,7 +144,7 @@ func (claim *selectionClaim) handleSelectionRequest ( for index, name := range targetNames { atom, err := xprop.Atm(claim.window.backend.connection, name) 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)