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

Override-redirect windows that are strictly contained in their parents should have no border #6256

Open
arkenoi opened this issue Dec 5, 2020 · 14 comments
Labels
affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. C: gui-virtualization diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. ux User experience waiting for upstream This issue is waiting for something from an upstream project to arrive in Qubes. Remove when closed.

Comments

@arkenoi
Copy link

arkenoi commented Dec 5, 2020

Qubes OS version

4.0

Affected component(s) or functionality

GUI lxde window decorations

Brief summary

Due to "hardwired" window decorations (which you may see as a security feature) MS Office windows get mis-rendered

How Reproducible

Always

To Reproduce

Steps to reproduce the behavior:

  1. Make a Windows wm with MS Office and RDP enabled
  2. Enable incoming connections to Windows WM from one Linux WM in sys-firewall
  3. run a single MS Word app (outside of the windows desktop) via freerdp from a Linux wm

Expected behavior

Normal window frame around the whole window

Actual behavior

A lot of weird, thin, misplaced window frames around random GUI elements.

Screenshots

telegram-cloud-photo-size-4-5931390080075805761-y

Additional context

I initially reported this as freerdp bug, but apparently, it is a Qubes issue

Solutions you've tried

/gdi:sw
+aero
-decorations
turning ms office hardware graphics acceleration off

possibly related:

#6199

@arkenoi arkenoi added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels Dec 5, 2020
@DemiMarie
Copy link

It’s hard to tell from the screenshot, but it looks like these decorations are from the GUI daemon. In that case, this is working as intended, as the borders are used to indicate trust.

That said, the user experience is poor. Wayland might fix this, as I am not sure if Wayland clients abuse windows the way X Window System clients do.

@andrewdavidwong andrewdavidwong added the needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. label Dec 5, 2020
@andrewdavidwong andrewdavidwong added this to the Release 4.0 updates milestone Dec 5, 2020
@marmarek
Copy link
Member

marmarek commented Dec 5, 2020

I've seen similar things when running MS Office (but not any other windows application) through wine, so it's rather specific to MS Office not just FreeRDP. I guess it tries to draw some fancy shadows that technically are implemented as separate windows and thus gets forced colorful borders.

@marmarek
Copy link
Member

marmarek commented Dec 5, 2020

Maybe we can add some heuristic on gui-agent side to ignore those specific "windows"?

@arkenoi
Copy link
Author

arkenoi commented Dec 6, 2020

Apparently they are from GUI daemon indeed (the effect is similar in any case: wine, freerdp or seamless mode). But it does not explain why it leaves artifacts on all virtual desktops. It would be great to have some workaround for this bug.

@marmarek
Copy link
Member

marmarek commented Dec 6, 2020

But it does not explain why it leaves artifacts on all virtual desktops.

It kind of does. This uses override-redirect window type that is not controlled by window manager, and so is not affected by the workspace switch. This is yet another case of #4705 (although here it is "just" UX issue, not security one).

@arkenoi
Copy link
Author

arkenoi commented Dec 6, 2020

could be a quick fix be implemented on freerdp's side?

@marmarek
Copy link
Member

marmarek commented Dec 6, 2020

maybe? I think it does have all the needed data to exclude such windows.

@DemiMarie
Copy link

I would prefer to fix this on the FreeRDP side, rather than the GUI daemon side. FreeRDP has more information about this, and is also already a more complex piece of software anyway.

@arkenoi
Copy link
Author

arkenoi commented Dec 6, 2020

FreeRDP/FreeRDP#6640

@andrewdavidwong andrewdavidwong added ux User experience waiting for upstream This issue is waiting for something from an upstream project to arrive in Qubes. Remove when closed. diagnosed Technical diagnosis has been performed (see issue comments). and removed needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Dec 6, 2020
@DemiMarie
Copy link

That said, the user experience is poor. Wayland might fix this, as I am not sure if Wayland clients abuse windows the way X Window System clients do.

It turns out that the exact opposite is the case: even mundane Wayland clients (such as Firefox) make heavy use of surfaces. Therefore, fixing this problem in the GUI daemon is a hard requirement for Wayland support. While in theory this could be solved in the GUI agent, this would result in a substantial performance hit: compositing in the GUI agent happens on the CPU, while compositing in the GUI daemon happens on the GPU, which is faster and uses much less power.

@DemiMarie DemiMarie changed the title FreeRDP/WinApps GUI issues with MS Office Override-redirect windows that are strictly contained in their parents should have no border Jul 1, 2021
@DemiMarie
Copy link

DemiMarie commented Jul 4, 2021

This is trickier than I thought it would be, as the size of the parent window can change at any time, in which case the size of the child window needs to be updated accordingly. I am not sure how to implement this in a glitch-free way on X11, although it is easy on Wayland. Nevermind! The X11 protocol guarantees that a child window will always be within its parent, so a border is never necessary.

@DemiMarie
Copy link

Turns out that child windows are useless for Wayland, or just about anything else for that matter. Instead, the Wayland compositor will do the compositing in software. @marmarek NACK’d hardware accelerating it using the RENDER extension.

@andrewdavidwong andrewdavidwong added the affects-4.1 This issue affects Qubes OS 4.1. label Aug 8, 2023
@andrewdavidwong andrewdavidwong removed this from the Release 4.1 updates milestone Aug 13, 2023
@andrewdavidwong andrewdavidwong added eol-4.1 Closed because Qubes 4.1 has reached end-of-life (EOL) and removed waiting for upstream This issue is waiting for something from an upstream project to arrive in Qubes. Remove when closed. labels Dec 7, 2024

This comment was marked as outdated.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2024
@DemiMarie
Copy link

Not fixed.

@DemiMarie DemiMarie reopened this Dec 8, 2024
@andrewdavidwong andrewdavidwong added waiting for upstream This issue is waiting for something from an upstream project to arrive in Qubes. Remove when closed. affects-4.2 This issue affects Qubes OS 4.2. and removed eol-4.1 Closed because Qubes 4.1 has reached end-of-life (EOL) labels Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. C: gui-virtualization diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. ux User experience waiting for upstream This issue is waiting for something from an upstream project to arrive in Qubes. Remove when closed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants