refactor: use views NonClientHitTest for draggable regions on mac (#35603)
* refactor: use views NonClientHitTest for draggable regions on mac * iwyu * add backport of 9bb5f0316 * chore: update patches * remove some unneeded functions * remove test for triggering when BW is focused * chore: update patches * simplify views/mac split now that the draggable logic is the same * Apply suggestions from code review Co-authored-by: Charles Kerr <charles@charleskerr.com> * Update shell/browser/native_window.h Co-authored-by: Charles Kerr <charles@charleskerr.com> * fix build Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
7ce94eb0b4
commit
8a926ffde4
15 changed files with 70 additions and 392 deletions
|
@ -897,28 +897,6 @@ describe('webContents module', () => {
|
|||
w.webContents.focus();
|
||||
await expect(focusPromise).to.eventually.be.fulfilled();
|
||||
});
|
||||
|
||||
it('is triggered when BrowserWindow is focused', async () => {
|
||||
const window1 = new BrowserWindow({ show: false });
|
||||
const window2 = new BrowserWindow({ show: false });
|
||||
|
||||
await Promise.all([
|
||||
window1.loadURL('about:blank'),
|
||||
window2.loadURL('about:blank')
|
||||
]);
|
||||
|
||||
const focusPromise1 = emittedOnce(window1.webContents, 'focus');
|
||||
const focusPromise2 = emittedOnce(window2.webContents, 'focus');
|
||||
|
||||
window1.showInactive();
|
||||
window2.showInactive();
|
||||
|
||||
window1.focus();
|
||||
await expect(focusPromise1).to.eventually.be.fulfilled();
|
||||
|
||||
window2.focus();
|
||||
await expect(focusPromise2).to.eventually.be.fulfilled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('blur event', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue