Fix issue where Linux menubar pops up when it's not supposed to (#2709)
This commit is contained in:
@@ -97,7 +97,6 @@ export class MainWindow extends EventEmitter {
|
|||||||
throw new Error('unable to create main window');
|
throw new Error('unable to create main window');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.win.setAutoHideMenuBar(true);
|
|
||||||
this.win.setMenuBarVisibility(false);
|
this.win.setMenuBarVisibility(false);
|
||||||
|
|
||||||
this.win.once('ready-to-show', () => {
|
this.win.once('ready-to-show', () => {
|
||||||
@@ -416,6 +415,9 @@ export class MainWindow extends EventEmitter {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For some reason on Linux I've seen the menu bar popup again
|
||||||
|
this.win?.setMenuBarVisibility(false);
|
||||||
|
|
||||||
this.emit(MAIN_WINDOW_RESIZED, newBounds);
|
this.emit(MAIN_WINDOW_RESIZED, newBounds);
|
||||||
this.lastEmittedBounds = newBounds;
|
this.lastEmittedBounds = newBounds;
|
||||||
}, 10);
|
}, 10);
|
||||||
@@ -434,9 +436,6 @@ export class MainWindow extends EventEmitter {
|
|||||||
private onEnterFullScreen = () => {
|
private onEnterFullScreen = () => {
|
||||||
this.win?.webContents.send('enter-full-screen');
|
this.win?.webContents.send('enter-full-screen');
|
||||||
this.emitBounds();
|
this.emitBounds();
|
||||||
|
|
||||||
// For some reason on Linux I've seen the menu bar popup again
|
|
||||||
this.win?.setMenuBarVisibility(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private onLeaveFullScreen = () => {
|
private onLeaveFullScreen = () => {
|
||||||
|
Reference in New Issue
Block a user