Skip to content

Fix unclickable Linux window controls on GNOME/Wayland#1334

Open
iron6909 wants to merge 1 commit intofarion1231:mainfrom
iron6909:fix/linux-window-controls-gnome
Open

Fix unclickable Linux window controls on GNOME/Wayland#1334
iron6909 wants to merge 1 commit intofarion1231:mainfrom
iron6909:fix/linux-window-controls-gnome

Conversation

@iron6909
Copy link

@iron6909 iron6909 commented Mar 6, 2026

Summary

  • add a Linux-specific Tauri config that uses the system title bar
  • disable custom Tauri drag regions on Linux headers and full-screen panels
  • note the fix in the changelog

Problem

On Ubuntu 24.04 / GNOME 46 / Wayland, the main window's maximize and close buttons can appear but not receive clicks.

Root cause

Linux was still inheriting the shared window setup while the frontend also marked the custom header as a Tauri drag region. In GNOME/Wayland this can leave the native controls underneath an overlapping custom title/header area.

Fix

  • add src-tauri/tauri.linux.conf.json with titleBarStyle: "Visible"
  • gate custom drag-region attributes behind !isLinux() in:
    • src/App.tsx
    • src/components/common/FullScreenPanel.tsx

Validation

  • corepack pnpm test:unit
  • corepack pnpm build:renderer

@farion1231
Copy link
Owner

@codex

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

{
"label": "main",
"title": "CC Switch",
"titleBarStyle": "Visible",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

titleBarStyle: "Visible" 理论上在当前项目使用的 Tauri 2.8 上对 Linux 不生效,实机测试如何?


<header
className="fixed z-50 w-full transition-all duration-300 bg-background/80 backdrop-blur-md"
data-tauri-drag-region
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

移除 data-tauri-drag-region,理论上只能影响 webview 里的自定义 header,不可能修复 GNOME/Wayland 的原生 GTK 标题栏按钮。实际效果更像是引入功能回退:应用内 header 区域失去拖拽和双击最大化能力

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants