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

Change the end of very long window titles to ... #155

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alimirjamali
Copy link
Contributor

@@ -2912,6 +2912,12 @@ static void handle_wmname(Ghandles * g, struct windowdata *vm_window)
read_struct(g->vchan, untrusted_msg);
/* sanitize start */
untrusted_msg.data[sizeof(untrusted_msg.data) - 1] = 0;
/* change the end of very long window titles to ... */
if (strlen(untrusted_msg.data) == (sizeof(untrusted_msg.data) - 1)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be done on the agent side instead? It knows where the limit is too, and may have more info (especially, if it really was truncated or maybe just at the limit).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be done on the agent side instead? It knows where the limit is too, and may have more info (especially, if it really was truncated or maybe just at the limit).

I did it on the agent side at the beginning. I am going to change this PR to draft and do it properly, writing the main patch for both agent and xside to have the length increased (from 128 to 4096) as well as appending ... if necessary.

@alimirjamali alimirjamali marked this pull request as draft November 12, 2024 06:20
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.

2 participants