Skip to content

Allow VS-code to respect native titlebar decorations configuration on GNOME/Linux #176467

In review

Description

@adhadse

Coming from #21 on vscode-adwaita, on GNOME Desktop environment (and on other distros as well) we can configure what titlebar decorations appear, viz Minimize, maximize buttons can appear or disappear via GNOME tweaks app.

VS-code doesn't support this by default, and for maximum cross-compatibility, we would like this feature to be customizable.

TLDR:

  • allows maximize/minimize button to appear or disappear via settings, just like Microsoft Edge browser does by having a small corner allocated for the native title bar buttons, while the rest of it is the internal browser GUI.
  • Support native titlebar decorations depending on the Distribution/Platform.

Attaching image of window decorations on VS code with window.titleBarStyle set to custom, GNOME files (Nautilus) on libadwaita 1.2x, GNOME 43.2 and Microsoft Edge browser (Version 109.0.1518.70 (Official build) (64-bit)) with GNOME tweaks, disabling maximise and minimize buttons
image

And with GNOME tweaks enabling Maximise/Minimize buttons:
image

Activity

  1. sbatten commented on Mar 9, 2023

    @sbatten
    Member

    This would come from WCO on linux, right Robo (@deepak1556)

  2. adhadse commented on Mar 10, 2023

    @adhadse
    Author

    SteVen Batten (@sbatten) Can I please know what is WCO on linux?

  3. sbatten commented on Mar 15, 2023

    @sbatten
    Member

    Window Controls Overlay, a feature of browsers and electron (our platform) which draws native window controls in a reserved area over our application. It allows you to get the same native features of window controls that we cannot implement in HTML/JS

  4. fedorenchik commented on Apr 28, 2023

    @fedorenchik

    Anurag Dhadse (@adhadse) SteVen Batten (@sbatten) can we also add feature to respect window titlebar buttons position (left / right side) ?

  5. TomiOhl commented on May 8, 2023

    @TomiOhl

    Let me +1 these. Also, take into account that sometimes not all controls are at the same side, e.g. on elementary OS/Pantheon the close button is on the left, the maximize button is on the right.

  6. suwermave commented on May 21, 2023

    @suwermave

    This is needed, please implement.

  7. sousaakira commented on Aug 4, 2023

    @sousaakira

    How do I move the title bar buttons to the left side?

  8. added
    feature-request
    upstream
    linux
    electron
    titlebar
    on Dec 5, 2023
  9. 32 remaining items

  10. clover-yan commented on Mar 31, 2025

    @clover-yan

    the script https://github.com/remigermain/vscode-controls-linux no worker on Vscode 1.98.1

    The PR broke this. They never think anything twice before merging everything.

    Off-topic: Why do we need the vscode-custom-css extension? There used to be a fantastic extension that could hot-load CSS in Code, and then you broke it. You break features, we make workarounds; you continue to break workarounds. Your issue review process is absolutely not a problem, since you can find this issue among 5k+ issues (I couldn't find it because we described the problem in completely different ways) and mark mine as Duplicate, but no one considered that Linux also has custom window decorations with window control buttons on the left when writing that PR which concerns macOS. You fill your products with tons of features labeled as Preview but enabled by default, from Code to GitHub to Windows, and then rush them to stable within weeks. If this is Microsoft, then you're over.

  11. sousaakira commented on Jul 7, 2025

    @sousaakira

    I found a solution: first we need to change the “Dialog Style” to native.

    Go to Settings > Window > Dialog Style and select Native.

    Image

    Then run these commands:

    sudo chown -R $(whoami) "$(which code)"
    sudo chown -R $(whoami) /usr/share/code
    

    ctrl + shift + p

    Enable Custom CSS end js

    Image

  12. remigermain commented on Sep 23, 2025

    @remigermain

    For those who want the controls on the left, the script works again.
    need to add in your settings

    "window.controlsStyle": "custom",
  13. shafiqimtiaz commented on Oct 23, 2025

    @shafiqimtiaz

    I’m trying to customize the active/inactive window borders in VS Code, but the settings don’t seem to have any visible effect.

    Settings

    "workbench.iconTheme": "catppuccin-mocha",
    "workbench.colorTheme": "Catppuccin Mocha",
    "window.titleBarStyle": "custom",
    "workbench.colorCustomizations": {
      "window.activeBorder": "#00ff00",
      "window.inactiveBorder": "#ff0000"
    }

    Expected behavior

    A green border around the active window and a red border around inactive ones.

    Actual behavior

    No border is displayed at all.


    System details

    • VS Code Version: 1.105.1
    • Commit: 7d842fb
    • Electron: 37.6.0
    • Chromium: 138.0.7204.251
    • Node.js: 22.19.0
    • V8: 13.8.258.32-electron.0
    • OS: Ubuntu 24.04.3 LTS (GNOME 46, X11)
    • Kernel: 6.14.0-33-generic
    • Hardware: HP ProBook 455 G10 (Ryzen 5 7530U, Radeon Graphics, 32 GB RAM)

    What I’ve tried

    • Reloading window
    • Restarting VS Code
    • Verifying syntax in settings.json
    • Switching between "window.titleBarStyle": "custom" and "native"
    • Confirmed that I’m running under X11, not Wayland

    Still, no visible border appears.


    Question

    Is this feature currently broken or unsupported on GNOME 46 / X11?
    If there’s a known limitation or workaround, please advise.

  14. pfanzola commented on Nov 19, 2025

    @pfanzola

    still broken on GNOME 49, wish to add a non-wrapped titlebar or at least the ability to respect the correct configuration like only shows the exit window control

  15. clover-yan commented on Dec 13, 2025

    @clover-yan
    Quoted text

    I’m trying to customize the active/inactive window borders in VS Code, but the settings don’t seem to have any visible effect.

    Settings

    "workbench.iconTheme": "catppuccin-mocha",
    "workbench.colorTheme": "Catppuccin Mocha",
    "window.titleBarStyle": "custom",
    "workbench.colorCustomizations": {
    "window.activeBorder": "#00ff00",
    "window.inactiveBorder": "#ff0000"
    }

    Expected behavior

    A green border around the active window and a red border around inactive ones.

    Actual behavior

    No border is displayed at all.

    System details

    * **VS Code Version:** 1.105.1
    
    * **Commit:** [7d842fb](https://github.com/microsoft/vscode/commit/7d842fb85a0275a4a8e4d7e040d2625abbf7f084)
    
    * **Electron:** 37.6.0
    
    * **Chromium:** 138.0.7204.251
    
    * **Node.js:** 22.19.0
    
    * **V8:** 13.8.258.32-electron.0
    
    * **OS:** Ubuntu 24.04.3 LTS (GNOME 46, X11)
    
    * **Kernel:** 6.14.0-33-generic
    
    * **Hardware:** HP ProBook 455 G10 (Ryzen 5 7530U, Radeon Graphics, 32 GB RAM)
    

    What I’ve tried

    * Reloading window
    
    * Restarting VS Code
    
    * Verifying syntax in `settings.json`
    
    * Switching between `"window.titleBarStyle": "custom"` and `"native"`
    
    * Confirmed that I’m running under **X11**, not Wayland
    

    Still, no visible border appears.

    Question

    Is this feature currently broken or unsupported on GNOME 46 / X11? If there’s a known limitation or workaround, please advise.

    Shafiq Imtiaz (@shafiqimtiaz) It was intentionally removed — please see #176467 (comment)!

    Also, I don't think completely using AI to write comments is a good idea. Using it as a translator is enough.

  16. pfanzola commented on Dec 19, 2025

    @pfanzola

    it just need to copy the implementation of chromium, like it uses the freedesktop theme wich is good and you cand also have a wrapped menu but it can hide the maximise and minimise buttons...

  17. aleserrags commented on Mar 31, 2026

    @aleserrags

    Any updates on this issue?

  18. terra2o commented on Apr 26, 2026

    @terra2o

    Still a big issue for a lot of people

  19. tarik02 commented on May 6, 2026

    @tarik02

    this matters too: #310602

  20. rodrigoGA commented on Aug 29, 2026

    @rodrigoGA

    Now that Electron 43 is being integrated in #332935, it would be great to revisit this issue as part of that update.

    Electron 43 now respects the system-configured window control layout on Linux, including button visibility and left/right placement. It seems like most of the upstream work blocking this issue is now available.

  21. dmitrivMS commented on Nov 29, 2026

    @dmitrivMS
    Collaborator

    Following up on the Electron 43 question: the official .deb now follows GNOME’s button visibility and order with window.titleBarStyle: "custom". The Insiders Snap on native Wayland still did not in my tests, even at the same commit (d7885d3d).

    Build tested GNOME set to close only GNOME set to all three on the left
    1.138.0 .deb, X11 (Electron 42) All three stayed on the right All three stayed on the right
    1.139.0 .deb, X11 (Electron 43) Only close All three moved left
    1.149.0 Insiders .deb, X11 and native Wayland Only close All three moved left
    1.149.0 Insiders Snap, rev 2654, native Wayland All three stayed on the right All three stayed on the right

    I used clean profiles with extensions disabled on Ubuntu 22.10 (GNOME Shell 43.1 on X11; nested Mutter 43.0 for Wayland). A separate GTK window confirmed the active GNOME setting. The Insiders .deb also followed a split layout, with close on the left and minimize/maximize on the right. On X11, clicking minimize and maximize worked on either side. The release boundary matches electron/electron#51161 and VS Code’s Electron 43 update.

    Remaining Snap case: The Wayland Snap defaults to custom-drawn controls. I also explicitly set "window.controlsStyle": "native" and fully restarted. That enabled the native overlay, but all three buttons still stayed on the right while the GTK window followed GNOME. The default alone therefore doesn’t explain the result. A useful next check is to compare which GTK decoration layout the Snap process sees with the one the desktop publishes. I’m leaving this open for that case; this test covers visibility and placement, not pixel-identical theme artwork.

    Recording: changing GNOME’s settings with the Insiders .deb and a GTK reference window side by side on X11.

    insiders.mp4

    Same Insiders commit and same all-left preference on native Wayland:

    Official .deb: close, maximize, and minimize are on the left.

    Official Snap with native controls explicitly enabled: the three controls remain on the right.

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

Metadata

Metadata

Labels

electronfeature-requestlinuxtitlebarupstream

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions