From 9bbe70de8577263ff5811aad6f110f59ecac6ba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?=
Date: Sun, 30 Nov 2025 18:57:33 +0100 Subject: [PATCH] hpcu: respond to CurrentTime as well A fresh problem with VIM. X11 documentation appears to claim that this is valid, as is using CurrentTime in the response. --- hpcu/main.go | 6 ++++-- 1 file 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. //