QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
532 stars 46 forks source link

Titles/captions of all Windows are truncated (cut, croped, limited) after 128 chars #5986

Open jamke opened 4 years ago

jamke commented 4 years ago

Qubes OS version R4.0.

Affected component(s) or functionality Titles/captions of all windows.

Brief summary If the window has title longer than 128 chars (not including [appvm] at the beginning) then it gets truncated. Utf8 titles are allowed (allow_utf8_titles = true;) in guid.conf of dom0.

To Reproduce

  1. Open text editor in any appvm (at least one with allow_utf8_titles = true), e.g. Kate application.
  2. Save current file as "123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789.txt"

Expected behavior The title of the window should be: "[appvm] 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789.txt Kate" Expected title of the window should not be truncated or at least truncated after 1024-4096 chars/symbols or something like that so it will not annoy users and be visible everywhere.

Actual behavior The title of the window is "[appvm] 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 1234567", so the rest gets truncated.

Additional context Utf8 titles are allowed (allow_utf8_titles = true;) in guid.conf of dom0. Expected title of the window should not be truncated or at least truncated after 1024-4096 chars/symbols or something like that so it will not be visible on usual 2K/4K monitors.

Solutions you've tried None that I know about.

Related, non-duplicate issues I'm surprised I did not find duplicates or similar issues because I have this problem for ages and probably everyone has it on any 20+ inch monitor in web browser when page's name get truncated like that on half of the pages. So, I probably just missed those issues.

jamke commented 4 years ago

I hope someone will tell if they have or don't have the same issue for example on this page in Firefox (with allow_utf8_titles in global section of guid.conf in dom0), because the title of this page is already long enough. I have it like that: [myappvm] Titles/captions of all Windows are truncated (cut, croped, limited) after 128 chars · Issue #5986 · QubesOS/qubes-issues - Mo. So, Mozilla Firefox was cut off.

marmarek commented 4 years ago

Yes, it seems indeed window title is limited to 128 chars by qubes gui protocol. And yes, this window has it truncated for me too. But to notice it, in fact I needed to make the window wider, because otherwise it was truncated at "M" by the end of the title bar...

Since no one else has noticed it before, I guess this is pretty minor issue.

jamke commented 4 years ago

Yes, the issue is not affecting work but it's kind of ugly for everyone who has 4k or even so-called 2k monitor (probably not laptop).

So, I suggest it to be fixed if changing qubes gui protocol is as easy as char data[4096];. Maybe it's not that easy, I don't know.

By the way, 128 in code is a magic number that adds smell. Better to make something like #define MAX_WINDOW_TITLE_LENGTH (4096) and use char data[MAX_WINDOW_TITLE_LENGTH]; as this length might be required in different places of project.

jamke commented 1 year ago

The issue still exists in R4.1.1, so, maybe milestone should be updated.