#[v2] Issue with Decorations floating above the window on MacOS

6 messages · Page 1 of 1 (latest)

edgy tide
#

Noticed an issue, I don't know if this is a bug or I'm just new to Tauri.

Background: Building a multi-page application on Tauri v2

My goal: On some, but not all, pages have the decorations on overlay on the window, no title bar (+ transparency)

**Issue: ** Decorations were floating above the window, out of reach of css

My Resolution: It took me all day to figure this out but the first image (with the decorations above the window) happens when setting "decorations": false in the tauri config json and then setting getCurrent().setDecorations(true) later in JS. The second image (with the decorations inside the window) happens where instead setting "decorations": true in the tauri config json, which means I now do rely on turning off decorations in the pages I don't want them.

In case someone else runs into an issue of decorations being on top of the window, my fix was to set "decorations": true as the default.

More info, the "windows" in my tauri config looks something like this

{
    "fullscreen": false,
    "resizable": false,
    "title": "SOME TITLE HERE",
    "width": 800,
    "minWidth": 80,
    "minHeight": 80,
    "transparent": true,
    "decorations": true,
    "titleBarStyle": "Overlay",
    "hiddenTitle": true
}
edgy tide
#

I did some more digging. Turns out this issue happens whenever the decorations were set to false and then toggled to true

#

Case in point:

  • Set decorations: true in the tauri config
  • Set getCurrent().setDecorations(false) on mount
  • And then later getCurrent().setDecorations(true)

This causes the decorations to appear above the window rather than inside. Which I suspect is a bug and not intended behavior

#

[v2] Decorations floating above the window on MacOS

edgy tide
#

[v2] Issue with Decorations floating above the window on MacOS

wispy parrot
#

Which I suspect is a bug and not intended behavior
Now the question is whether that's a tauri bug or something macos internal. Either way, please open a github issue instead, thanks.