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

Set the window title in the GUI daemon #9554

Open
3hhh opened this issue Nov 2, 2024 · 4 comments
Open

Set the window title in the GUI daemon #9554

3hhh opened this issue Nov 2, 2024 · 4 comments
Labels
C: gui-virtualization P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.

Comments

@3hhh
Copy link

3hhh commented Nov 2, 2024

How to file a helpful issue

The problem you're addressing (if any)

Currently window titles are prefixed by the VM names by all window managers on their own.
It would be more efficient to implement that in the GUI daemon only.

The solution you'd like

Implement VM name prefixing for window titles in the GUI daemon similar as the window icon is set by the GUI daemon.

The value to a user, and who that user might be

Shared secure code across window managers.

Easier implementation of features like #9553 in a central place.

Completion criteria checklist

(This section is for developer use only. Please do not modify it.)

@3hhh 3hhh added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality. labels Nov 2, 2024
@alimirjamali
Copy link

alimirjamali commented Nov 11, 2024

Currently window titles are prefixed by the VM names by all window managers on their own.
It would be more efficient to implement that in the GUI daemon only.

I am not sure if the above is 100% correct. Looking at xside.c and handle_wmname procedure, it prefixes VM Name on some Window Managers. The comment in xside.h confirms it.

Moreover, sadly the GUID does not set WM_CLIENT_MACHINE XProperty. Which is more standard to _QUBES_VMNAME and could be recognized by wmctrl -l command. If it was set, the patch to XFCE could have used it. p.s. and we could get rid of getQubesVmName function in XFCE patch.

@3hhh
Copy link
Author

3hhh commented Nov 11, 2024

Currently window titles are prefixed by the VM names by all window managers on their own.
It would be more efficient to implement that in the GUI daemon only.

I am not sure if the above is 100% correct. Looking at xside.c and handle_wmname procedure, it prefixes VM Name on some Window Managers. The comment in xside.h confirms it.

Good find! It's even mentioned in man qubes-guid as -T option. So it's already implemented.
However if one checks ps aux|grep qubes-guid, one can see that -T is not set by default for whatever reason.

So essentially my feature request becomes:
"Please consider setting -T by default in qubes-guid."

Moreover, sadly the GUID does not set WM_CLIENT_MACHINE XProperty. Which is more standard to _QUBES_VMNAME and could be recognized by wmctrl -l command. If it was set, the patch to XFCE could have used it. p.s. and we could get rid of getQubesVmName function in XFCE patch.

WM_CLASS can be used, which is fairly standard.
And with -T you could get rid of it, too (which was my initial point).

@marmarek
Copy link
Member

Adding the prefix by qubes-guid is done in KDE. It used to be done on KDE with a patch too, mostly to make it in distinguished style (AFAIR VM name was in bold). This way it was even more visible what is the VM name, and even if something went wrong and the prefix would be skipped, the VM couldn't make its own prefix bold.
This separate style wasn't carried over to Xfce implementation (mostly due to more limited API), but it may come back at one point.

As for using WM_CLIENT_MACHINE, we have considered that, but unfortunately it isn't very reliable - depending on window manager it is skipped sometimes, or hidden as the first thing if title doesn't fit on the screen. And also it's usually placed after the title which makes it harder to find and separate from the actual title.

@alimirjamali
Copy link

alimirjamali commented Nov 11, 2024

one can see that -T is not set by default for whatever reason.

It appears that it only used for KDE. Here.

WM_CLASS can be used, which is fairly standard.

WM_CLASS is set within the existing code. In xside.c and handle_wmclass function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: gui-virtualization P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.
Projects
None yet
Development

No branches or pull requests

4 participants