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

8236685: [macOs] Remove obsolete file dialog subclasses #135

Closed

Conversation

kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Mar 4, 2020

This is a follow-on to JDK-8234474.

This fix removes the custom subclasses of NSSavePanel and NSOpenPanel that are optionally used by the glass implementation of file open, directory open, and file save. These subclasses were originally added to provide support for keyboard shortcuts for Copy (CMD-C), Cut (CMD-X), and Paste (CMD-V) operations that the standard Apple dialogs do not support directly; applications can add their own support, but JavaFX is a library not an application.

Note that as of macOS 10.15, all file dialogs on Mac are run in a spearate process. Attempts to subclass NSSavePanel and NSOpenPanel are no longer supported. They are either ineffective (silently ignored) or else crash the application. As a result of the crashes that were happening in some environments, the fix for JDK-8234474 uses the NSSavePanel and NSOpenPanel base classes directly when running on macOS 10.15 or later. The proposed fix for this follow-on issue, JDK-8236685, will use NSSavePanel and NSOpenPanel directly on all versions of macOS.

Note that Copy, Cut, and Paste functionality are available with the menu before and after this fix. This only impacts the keyboard shortcuts.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8236685: [macOs] Remove obsolete file dialog subclasses

Reviewers

  • Ambarish Rapte (arapte - Reviewer)
  • Phil Race (prr - Reviewer)

Download

$ git fetch https://git.openjdk.java.net/jfx pull/135/head:pull/135
$ git checkout pull/135

@kevinrushforth kevinrushforth self-assigned this Mar 4, 2020
@bridgekeeper
Copy link

bridgekeeper bot commented Mar 4, 2020

👋 Welcome back kcr! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request.

@openjdk openjdk bot added the rfr Ready for review label Mar 4, 2020
@kevinrushforth
Copy link
Member Author

/reviewers 2

@openjdk
Copy link

openjdk bot commented Mar 4, 2020

@kevinrushforth
The number of required reviews for this PR is now set to 2 (with at least 1 of role reviewers).

@mlbridge
Copy link

mlbridge bot commented Mar 4, 2020

Webrevs

@kevinrushforth
Copy link
Member Author

@arapte @prrace can you review this follow-on fix?

Copy link
Member

@arapte arapte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me,
Build and test run shows no failures.
Test attached to JDK-8234474 runs as expected.

@openjdk
Copy link

openjdk bot commented Mar 6, 2020

@kevinrushforth This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type /integrate in a new comment to proceed. After integration, the commit message will be:

8236685: [macOs] Remove obsolete file dialog subclasses

Reviewed-by: arapte, prr
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /solves command.

Since the source branch of this PR was last updated there have been 4 commits pushed to the master branch. Since there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge master into your branch, and then specify the current head hash when integrating, like this: /integrate f25e8cf22349425003120ef2d0a8c580d5cb2d95.

➡️ To integrate this PR with the above commit message, type /integrate in a new comment.

@openjdk openjdk bot added the ready Ready to be integrated label Mar 6, 2020
@kevinrushforth
Copy link
Member Author

/integrate

@openjdk openjdk bot closed this Mar 6, 2020
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Ready to be integrated labels Mar 6, 2020
@openjdk
Copy link

openjdk bot commented Mar 6, 2020

@kevinrushforth The following commits have been pushed to master since your change was applied:

  • f25e8cf: 8212034: Potential memory leaks in jpegLoader.c in error case
  • b2ac76a: 8240451: JavaFX javadoc build fails with JDK 14
  • cf0bba6: 8240211: Stack overflow on Windows 32-bit can lead to crash
  • 337ed72: 8237926: Potential memory leak of model data in javafx.scene.control.ListView

Your commit was automatically rebased without conflicts.

Pushed as commit cfa1193.

@openjdk openjdk bot removed the rfr Ready for review label Mar 6, 2020
@mlbridge
Copy link

mlbridge bot commented Mar 6, 2020

Mailing list message from Kevin Rushforth on openjfx-dev:

Changeset: cfa1193
Author: Kevin Rushforth <kcr at openjdk.org>
Date: 2020-03-06 19:19:17 +0000
URL: https://git.openjdk.java.net/jfx/commit/cfa11934

8236685: [macOs] Remove obsolete file dialog subclasses

Reviewed-by: arapte, prr

! modules/javafx.graphics/src/main/native-glass/mac/GlassApplication.h
! modules/javafx.graphics/src/main/native-glass/mac/GlassApplication.m
! modules/javafx.graphics/src/main/native-glass/mac/GlassDialogs.m

@kevinrushforth kevinrushforth deleted the 8236685-mac-file-dialog branch March 6, 2020 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated
3 participants