mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-07 09:21:24 +08:00
fix(electron): screen resize sometimes does not work well after maximize (#8413)
fix AF-1460
This commit is contained in:
@@ -693,7 +693,13 @@ export class WebContentViewsManager {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
screenSizeChangeEvents.forEach(event => {
|
screenSizeChangeEvents.forEach(event => {
|
||||||
w.on(event as any, onResize);
|
w.on(event as any, () => {
|
||||||
|
onResize();
|
||||||
|
// sometimes the resize event is too fast, the view is not ready for the new size (esp. on linux)
|
||||||
|
setTimeout(() => {
|
||||||
|
onResize();
|
||||||
|
}, 100);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// add shell view
|
// add shell view
|
||||||
|
|||||||
Reference in New Issue
Block a user