pingdotgg / pingdotgg/t3code

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

Open
#10,142 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accepted bug upstream via-triage
Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

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 https://github.com/electron/electron/issues/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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the border with the 0.0.38 AppImage on Ubuntu 24.04/i3 without a compositor, then inspect the app's Electron BrowserWindow options and the Electron version bump. Compare against 0.0.37 and verify that the window has no visible left, right, or bottom border on non-compositing X11 while retaining the expected appearance with a compositor.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, linux, typescript
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.