Skip to content

Commit 4a2f0d4

Browse files
committed
simpler automatic offset computation
1 parent c732564 commit 4a2f0d4

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

pyprland/plugins/scratchpads/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -517,14 +517,10 @@ async def get_offsets(self, scratch: Scratch, monitor: MonitorInfo | None = None
517517
if offset:
518518
return cast(tuple[int, int], (convert_monitor_dimension(offset, ref, monitor) for ref in aspect))
519519

520-
# compute from client size & margin
521-
margin = scratch.conf.get("margin", DEFAULT_MARGIN)
522-
523520
mon_size = [monitor["height"], monitor["width"]] if rotated else [monitor["width"], monitor["height"]]
524521

525-
margins = [convert_monitor_dimension(margin, dim, monitor) for dim in mon_size]
526-
scaled = map(int, [(a + m) / monitor["scale"] for a, m in zip(aspect, margins, strict=False)])
527-
return cast(tuple[int, int], scaled)
522+
offsets = [convert_monitor_dimension("100%", dim, monitor) for dim in mon_size]
523+
return cast(tuple[int, int], offsets)
528524

529525
async def _hide_transition(self, scratch: Scratch, monitor: MonitorInfo) -> bool:
530526
"""Animate hiding a scratchpad."""

pyprland/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Package version."""
22

3-
VERSION = "2.4.3-15"
3+
VERSION = "2.4.3-16"

0 commit comments

Comments
 (0)