Skip to content

0.0.38: light gray 7px border on left/right/bottom on i3/X11 without compositor #10142

Description

@mo

Human explanation: When I upgraded to t3-code 0.0.38 I got a weird light gray border left/right/bottom of the window. I use ubuntu 24.04 and i3 window manager. The bug was caused by the electron version bump and it looks like this:

Image

Version

T3-Code 0.0.38 AppImage (T3-Code-0.0.38-x86_64.AppImage), Electron 43.4.1 (bumped in #8626)

Previous version (0.0.37) had no border.

Environment

  • OS: Ubuntu 24.04.4 LTS (Noble)
  • WM: i3 4.23 on X11 (XDG_SESSION_TYPE=x11, $DISPLAY=:0, no WAYLAND_DISPLAY)
  • No compositor: no picom/compton, xprop -root _NET_WM_CM_S0 -> not found
  • Launch: ~/opt/T3-Code-*-x86_64.AppImage --force-device-scale-factor=1.75

Describe the bug

After upgrading to 0.0.38, a light gray border appears on left/right/bottom sides of the main window (top is clean). Looks like 6-7px solid #EBEBEB with 1px darker #C8C8C8 outer edge.

Screenshot pixel sampling (3840x2160 fullscreen):

  • left edge at mid-height: x=0: (200,200,200), x=1-6: (235,235,235), x=7+: app bg (32,46,60) = ~7px
  • right edge: ~5-7px (235,235,235)
  • bottom edge just above i3bar: y=2118: (209,209,209), y=2113-2117: (235,235,235), y=2112: app bg = ~6px
  • top: no border, app bg from y=0

X11 properties:

xwininfo: Border width: 0, 3840x2119+0+0
xprop _GTK_FRAME_EXTENTS(CARDINAL) = 7, 7, 0, 7
_NET_WM_WINDOW_TYPE = NORMAL, WM_CLASS = "t3code"
_MOTIF_WM_HINTS = 0x2, 0x0, 0x0, 0x0, 0x0

So this is not an i3 border (width 0), it is in-client CSD shadow area rendered opaque because there is no compositor to make it transparent.

Expected

No visible border on non-compositing X11 WMs like i3, as in 0.0.37. Either:

  • detect lack of compositing / client-shadow support and render with no insets (like Chrome falls back to SSD), or
  • create frameless window with hasShadow: false, or expose an option for it.

Upstream

This matches electron/electron#52024
"Linux: frameless windows have a border on non-compositing X11 WMs, e.g. i3"

A frameless window should not have any border on i3, which is an X11 window manager which does not have a compositor out of the box and cannot support shadows. The window has a border around the sides and bottoms where the shadow would appear.

That issue notes Electron 41+ added CSD to frameless windows, and LinuxFrameLayout::Create / X11Window::CanSetDecorationInsets path falls back to a resize border when the WM doesn't advertise _GTK_FRAME_EXTENTS (i3 case).

Workaround

Running picom -b makes the 7px area transparent shadow again. Downgrading to 0.0.37 also removes it. Filing here because T3-Code owns the BrowserWindow options and Electron bump.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedfeature request acceptedbugSomething is broken or behaving incorrectly.upstreamvia-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions