Skip to content

fix(macOS): correct value for work_area.position.y#14655

Merged
lucasfernog merged 3 commits into
tauri-apps:devfrom
Hilokal:work_area_y
Apr 30, 2026
Merged

fix(macOS): correct value for work_area.position.y#14655
lucasfernog merged 3 commits into
tauri-apps:devfrom
Hilokal:work_area_y

Conversation

@jbaudanza

Copy link
Copy Markdown
Contributor

Currently, the value of work_area.position.y is returning 0. On a screen with a menubar, this should be something like 38. This makes it difficult to position windows at the top of the screen correctly.

This calculation was originally set in #13309, however the math seems incorrect.

This calculation was removed in #13401, which set the value back to 0.

You can set the window position to 0, and it seems the system will (usually, not always) move the window below the menu bar. However, it would be better if I can just directly move the window to where it should be (y=38).

The PR attempts to correct the calculation for position.y. It takes into account the bottom-up coordinate system used by visible_frame. It should work correctly regardless of the menu bar size and presence.

@jbaudanza
jbaudanza requested a review from a team as a code owner December 14, 2025 20:57
@github-actions

github-actions Bot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

Package Changes Through 99defe0

There are 12 changes which include tauri with minor, @tauri-apps/api with minor, tauri-macros with minor, tauri-build with minor, tauri-macos-sign with patch, tauri-bundler with minor, @tauri-apps/cli with minor, tauri-cli with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-utils with minor, tauri-plugin with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.10.1 2.11.0
tauri-utils 2.8.3 2.9.0
tauri-macos-sign 2.3.3 2.3.4
tauri-bundler 2.8.1 2.9.0
tauri-runtime 2.10.1 2.11.0
tauri-runtime-wry 2.10.1 2.11.0
tauri-codegen 2.5.5 2.5.6
tauri-macros 2.5.5 2.6.0
tauri-plugin 2.5.4 2.6.0
tauri-build 2.5.6 2.6.0
tauri 2.10.3 2.11.0
@tauri-apps/cli 2.10.1 2.11.0
tauri-cli 2.10.1 2.11.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@cjpais

cjpais commented Feb 9, 2026

Copy link
Copy Markdown

Showing support for this, it does fix an issue in Handy

@Legend-Master Legend-Master added this to the 2.11 milestone Mar 26, 2026
Comment thread crates/tauri-runtime-wry/src/monitor/macos.rs Outdated
@lucasfernog

Copy link
Copy Markdown
Member

unfortunately i do not have permission to push :(

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
@jbaudanza

Copy link
Copy Markdown
Contributor Author

unfortunately i do not have permission to push :(

Lgtm!

@lucasfernog

lucasfernog commented Apr 30, 2026

Copy link
Copy Markdown
Member

@jbaudanza can you also push a change file? .changes/work-area.md

---
"tauri": patch:bug
"tauri-runtime-wry": patch:bug
---

Fix monitor work area Y position on macOS.

@jbaudanza

Copy link
Copy Markdown
Contributor Author

@jbaudanza can you also push a change file? .changes/work-area.md
done

@lucasfernog
lucasfernog merged commit 9808236 into tauri-apps:dev Apr 30, 2026
18 of 19 checks passed
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.

4 participants