aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2025-11-30 18:57:33 +0100
committerPřemysl Eric Janouch <p@janouch.name>2025-11-30 19:01:46 +0100
commit9bbe70de8577263ff5811aad6f110f59ecac6ba6 (patch)
tree48e87a8791bcd1675fdcc02fe61be582fd135d42
parent486b58525fc5ec7658b7c90f0179ea3d112d0ca4 (diff)
downloadhaven-9bbe70de8577263ff5811aad6f110f59ecac6ba6.tar.gz
haven-9bbe70de8577263ff5811aad6f110f59ecac6ba6.tar.xz
haven-9bbe70de8577263ff5811aad6f110f59ecac6ba6.zip
hpcu: respond to CurrentTime as wellorigin/master
A fresh problem with VIM. X11 documentation appears to claim that this is valid, as is using CurrentTime in the response.
-rw-r--r--hpcu/main.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/hpcu/main.go b/hpcu/main.go
index 3508f63..68d65b2 100644
--- a/hpcu/main.go
+++ b/hpcu/main.go
@@ -3,10 +3,11 @@ package main
import (
"errors"
+ "log"
+
"janouch.name/haven/nexgb"
"janouch.name/haven/nexgb/xfixes"
"janouch.name/haven/nexgb/xproto"
- "log"
)
type selectionState struct {
@@ -288,7 +289,8 @@ func handleSelectionRequest(e xproto.SelectionRequestEvent) {
}
if typ == 0 || len(data) > int(setup.MaximumRequestLength)*4-64 ||
- state.owning == 0 || e.Time < state.owning {
+ state.owning == 0 ||
+ (e.Time != xproto.TimeCurrentTime && e.Time < state.owning) {
// TODO: Use the INCR mechanism for large data transfers instead
// of refusing the request, or at least use PropModeAppend.
//