[MM-22720] Assume maximize setting when AppleActionOnDoubleClick isn't explicitly set (#1214)
* [MM-22720] Assume maximize setting when AppleActionOnDoubleClick isn't explicitly set * Forced for macOS only and made same changes to SettingsPage Co-authored-by: mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
@@ -547,16 +547,18 @@ export default class MainPage extends React.Component {
|
||||
}
|
||||
|
||||
handleDoubleClick = () => {
|
||||
if (process.platform === 'darwin') {
|
||||
const doubleClickAction = remote.systemPreferences.getUserDefault('AppleActionOnDoubleClick', 'string');
|
||||
const win = remote.getCurrentWindow();
|
||||
if (doubleClickAction === 'Minimize') {
|
||||
win.minimize();
|
||||
} else if (doubleClickAction === 'Maximize' && !win.isMaximized()) {
|
||||
} else if (!win.isMaximized()) {
|
||||
win.maximize();
|
||||
} else if (doubleClickAction === 'Maximize' && win.isMaximized()) {
|
||||
} else if (win.isMaximized()) {
|
||||
win.unmaximize();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addServer = () => {
|
||||
this.setState({
|
||||
|
@@ -467,16 +467,18 @@ export default class SettingsPage extends React.Component {
|
||||
}
|
||||
|
||||
handleDoubleClick = () => {
|
||||
if (process.platform === 'darwin') {
|
||||
const doubleClickAction = remote.systemPreferences.getUserDefault('AppleActionOnDoubleClick', 'string');
|
||||
const win = remote.getCurrentWindow();
|
||||
if (doubleClickAction === 'Minimize') {
|
||||
win.minimize();
|
||||
} else if (doubleClickAction === 'Maximize' && !win.isMaximized()) {
|
||||
} else if (!win.isMaximized()) {
|
||||
win.maximize();
|
||||
} else if (doubleClickAction === 'Maximize' && win.isMaximized()) {
|
||||
} else if (win.isMaximized()) {
|
||||
win.unmaximize();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
handleMaximizeState = () => {
|
||||
const win = remote.getCurrentWindow();
|
||||
|
Reference in New Issue
Block a user