Bug 451498 - Transparent area between Chromium and the window border
Summary: Transparent area between Chromium and the window border
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: decorations (other bugs)
Version First Reported In: 5.24.2
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-14 17:21 UTC by Alex
Modified: 2022-03-31 19:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2022-03-14 17:21:30 UTC
SUMMARY

With recent chromium versions, kwin draws the window border around the window shadow of chromium. This means, that between the kwin window border and the border of the chromium window (without shadow) is a transparent area  (or without compositing a black area) which only contains the shadow.

KWin probably should either crop the shadow or draw the border tight to the window and let chromium draw the shadow outside of the border.

STEPS TO REPRODUCE
1. Use KWin as window manager, e.g., in a Plasma session
2. Start chromium Version 98.0.4758.102 (Official Build) built on Debian bookworm/sid, running on Debian bookworm/sid (64-bit)

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux
KDE Plasma Version: 5.24.2
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Comment 1 Nate Graham 2022-03-25 16:16:53 UTC
Cannot reproduce with Chromium (Freeworld) 99 on Wayland.

1. Can you attach a screenshot?
2. Are you using any window rules?
3. Are you on X11 or Wayland?
Comment 2 Alex 2022-03-25 16:41:44 UTC
I'll post a screenshot and maybe I try to reproduce the exact setting in a KDE neon VM  later.

The most relevant info, which may already be enough for reproducing:

- Graphics System: X11
- Window Rules: Enforce "Without title bar and border = False"
- Running "chromium --guest"

The point to this is, that the chromium guest session is an easy option to try something without addons and affecting the main browser profile, but does not allow for configuring "Use system title bar and borders" inside chromium itself.

With previous chromium/kwin combinations it worked just fine, but with an update (I think a chromium update, but hard to tell) I got the described behavior with the border being around the chromium window including its shadow.
Comment 3 Nate Graham 2022-03-25 16:56:55 UTC
I would recommend removing the window rule and trying again. It wouldn't surprise me if that window rule is no longer working properly due to a change in Chromium itself. The entire Window Rules system is basically a way for users to work around quirks in apps, so it;s quite common for apps to change or fix their behaviors such that existing window rules no longer behave as expected.
Comment 4 Alex 2022-03-25 17:02:20 UTC
(In reply to Nate Graham from comment #3)
> I would recommend removing the window rule and trying again.

Then it works, but uses chromium's client side decoration.

It uses it anyway, but beforehand I had the chromium csd + tabbar and the kwin titlebar around it. This wasn't a big deal, as the merged csd and tab bar did not waste too much space and I had the kwin decoration for better window management. But now, it has the additional transparent area that I believe to belong to the window shadow from the chromium window.

The question is, if the window rule can be made work again like before or if I need to revert to accepting the client-side decoration for the window.
I wonder if chromium really draws the shadow itself and reserves it as window area.
Comment 5 Nate Graham 2022-03-31 19:12:55 UTC
That's how CSD works, unfortunately. The window does whatever it wants and we can't override it or work around it on the window manager level.

You don't have to accept CSDs though. Chromium has an option to "use system title and frame" (or something like that) and they you'll get an SSD titlebar and window shadows.