Skip to content

Linux: Enabling window.titleBarStyle native cause unexpected behaviour with #247646

Closed
@dimanech

Description

@dimanech

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version:
    Version: 1.99.3
    Commit: 17baf84
    Date: 2025-04-15T23:18:46.076Z
    Electron: 34.3.2
    ElectronBuildId: 11161073
    Chromium: 132.0.6834.210
    Node.js: 20.18.3
    V8: 13.2.152.41-electron.0
    OS: Linux x64 6.14.3-300.fc42.x86_64
  • OS Version:
    Linux x64 6.14.3-300.fc42.x86_64, Wayland, GNOME 48

Title:
Window with native titleBarStyle on Linux focus issue — Clicking on a window focuses the wrong window

Description:
When clicking on a visible window of an application (e.g., VSCode), the focus does not properly transfer to the clicked window. Instead, the event is passed to another instance of the same application underneath. Additionally, an approximately 40px-wide area around the window is non-clickable and exhibits the same misdirected focus behavior.

Steps to Reproduce:

  1. Change settings to "window.titleBarStyle": "native"
  2. Open single instances of VSCode
  3. Arrange the windows so that they overlap partially, with other application windows behind them.
  4. Click on the middle window (not the topmost one) to focus it.

Expected Behavior:
Clicking anywhere inside the visible area of a window should bring that specific window to the foreground and give it focus.

Actual Behavior:

  • The clicked window does not receive focus
  • Focus is instead passed to a different (underlying) window.
  • Only a ~50px border area around the window can be clicked to successfully focus it.
Screencast.From.2025-04-28.21-35-28.mp4

Metadata

Metadata

Assignees

Labels

electronIssues and items related to ElectronupstreamIssue identified as 'upstream' component related (exists outside of VS Code)waylandIssue related to wayland display server

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions