mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-19 04:08:48 +00:00
ags: monitor size: handle transformations (rotations)
This commit is contained in:
parent
4887a22a02
commit
ecdc219356
1 changed files with 8 additions and 2 deletions
|
|
@ -17,8 +17,14 @@ async function updateStuff() {
|
|||
monitor.height = gdkMonitor.get_geometry().height;
|
||||
}
|
||||
else { // == "division"
|
||||
monitor.width = Math.ceil(monitor.realWidth / monitor.scale);
|
||||
monitor.height = Math.ceil(monitor.realHeight / monitor.scale);
|
||||
if (monitor.transform % 2 == 1) { // Vertical monitors (or horizontal monitor that's vertical by default...)
|
||||
monitor.width = Math.floor(monitor.realHeight / monitor.scale);
|
||||
monitor.height = Math.floor(monitor.realWidth / monitor.scale);
|
||||
}
|
||||
else {
|
||||
monitor.width = Math.ceil(monitor.realWidth / monitor.scale);
|
||||
monitor.height = Math.ceil(monitor.realHeight / monitor.scale);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue