Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8343956: Focus delegation API #1632

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mstr2
Copy link
Collaborator

@mstr2 mstr2 commented Nov 9, 2024

Implementation of focus delegation.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1632/head:pull/1632
$ git checkout pull/1632

Update a local copy of the PR:
$ git checkout pull/1632
$ git pull https://git.openjdk.org/jfx.git pull/1632/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1632

View PR using the GUI difftool:
$ git pr show -t 1632

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1632.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 9, 2024

👋 Welcome back mstrauss! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 9, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@mstr2 mstr2 force-pushed the feature/focus-delegation branch from c6a0c3b to d110710 Compare November 9, 2024 07:42
@mstr2 mstr2 changed the title Focus delegation API 8343956: Focus delegation API Nov 11, 2024
@beldenfox
Copy link
Contributor

PopupWindows have to solve a similar problem; multiple nodes can receive key events and they all act as if they have focus. This gets (mildly) complicated when dealing with input methods. There may be multiple focused nodes but there can only be one caret so you have to have a mechanism to determine which node will respond to input method requests. You also have to determine when to enable and disable IM events at the OS level. Spinners have never dealt with input methods but ComboBoxes do.

I've submitted PR #1634 to get input methods working in popups. If you want input methods to work with focus delegation you would need to do similar bookkeeping.

I noticed that PopupWindows use EventRedirectors for forwarding messages. I didn't dig into the EventRedirector implementation but it is an existing class that seems to be tackling the same problem as this PR.

# Conflicts:
#	modules/javafx.controls/src/main/java/javafx/scene/control/Spinner.java
#	modules/javafx.controls/src/main/java/javafx/scene/control/skin/SpinnerSkin.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants