Skip to content

[BUG] [Desktop] Windows (Tauri) native window top and right edges are inset by 1px #11281

@xerosf

Description

@xerosf

Description

When the window is maximized, moving the mouse to the absolute top or right edge of the screen prevents clicking the window control buttons (Minimize, Maximize, Close). The cursor hits the native window frame instead of the buttons.

When the window is unmaximized, there is a visible 1-pixel gap/misalignment around the edges of the webview content relative to the window frame.

Expected Behavior:

Image

Actual Behavior:

Image


Possible Fix:

There's a p-px (padding: 1px) utility class applied to the #root element in packages/desktop/index.html:

<div id="root" class="flex flex-col h-dvh p-px"></div>

This adds 1px padding to all sides, pushing the content (including the overlay titlebar controls) inwards. Removing this fixes the issue.

Why was this here?

It is unclear why this padding was originally added. It may have been intended to prevent content bleeding, to create a specific border effect or for cross-platform compatibility. I'm not able to test this on other platforms.

Plugins

No response

OpenCode version

1.1.43 (Dev)

Steps to reproduce

  1. Launch the application on Windows.
  2. Maximize the window.
  3. Move the cursor to the very top-right corner of the screen (pixel 0,0 relative to corner).
  4. Attempt to click the close button.
  5. Observe that the click does not register on the button (it hits the window frame behind/above it).
  6. Unmaximize the window and hover over the close button. Observe the 1px padding gap around the button (more visible in light themes).

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwebRelates to opencode on web / desktopwindows

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions