mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00: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 => {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user