Release Vulpes OS 2.7-preview.22
This commit is contained in:
parent
200d1fb235
commit
a138f97877
294 changed files with 515786 additions and 187 deletions
9
services/view-visibility.mjs
Normal file
9
services/view-visibility.mjs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// Gaia's transparent edge gesture zones are not modal overlays.
|
||||
export function frameUnobscured(document, frame, rect) {
|
||||
if (document.hidden || rect.width <= 0 || rect.height <= 0) return false;
|
||||
const system = document.location.hostname === 'system.localhost';
|
||||
return [[.5, .5], [.05, .05], [.95, .05], [.05, .95], [.95, .95]].every(([x, y]) => {
|
||||
const hit = document.elementFromPoint(rect.left + rect.width * x, rect.top + rect.height * y);
|
||||
return hit === frame || (system && !!hit?.matches('#left-panel.gesture-panel, #right-panel.gesture-panel'));
|
||||
});
|
||||
}
|
||||
Loading…
Reference in a new issue