Skip to content

Commit

Permalink
validate physical heads
Browse files Browse the repository at this point in the history
  • Loading branch information
leukipp committed Jun 18, 2023
1 parent ecba12f commit 35210e2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion store/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@ func PhysicalHeadsGet(rGeom xrect.Rect) xinerama.Heads {
heads, _ = xinerama.PhysicalHeads(X)
}

return heads
// Validate physical heads
if len(heads) > 0 {
return heads
}
log.Warn("Error retrieving screen dimensions")

return ViewPorts.Screens
}

func ViewPortsGet(X *xgbutil.XUtil) (Head, error) {
Expand Down

0 comments on commit 35210e2

Please sign in to comment.