Skip to content

Commit

Permalink
make monitor removal a bit more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
fdev31 committed Nov 6, 2024
1 parent b32b8c8 commit 59dfe1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pyprland/plugins/scratchpads/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,11 @@ async def event_monitorremoved(self, monitor_name: str) -> None:
"""Hides scratchpads on the removed screen."""
for scratch in self.scratches.values():
if scratch.monitor == monitor_name:
await self.run_hide(scratch.uid, flavor=HideFlavors.TRIGGERED_BY_AUTOHIDE)
try:
await self.run_hide(scratch.uid, flavor=HideFlavors.TRIGGERED_BY_AUTOHIDE)
except Exception as e:
self.log.exception("Failed to hide %s", scratch.uid)
await self.notify_info(f"Failed to hide {scratch.uid}: {e}")

async def event_configreloaded(self, _nothing: str) -> None:
"""Re-apply windowrules when hyprland is restarted."""
Expand Down
2 changes: 1 addition & 1 deletion pyprland/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Package version."""

VERSION = "2.4.2"
VERSION = "2.4.2-1"

0 comments on commit 59dfe1c

Please sign in to comment.