dnkl changed the topic of #foot to: Foot - fast, lightweight and minimalistic Wayland terminal emulator || 1.9.2 || https://codeberg.org/dnkl/foot || channel logs: https://libera.irclog.whitequark.org/foot
diniwed has quit [Ping timeout: 258 seconds]
diniwed[m] has joined #foot
diniwed has joined #foot
p00f[m] has joined #foot
diniwed has quit [Ping timeout: 258 seconds]
<rumpelsepp> dnkl: Thank you for testing this yesterday! Is there anything left I can do helping you?
<dnkl> rumpelsepp: nah, don't think so. We know what the problem is. Just need to figure out what to do about the terminator...
<rumpelsepp> Ok. Then thank you very much with debugging this. I might have annoyed the tmux folks instead with my non-knowledge according this. 🙂
<rumpelsepp> The terminator problem is a problem because there is no specification about this? What happened to https://gitlab.freedesktop.org/terminal-wg/specifications? The whole repo seems stale.
<dnkl> There's never been a specification for the protocol between the terminal and the client. The other way around - yes. But not from the terminal to the client.
<dnkl> This is in general, and not limited to the terminator
<dnkl> I'll take a look at mirroring the terminator from the query. If tmux uses BEL when it sends the query, then everything will work
<dnkl> On the other hand, if they use ST in the query, but then expect BEL in the reply, then I'd say it's tmux that needs to be fixed
<rumpelsepp> I see.
lanodan_ has joined #foot
novakane has joined #foot
testuser[m] has quit [Ping timeout: 260 seconds]
lanodan has quit [Ping timeout: 260 seconds]
mvdan has quit [Ping timeout: 260 seconds]
hexa- has quit [Ping timeout: 260 seconds]
hexa- has joined #foot
testuser[m] has joined #foot
mvdan has joined #foot
cbb has joined #foot
<dnkl> I started doing that
<cbb> dnkl: no worries
<dnkl> But stopped when i realized it wouldn't fix the tmux issue
<cbb> yeah, I wasn't thinking it'd be a good idea to fix the tmux issue like that
<cbb> just thought it'd make some sense to mimic xterm
<dnkl> But we definitely should use the terminator from the query
<cbb> being that xterm is where the 4 affected sequences come from
<dnkl> I agree
<cbb> dnkl: I was speculating about the tmux issue
<cbb> I wonder if I was right
<cbb> is it anything to do with ST clashing with Alt+\ ?
<dnkl> Nope
<dnkl> They parse the reply as a "key"
<dnkl> They run a custom function to check if it's a clipboard reply
<dnkl> In that function they check for BEL vs ST
<dnkl> When it's ST, they forget to adjust the "end" index
<cbb> as in 1 bytes vs 2?
<dnkl> Causing them to treat ESC as part of the base64 string
<dnkl> Yup
<dnkl> Then the decoder fails
<dnkl> And nothing gets copied
<cbb> ah yeah, I nearly did that I my PR
<cbb> lol
<cbb> in from_clipboard_done()
<cbb> or something like it
<dnkl> Easy mistake to make...
<cbb> dnkl: nice work finding the bug in tmux though!
<dnkl> First time looking at the sources. But the parser looked kind of familiar :D
<cbb> dnkl: lol yeah, I think the same thing when looking at most vt parsers now
<cbb> it's a good thing that Paul Williams' state machine became the gold standard
lanodan_ is now known as lanodan
novakane has quit [Quit: WeeChat 3.3]
novakane has joined #foot
novakane has quit [Quit: WeeChat 3.3]
novakane has joined #foot
tsujp has joined #foot
tsujp has quit [Quit: Client closed]
<cbb> dnkl: I wonder if #753 has anything to do with this: https://github.com/bugaevc/wl-clipboard/issues/12#issuecomment-433010122
<cbb> ah I guess not, that seems to be for pasting rather than copying
<dnkl> cbb: I don't think so. Nowadays we have a "data manager" protocol (at least that's what I think wl-clipboard uses). Before that, it needed a window, to get a serial, to be able to access the clipboard
<cbb> dnkl: yeah, I should have read that whole thread
<cbb> I'm just browsing the wl-clipboard repo looking for clues
<cbb> in case it might be cause by wl-copy doing something wierd
<cbb> caused*
<dnkl> cbb: the compositor uses the serial to validate the clipboard access. The idea being that only focused windows are allowed access. Preferably only in response to a user interaction
<dnkl> How the serial is validated is up to the compositor
<dnkl> So, I don't _think_ your issue is caused by wl-copy specifically
<dnkl> Would be interesting to run your experiment on e.g mutter, with an un-patched foot
<cbb> dnkl: makes sense
<cbb> I assumed it was for something like that
<cbb> I wonder what it is exactly that wl-copy does that then stops OSC 52 working
<cbb> time for me to do a lot of reading about Wayland I think
<ifreund> cbb: wl-copy is very much a hack on compositors that don't implement wlr-data-control
<ifreund> with only the core wayland protocol, you need a surface to access the clipboard
<ifreund> so wl-copy tries to create and map an empty surface or something like that
<ifreund> (mutter doesn't implement wlr-data-control, most wlroots based compositors do)
* ifreund actually goes back to read context he was missing
<cbb> ifreund: I posted that link before reading the whole thread
<cbb> it was unrelated to what I was talking about
<cbb> just me being dumb
<ifreund> well, wl-copy is very much doing something weird, so I don't think it's dumb to suspect it :D
<ifreund> I see from that issue that it works in river though which does implement wlr-data-control, perhaps sway does some addtional validation that I'm not doing in river
<dnkl> ifreund: if you're referring to the issue for foot, then cbb's example failed on river too
<dnkl> Explains how foot currently works
<dnkl> And what change was necessary to get cbb's example working in river (and Sway)
<ifreund> dnkl: ah thanks, I misread the issue then
<ifreund> it's probably the second check there that's failing though if I understand correctly, would show up in debug logs
<ifreund> anyhow, that foot patch LGTM
<dnkl> ifreund: thanks :)
<dnkl> not sure how wl-copy affects this though
<ifreund> dnkl: are you seeing one of those two wlr_log messages show up in debug logs?
<ifreund> (just to confirm that this is indeed the code causing this behavior)
<dnkl> ifreund: haven't had time to test yet, but will do before I merge the foot PR, just to be sure
* dnkl is on the phone
<ifreund> cool
<ifreund> dnkl: I'm pretty sure it's the `serial - seat->selection_serial > UINT32_MAX / 2` there that's failing
<ifreund> which is testing that the serial provided by foot when it tries to paste is more recent than the serial provided by wl-copy when creating the data source
<dnkl> ifreund: yeah, sounds very reasonable... :)
gtms has joined #foot
eoli3n has joined #foot
eoli3n_ has quit [Ping timeout: 264 seconds]
<dnkl> ifreund: yup, that log does show up
<ifreund> cool :)
armin has quit [Quit: Lost terminal]
novakane has quit [Quit: WeeChat 3.3]
gtms has quit [Remote host closed the connection]
diniwed has joined #foot
ynakao has quit [Quit: WeeChat 3.3]
ynakao has joined #foot
cbb has quit [Quit: WeeChat 3.3]
diniwed has quit [Ping timeout: 260 seconds]