Skip to content

Fix dialog focus handling under WSLg - #34

Merged
Chris2011 merged 1 commit into
Chris2011:masterfrom
piotrhoppe:wsl-issue
Oct 28, 2026
Merged

Chris2011 merged 1 commit into
Chris2011:masterfrom
piotrhoppe:wsl-issue

Conversation

@piotrhoppe

Copy link
Copy Markdown
Contributor

When I run NetBeans under Windows Subsystem for Linux (WSL) and try to create a new Scratch file, the window for selecting the file type does not stay open. It appears briefly and then closes immediately.
After investigating the issue, I noticed that the window loses focus, probably due to WSL, and NbScratch hides the window in the windowLostFocus function in this situation.
I've prepared a fix to prevent this behavior.
@Chris2011, could you please review it?

- attach the dialog to the NetBeans main window
- ignore transient focus loss events generated by WSLg
- request focus for the search field when the dialog activates
- use HTTPS for the NetBeans Maven repository
@Chris2011

Copy link
Copy Markdown
Owner

Awesome, thx :).

@Chris2011
Chris2011 merged commit cc262d2 into Chris2011:master Oct 28, 2026
1 check 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.

2 participants