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

Investigate new features in the focus system and apply them to ComposePanel/SwingPanel interop #2944

Closed
igordmn opened this issue Mar 31, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request focus management swing interop Swing interop issue

Comments

@igordmn
Copy link
Collaborator

igordmn commented Mar 31, 2023

After we rebased on Jetpack Compose 1.4, there are few new features in FocusOwner.kt:

image

We don't handle them when we use ComposePanel/SwingPanel.

Old features (moveFocus/clearFocus work) correctly

@igordmn igordmn added enhancement New feature or request swing interop Swing interop issue focus management labels Mar 31, 2023
@igordmn igordmn self-assigned this Mar 31, 2023
igordmn added a commit to JetBrains/compose-multiplatform-core that referenced this issue Jun 7, 2024
No need to apply them anymore.

```
git diff androidx/compose-ui/1.6.7 origin/jb-main -- compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/focus/FocusOwnerImpl.kt > 1.patch
```

Fixes https://youtrack.jetbrains.com/issue/COMPOSE-1212/Integration.-Check-changes-in-FocusOwnerImpl

JetBrains/compose-multiplatform#4917

Make the first ComposeComponent focused initially

Apply jb-main FocusOwnerImpl.kt changes

No need to apply them anymore.

```
git diff androidx/compose-ui/1.6.7 origin/jb-main -- compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/focus/FocusOwnerImpl.kt > 1.patch
```

Fixes https://youtrack.jetbrains.com/issue/COMPOSE-1212/Integration.-Check-changes-in-FocusOwnerImpl

Fixes JetBrains/compose-multiplatform#4919

JetBrains/compose-multiplatform#4917

JetBrains/compose-multiplatform#2944
igordmn added a commit to JetBrains/compose-multiplatform-core that referenced this issue Jun 10, 2024
Fixes JetBrains/compose-multiplatform#2944
Fixes JetBrains/compose-multiplatform#4919
Fixes https://youtrack.jetbrains.com/issue/COMPOSE-1212/Integration.-Check-changes-in-FocusOwnerImpl

After https://android-review.googlesource.com/c/platform/frameworks/support/+/2813125, there are some changes that affected our code for focus interop with ComposePanel/SwingPanel:
- the root node no longer focusable
- FocusOwnerImpl now has iterop callbacks and our own modification of this file (in jb-main, integration was reset) doesn't work anymore

## Testing
- added new tests
- ComposeFocusTest now pass

## Release notes
### Fixes - Multiple platforms
- Fix "ComposePanel. Focus moves to child after focusing/unfocusing the main window"
igordmn added a commit to JetBrains/compose-multiplatform-core that referenced this issue Jun 10, 2024
Fixes JetBrains/compose-multiplatform#2944
Fixes JetBrains/compose-multiplatform#4919
Fixes https://youtrack.jetbrains.com/issue/COMPOSE-1212/Integration.-Check-changes-in-FocusOwnerImpl

After https://android-review.googlesource.com/c/platform/frameworks/support/+/2813125, there are some changes that affected our code for focus interop with ComposePanel/SwingPanel:
- the root node no longer focusable
- FocusOwnerImpl now has iterop callbacks and our own modification of this file (in jb-main, integration was reset) doesn't work anymore

## Testing
- added new tests
- ComposeFocusTest now pass

## Release notes
### Fixes - Multiple platforms
- Fix "ComposePanel. Focus moves to child after focusing/unfocusing the main window"
igordmn added a commit to JetBrains/compose-multiplatform-core that referenced this issue Jun 10, 2024
Fixes JetBrains/compose-multiplatform#2944
Fixes JetBrains/compose-multiplatform#4919
Fixes https://youtrack.jetbrains.com/issue/COMPOSE-1212/Integration.-Check-changes-in-FocusOwnerImpl

After https://android-review.googlesource.com/c/platform/frameworks/support/+/2813125, there are some changes that affected our code for focus interop with ComposePanel/SwingPanel:
- the root node no longer focusable
- FocusOwnerImpl now has iterop callbacks and our own modification of this file (in jb-main, integration was reset) doesn't work anymore

## Testing
- added new tests
- ComposeFocusTest now pass

## Release notes
### Fixes - Multiple platforms
- Fix "ComposePanel. Focus moves to child after focusing/unfocusing the main window"
igordmn added a commit to JetBrains/compose-multiplatform-core that referenced this issue Jun 10, 2024
Fixes JetBrains/compose-multiplatform#2944
Fixes JetBrains/compose-multiplatform#4919
Fixes https://youtrack.jetbrains.com/issue/COMPOSE-1212/Integration.-Check-changes-in-FocusOwnerImpl

After https://android-review.googlesource.com/c/platform/frameworks/support/+/2813125, there are some changes that affected our code for focus interop with ComposePanel/SwingPanel:
- the root node no longer focusable
- FocusOwnerImpl now has iterop callbacks and our own modification of this file (in jb-main, integration was reset) doesn't work anymore

## Testing
- added new tests
- ComposeFocusTest now pass

## Release notes
### Fixes - Multiple platforms
- Fix "ComposePanel. Focus moves to child after focusing/unfocusing the main window"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request focus management swing interop Swing interop issue
Projects
None yet
Development

No branches or pull requests

1 participant