We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fbcd792 commit 56a7ee7Copy full SHA for 56a7ee7
backend/utils/display.go
@@ -16,7 +16,7 @@ func GetDisplayBounds() []image.Rectangle {
16
bounds = append(bounds, screenshot.GetDisplayBounds(i))
17
}
18
19
- if runtime.GOOS == "linux" {
+ if runtime.GOOS == "linux" && n > 0 {
20
// gdk_monitor_get_geometry considers 0,0 to be the corner of the bounding box of all the monitors,
21
// not the 0,0 of the main monitor
22
boundingBox := bounds[0]
@@ -36,7 +36,10 @@ func GetDisplayBoundsAt(x, y int) image.Rectangle {
36
37
displays := GetDisplayBounds()
38
39
- curDisplay := displays[0] // use main display as fallback
+ curDisplay := image.Rect(0, 0, 0, 0)
40
+ if len(displays) > 0 {
41
+ curDisplay = displays[0] // use main display as fallback
42
+ }
43
44
for _, d := range displays {
45
if point.In(d) {
0 commit comments