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

Attempt to remove modal window frame to hide close button on linux #4252

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions newIDE/electron-app/app/ModalWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ const loadModalWindow = ({
backgroundColor,
modal: true,
center: true,
// Hide top bar to hide close button (needed on Linux) so that
// one cannot close the modal window without using Save or Cancel
// buttons (and lose work on Piskel for instance) (Workaround for #4245).
Copy link
Collaborator

Choose a reason for hiding this comment

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

The ModalWindow is also used for yarn and jfxr.
Are we sure this removal of the top bar doesn't affect them?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It will affect them and for the same logic: we don't want to exit those modal windows without using the Save or Cancel buttons

Copy link
Collaborator

Choose a reason for hiding this comment

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

If we're happy it doesn't prevent closing the window on all 3 tools, then ok 👍

frame: false,
webPreferences: {
webSecurity: false,
// Allow Node.js API access in renderer process, as long
Expand Down