Hide menu bar in calls popout window (#2475)
This commit is contained in:
@@ -51,6 +51,9 @@ describe('main/windows/callsWidgetWindow', () => {
|
|||||||
baseWindow.setBackgroundColor = jest.fn();
|
baseWindow.setBackgroundColor = jest.fn();
|
||||||
baseWindow.setMenuBarVisibility = jest.fn();
|
baseWindow.setMenuBarVisibility = jest.fn();
|
||||||
baseWindow.setBounds = jest.fn();
|
baseWindow.setBounds = jest.fn();
|
||||||
|
baseWindow.webContents = {
|
||||||
|
setWindowOpenHandler: jest.fn(),
|
||||||
|
};
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
mainWindow.getBounds.mockImplementation(() => {
|
mainWindow.getBounds.mockImplementation(() => {
|
||||||
@@ -138,6 +141,7 @@ describe('main/windows/callsWidgetWindow', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
baseWindow.webContents = {
|
baseWindow.webContents = {
|
||||||
|
...baseWindow.webContents,
|
||||||
openDevTools: jest.fn(),
|
openDevTools: jest.fn(),
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -258,6 +262,7 @@ describe('main/windows/callsWidgetWindow', () => {
|
|||||||
|
|
||||||
it('onShareScreen', () => {
|
it('onShareScreen', () => {
|
||||||
baseWindow.webContents = {
|
baseWindow.webContents = {
|
||||||
|
...baseWindow.webContents,
|
||||||
send: jest.fn(),
|
send: jest.fn(),
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -272,6 +277,7 @@ describe('main/windows/callsWidgetWindow', () => {
|
|||||||
|
|
||||||
it('onJoinedCall', () => {
|
it('onJoinedCall', () => {
|
||||||
baseWindow.webContents = {
|
baseWindow.webContents = {
|
||||||
|
...baseWindow.webContents,
|
||||||
send: jest.fn(),
|
send: jest.fn(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -82,6 +82,15 @@ export default class CallsWidgetWindow extends EventEmitter {
|
|||||||
ipcMain.on(CALLS_WIDGET_SHARE_SCREEN, this.onShareScreen);
|
ipcMain.on(CALLS_WIDGET_SHARE_SCREEN, this.onShareScreen);
|
||||||
ipcMain.on(CALLS_JOINED_CALL, this.onJoinedCall);
|
ipcMain.on(CALLS_JOINED_CALL, this.onJoinedCall);
|
||||||
|
|
||||||
|
this.win.webContents.setWindowOpenHandler(() => {
|
||||||
|
return {
|
||||||
|
action: 'allow',
|
||||||
|
overrideBrowserWindowOptions: {
|
||||||
|
autoHideMenuBar: true,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
this.load();
|
this.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user