Xpra-org / xpra

Persistent remote applications for X11; screen sharing for X11, MacOS and MSWindows.
https://xpra.org/
GNU General Public License v2.0
2k stars 171 forks source link

Starting with Automatic Encoding will disable quality menu #4427

Open GUAN-Xihao opened 3 days ago

GUAN-Xihao commented 3 days ago

Describe the bug Following by #4398 Now in v6.2.1, if you start without --encoding option, the encoding will be recorded as "auto"

image

If you manually click the auto option like #4398 describes, then due to the following code: https://github.com/Xpra-org/xpra/blob/master/xpra/client/mixins/encodings.py#L302 The encoding will be "".

To Reproduce Steps to reproduce the behavior:

  1. Star Xpra, encoding is automatic and the quality menu is NOT available.
  2. Now, click automatic encoding. Then quality menu is enabled. As the above screenshot shows.

System Information (please complete the following information):

totaam commented 3 days ago

What is the problem with having encoding = ""? What behaviour does this change fix?

IIRC, the empty value has different semantics.

GUAN-Xihao commented 3 days ago

What is the problem with having encoding = ""? What behaviour does this change fix? IIRC, the empty value has different semantics.

From commit 2c9301c, GENERIC_ENCODINGS = ("", "stream", "grayscale") You may choose to mark automatic encoding to "" either "auto" But v6.2.1 behavior is 1) if you start without --encoding, then it will mark as "auto". https://github.com/Xpra-org/xpra/blob/master/xpra/client/mixins/encodings.py#L158 2) if you manually select encoding as automatic from the menu, then it will be marked as "". https://github.com/Xpra-org/xpra/blob/master/xpra/client/mixins/encodings.py#L302 You may use "auto" or "" on the above two statuses.

And the commit is trying use "auto" in both cases.

GUAN-Xihao commented 3 days ago

From your IIRC info, maybe GENERIC_ENCODINGS = ("", "auto", "stream", "grayscale")

is what you prefer. If so let me know and I can update the PR.

totaam commented 3 days ago

I will have to test this myself to understand. Hopefully tomorrow.