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

Add logic to open settings window next to main window #204

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

matthme
Copy link
Collaborator

@matthme matthme commented Aug 21, 2024

Replaces #201

@matthme matthme requested a review from c12i August 21, 2024 08:50
@matthme matthme mentioned this pull request Aug 21, 2024
const mainWindow = PRIVILEDGED_LAUNCHER_WINDOWS[MAIN_WINDOW];
const [xMain, yMain] = mainWindow.getPosition();
const settingsWindow = PRIVILEDGED_LAUNCHER_WINDOWS[SETTINGS_WINDOW];
if (!settingsWindow) throw new Error('Settings window is undefined.');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting, the settingsWindow remains undefined until the show method is called right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, it should already be defined here as it is being created as part of the setupAppWindows function (in this PR again, this was not the case in #201) .

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

.show() only makes it be visible and come to front on the screen. The BrowserWindow javascript object is already defined before that.

@matthme matthme merged commit 6d6192d into develop Aug 21, 2024
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