Repository navigation
Closed
Description
Type: Bug
Because I'm running Wayland (not Xorg), I run VSCode using --ozone-platform=wayland (it generally works better on my system than xwayland).
I have enabled the "Auto Detect Color Scheme" setting. However, when I actually change the color scheme, the color scheme of VSCode is the exact opposite as the system color scheme, which is of course not what I want.
Steps to reproduce:
- Open VSCode using
code --ozone-platform=waylandunder KDE Wayland. - Enable "Auto Detect Color Scheme" in the settings.
- Run
lookandfeeltool -a org.kde.breeze.desktop. This changes the desktop theme to a light color theme, but switches VSCode to a dark color theme. - Run
lookandfeeltool -a org.kde.breezedark.desktop. This changes the desktop theme to a dark color theme, but switches VSCode to a light color theme.
The color theme is detected correctly on startup, it's just when the color scheme is changed at runtime it's flipped.
VS Code version: Code - Insiders 1.81.0-insider (31f1832, 2023-07-07T05:32:56.933Z)
OS version: Linux arm64 6.3.0-asahi-10-1-edge-ARCH
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | unknown (10 x 600) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok video_decode: enabled video_encode: disabled_software vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
| Load (avg) | 3, 2, 2 |
| Memory (System) | 30.97GB (21.34GB free) |
| Process Argv | --ozone-platform=wayland --crash-reporter-id 9f93f029-30bf-43aa-954a-09cbacd2d3a2 |
| Screen Reader | no |
| VM | 0% |
| DESKTOP_SESSION | plasmawayland |
| XDG_CURRENT_DESKTOP | KDE |
| XDG_SESSION_DESKTOP | KDE |
| XDG_SESSION_TYPE | wayland |
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
vscod805cf:30301675
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30404738
py29gd2263:30776702
vsclangdf:30492506
c4g48928:30535728
dsvsc012:30540252
pynewext54:30618038
pylantcb52:30590116
pyind779:30611226
pythonsymbol12:30651887
2i9eh265:30646982
showlangstatbar:30737417
pythonms35:30671666
ecj1e332:30687743
pythonfmttext:30716741
pythoncmvfstr:30726892
fixshowwlkth:30771523
showindicator:30766888
pythongtdpath:30726887
bgfeh915:30780428
gsofa:30778558
pythonnosmt12:30779711
pythonidxpt:30768918
pythondjangots:30768917
pythonnoceb:30776497
copilotsettingt:30767686
e537b577:30772214
h0f32768:30779712
asynctok:30783811
dsvsc013:30777762
dsvsc014:30777825
cmakestatusbarv2:30779594
Activity
[-]With `--ozone-platform=wayland`, the auto-detected color scheme is the opposite color[/-][+][themes] With `--ozone-platform=wayland`, the auto-detected color scheme is the opposite color[/+]aeschli commentedon Aug 18, 2023
This is an Electron issue. Would you mind filing it there? https://github.com/electron/electron
Related issue: electron/electron#33635.
The issue description contains steps to install a small debugging tool that shows what the Electron APIs emit when the OS color schemes is changed.
aykevl commentedon Sep 2, 2023
I tried to run that debugging tool but it doesn't change the theme (except the title bar which is expected) and it doesn't print anything to the console when I change the theme. However, when I change the theme in exactly the same way in Code it does change the theme, just in exactly the wrong way (org.kde.breeze.desktop results in a dark Code theme, org.kde.breezedark.desktop results in a light Code theme). Therefore, it appears that VS Code makes use of an API that isn't used by the debugging tool.
I don't see how I can file a useful Electron bug report with this information.
Not sure whether it's useful, but here is the output of that debugging tool:
Update: I also checked the new
org.freedesktop.appearanceproperty and it works as expected (under KDE):Update 2: checked the latest version of Code but it hasn't changed in behavior. Checked the insiders build but it doesn't seem to change at all after a theme change - this could be an incorrect setting though (it appears to use a separate profile).