Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[macOS] Mouse cursor and click offset when launching in Full Screen (frame-state="6" conflict)

未关闭
#9,539 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
java, macos

调研方向

在 macOS 上按照列出的 Full Screen 和重新启动步骤重现该问题,然后检查 NetBeans 配置目录下的 WindowManager.wswmgr 文件,尤其是 frame 状态值。完成的标准是:退出原生 Full Screen 并重新启动后,不再导致光标或点击位置发生偏移,且不需要使用只读变通方案。

由索引模型根据 Issue 内容生成。

描述

kind:bug needs:triage os:macos pending-response UI
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

  1. Working State (frame-state="0"):
    When NetBeans starts with frame-state="0", window coordinates yield properly to macOS window management. Entering Full Screen mode manually works as expected with accurate mouse tracking.

  2. Corrupted State (frame-state="6"):
    Closing NetBeans while in macOS Full Screen mode writes frame-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
  1. Open Apache NetBeans on macOS.
  2. Enter native macOS Full Screen mode (Control + Cmd + F).
  3. Quit NetBeans (Cmd + Q) while still in Full Screen.
  4. Relaunch NetBeans.
  5. 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
  1. Open Apache NetBeans on macOS.
  2. Enter native macOS Full Screen mode (Control + Cmd + F).
  3. Quit NetBeans (Cmd + Q) while still in Full Screen.
  4. Relaunch NetBeans.
  5. 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

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/netbeans 的其他 Issue

查看 apache/netbeans 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。