mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-29 02:11:28 -06:00
ELECTRON-956 - removing the minimize and maximize from the configure desktop alert position (#535)
This commit is contained in:
parent
9a049a3b20
commit
a1426c79b6
@ -441,8 +441,8 @@ function getTemplate(app) {
|
||||
// This adds About Symphony under help menu for windows
|
||||
template[3].submenu.push({
|
||||
label: i18n.getMessageFor('About Symphony'),
|
||||
click(focusedWindow) {
|
||||
let windowName = focusedWindow ? focusedWindow.name : '';
|
||||
click(menuItem, focusedWindow) {
|
||||
let windowName = focusedWindow ? focusedWindow.winName : '';
|
||||
aboutApp.openAboutWindow(windowName);
|
||||
}
|
||||
});
|
||||
|
@ -504,6 +504,7 @@ function doCreateMainWindow(initialUrl, initialBounds, isCustomTitleBar) {
|
||||
newWinOptions.minHeight = MIN_HEIGHT;
|
||||
newWinOptions.alwaysOnTop = alwaysOnTop;
|
||||
newWinOptions.frame = true;
|
||||
newWinOptions.parent = null;
|
||||
|
||||
let newWinKey = getGuid();
|
||||
|
||||
@ -795,6 +796,19 @@ function doCreateMainWindow(initialUrl, initialBounds, isCustomTitleBar) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* ELECTRON-956: App is not minimized upon "Configure Desktop Alert Position" modal when "Always on Top" = True
|
||||
*/
|
||||
app.on('browser-window-created', (event, window) => {
|
||||
const parentWindow = window.getParentWindow();
|
||||
if (parentWindow && !parentWindow.isDestroyed()) {
|
||||
if (parentWindow.winName === 'main') {
|
||||
window.setMinimizable(false);
|
||||
window.setMaximizable(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Handles the event before-quit emitted by electron
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user