fix(ags overview): try to fix multi-monitor issue
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2023-12-27 16:14:14 -05:00
parent 42d4759786
commit 7860e2638e
2 changed files with 13 additions and 3 deletions

View file

@ -137,8 +137,18 @@ export const updateClients = (box) => {
const active = const active =
client.address === Hyprland.active.client.address; client.address === Hyprland.active.client.address;
// TODO: fix multi monitor issue. this is just a temp fix // TODO: see if this works on multi monitor setup
client.at[1] -= 2920; const alloc = box.get_allocation();
let monitor = box.get_display()
.get_monitor_at_point(alloc.x, alloc.y);
monitor = Hyprland.monitors.find((mon) => {
return mon.make === monitor.manufacturer &&
mon.model === monitor.model;
});
client.at[0] -= monitor.x;
client.at[1] -= monitor.y;
// Special workspaces that haven't been opened yet // Special workspaces that haven't been opened yet
// return a size of 0. We need to set them to default // return a size of 0. We need to set them to default

View file

@ -75,7 +75,7 @@ export const Overview = () => {
`, `,
}), }),
// TODO: throttle his? // TODO: throttle this?
setup: (self) => { setup: (self) => {
self.on('get-child-position', (_, ch) => { self.on('get-child-position', (_, ch) => {
if (ch === mainBox) { if (ch === mainBox) {