Files
ignis/shims/electron/remote/screen.js

41 lines
847 B
JavaScript
Raw Normal View History

2026-03-07 14:38:51 +01:00
export const screenShim = {
getPrimaryDisplay() {
return {
2026-03-11 22:08:30 +01:00
workAreaSize: {
width: window.screen.availWidth,
height: window.screen.availHeight,
},
2026-03-07 14:38:51 +01:00
size: { width: window.screen.width, height: window.screen.height },
scaleFactor: window.devicePixelRatio || 1,
2026-03-11 22:08:30 +01:00
bounds: {
x: 0,
y: 0,
width: window.screen.width,
height: window.screen.height,
},
workArea: {
x: 0,
y: 0,
width: window.screen.availWidth,
height: window.screen.availHeight,
},
2026-03-07 14:38:51 +01:00
};
},
getAllDisplays() {
return [screenShim.getPrimaryDisplay()];
},
getDisplayNearestPoint(point) {
return screenShim.getPrimaryDisplay();
},
getCursorScreenPoint() {
return { x: 0, y: 0 };
},
on() {},
once() {},
removeListener() {},
};