Skip to content

Commit

Permalink
fixes #53254
Browse files Browse the repository at this point in the history
  • Loading branch information
sbatten committed Jun 30, 2018
1 parent 1ee1759 commit db2f851
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/vs/code/electron-main/menus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ export class CodeMenu {
const w = this.windowsMainService.getFocusedWindow();
if (w && w.win) {
const contents = w.win.webContents;
if (w.hasHiddenTitleBarStyle() && !w.win.isFullScreen() && !contents.isDevToolsOpened()) {
if (isMacintosh && w.hasHiddenTitleBarStyle() && !w.win.isFullScreen() && !contents.isDevToolsOpened()) {
contents.openDevTools({ mode: 'undocked' }); // due to https://github.com/electron/electron/issues/3647
} else {
contents.toggleDevTools();
Expand Down
4 changes: 2 additions & 2 deletions src/vs/platform/windows/electron-main/windowsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { IWorkspaceIdentifier, IWorkspaceFolderCreationData } from 'vs/platform/
import { ISerializableCommandAction } from 'vs/platform/actions/common/actions';
import { Schemas } from 'vs/base/common/network';
import { mnemonicButtonLabel } from 'vs/base/common/labels';
import { isWindows } from 'vs/base/common/platform';
import { isWindows, isMacintosh } from 'vs/base/common/platform';
import { ILogService } from 'vs/platform/log/common/log';

export class WindowsService implements IWindowsService, IURLHandler, IDisposable {
Expand Down Expand Up @@ -133,7 +133,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable

if (codeWindow) {
const contents = codeWindow.win.webContents;
if (codeWindow.hasHiddenTitleBarStyle() && !codeWindow.win.isFullScreen() && !contents.isDevToolsOpened()) {
if (isMacintosh && codeWindow.hasHiddenTitleBarStyle() && !codeWindow.win.isFullScreen() && !contents.isDevToolsOpened()) {
contents.openDevTools({ mode: 'undocked' }); // due to https://github.com/electron/electron/issues/3647
} else {
contents.toggleDevTools();
Expand Down

0 comments on commit db2f851

Please sign in to comment.