[macOS] Mouse cursor and click offset when launching in Full Screen (frame-state="6" conflict)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- java, macos
调研方向
在 macOS 上按照列出的 Full Screen 和重新启动步骤重现该问题,然后检查 NetBeans 配置目录下的 WindowManager.wswmgr 文件,尤其是 frame 状态值。完成的标准是:退出原生 Full Screen 并重新启动后,不再导致光标或点击位置发生偏移,且不需要使用只读变通方案。
由索引模型根据 Issue 内容生成。
描述
Apache NetBeans version
Apache NetBeans 30
What happened
Description
When closing NetBeans while in macOS native Full Screen mode, the IDE saves an invalid window state (frame-state="6") in the local configuration files. Upon the next launch, a coordinate mapping conflict occurs between the Java Swing/AWT frame management (Frame.MAXIMIZED_BOTH) and the macOS Full Screen Space manager. This results in a severe vertical/horizontal mouse coordinate and click offset across the entire UI.
Environment
- OS: macOS (Apple Silicon M1/M2/M3)
- NetBeans Version: Apache NetBeans 26, 28, 29, 30
- JDK: Java 21+
Root Cause Analysis
The issue originates in the window manager persistence file:
~/Library/Application Support/NetBeans/<version>/config/Windows2Local/WindowManager.wswmgr
-
Working State (
frame-state="0"):
When NetBeans starts withframe-state="0", window coordinates yield properly to macOS window management. Entering Full Screen mode manually works as expected with accurate mouse tracking. -
Corrupted State (
frame-state="6"):
Closing NetBeans while in macOS Full Screen mode writesframe-state="6"(Frame.MAXIMIZED_BOTH). On subsequent launches, Swing attempts to apply software-maximized geometry inside the native macOS Space, breaking the UI click matrix.
Steps to Reproduce
- Open Apache NetBeans on macOS.
- Enter native macOS Full Screen mode (
Control + Cmd + F). - Quit NetBeans (
Cmd + Q) while still in Full Screen. - Relaunch NetBeans.
- Result: The UI renders, but mouse clicks register with a offset relative to the visual cursor position.
Temporary Workaround
Set the file permissions to read-only on WindowManager.wswmgr after ensuring frame-state="0" is present:
chmod 444 "$HOME/Library/Application Support/NetBeans/<version>/config/Windows2Local/WindowManager.wswmgr"
Language / Project Type / NetBeans Component
No response
How to reproduce
Steps to Reproduce
- Open Apache NetBeans on macOS.
- Enter native macOS Full Screen mode (
Control + Cmd + F). - Quit NetBeans (
Cmd + Q) while still in Full Screen. - Relaunch NetBeans.
- Result: The UI renders, but mouse clicks register with a offset relative to the visual cursor position.
Did this work correctly in an earlier version?
Apache NetBeans 26 or earlier
Operating System
macOS
JDK
SDK 26
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
Temporary Workaround
Set the file permissions to read-only on WindowManager.wswmgr after ensuring frame-state="0" is present:
chmod 444 "$HOME/Library/Application Support/NetBeans/<version>/config/Windows2Local/WindowManager.wswmgr"
Are you willing to submit a pull request?
No
- 主要语言
- Java
- 星标
- 3.1k
- 派生
- 939
- 平均合并
- 4 天 3 小时
- 30 天内合并 PR
- 42
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/netbeans 的其他 Issue
-
Contribution welcome kind:feature Platform
难度 2/5 1-3 小时 新手友好度 72/100
apache/netbeans#9614 · 2 条评论 ·
维护者通常 1 天内回复
-
kind:bug LSP needs:triage
难度 2/5 1-3 小时 新手友好度 78/100
apache/netbeans#9548 · 1 条评论 ·
维护者通常 1 天内回复
-
Editor Java kind:feature needs:triage
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
kind:bug needs:triage os:linux os:macos Platform UI
难度 1/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
kind:bug needs:triage
难度 1/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
相似的 Issue
-
BC remittance upload: a claim MSP refused (S03) is saved with a blank status instead of refused (F)未关闭type: bug
难度 2/5 1-3 小时 新手友好度 88/100
carlos-emr/carlos#4933 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
apache/rocketmq-dashboard#6925 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
Vakore/ZappierGames#147 ·
-
spigotmc
难度 1/5 1 小时以内 新手友好度 92/100
Dans-Plugins/Wild-Pets#356 ·
维护者通常 1 天内回复
-
spigotmc
难度 1/5 1 小时以内 新手友好度 85/100
Dans-Plugins/Medieval-Roleplay-Engine#371 ·
维护者通常 1 天内回复