Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

268 clearing destroyed Xids from NSP state #269

Merged
merged 2 commits into from
Jun 23, 2023
Merged

Conversation

sminez
Copy link
Owner

@sminez sminez commented Jun 23, 2023

Adding additional logging around NamedScratchpad behaviour to aide future debugging and putting an event hook in place to clear out destroyed clients. The buggy behaviour has only been observed when using the st terminal as a scratchpad so far and looks to be down to newly created terminal windows sharing an Xid with one that was recently closed.

See #268 (comment) for more info.

So far it has only been observed with the st terminal, but it looks like it is possible
for a newly spawned window to re-use the Xid of a previous client of the same program.
If a NamedScratchpad still thinks it owns a window with that ID it will run the toggle
logic under the assumption that the window in question is the one it owned previously.

The initial fix for this is to add an event hook that checks for NamedScratchpad clients
being destroyed and explicitly removes the stored ID from state. Alternatively we could
also look at running the NSP Query every time the toggle binding is run but this feels
like a better approach as it keeps the toggle logic as simple as possible.
@sminez sminez changed the title 268 namedscratchpad bug 268 clearing destroyed Xids from NSP state Jun 23, 2023
@sminez sminez merged commit c26566b into develop Jun 23, 2023
10 checks passed
@sminez sminez deleted the 268-namedscratchpad-bug branch June 23, 2023 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Holding onto destroyed client Xids in a state extension breaks NamedScratchpad behaviour
1 participant