Skip to content

Commit

Permalink
Fix deadlocking on Linux clipboard test
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Dec 17, 2024
1 parent 9b720cb commit dceb723
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions internal/driver/glfw/clipboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ func (c clipboard) Content() string {
}

func (c clipboard) content() string {
content := ""
runOnMain(func() {
content = glfw.GetClipboardString()
})
return content
return glfw.GetClipboardString()
}

// SetContent sets the clipboard content
Expand All @@ -64,7 +60,5 @@ func (c clipboard) SetContent(content string) {
}

func (c clipboard) setContent(content string) {
runOnMain(func() {
glfw.SetClipboardString(content)
})
glfw.SetClipboardString(content)
}

0 comments on commit dceb723

Please sign in to comment.