rust-windowing / rust-windowing/winit

Disabling and reenabling decorations disables fullsize_content_view

Open
#4,438 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

B - bug DS - appkit
Dominant language
Rust
Stars
6.2k
Forks
1.3k
Avg merge
2d 19h
Merged PRs (30d)
9

Description

Description

When a window is created with .with_fullsize_content_view(true), calling window.set_decorations(false) followed by window.set_decorations(true) disables the fullsize content view setting, so the titlebar now appears outside the window.

I was hoping to use WindowEvent::{CursorEntered,CursorLeft} to enable the titlebar when the cursor is in the window, but this only works with a fullsize content view, since otherwise the titlebar is outside of the window, so cursor left fires when you move the cursor to the title bar, so you can't click it.

I suspect that what I actually want is something other than window.set_decorations(false), since that also disables the rounded corners of the window, and I just want to hide and unhide the title bar dynamically.

macOS version
ProductName:		macOS
ProductVersion:		15.6.1
BuildVersion:		24G90
Winit version

0.30.5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the macOS sequence with .with_fullsize_content_view(true), then call set_decorations(false) and set_decorations(true) while observing the resulting titlebar and content view. Trace the macOS window handling for these APIs; done means the fullsize content view remains enabled, or the supported way to hide and restore only the titlebar is documented or exposed.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.