Skip to content

Commit

Permalink
add clarifying comment on FocusGained/FocusLost regarding locking
Browse files Browse the repository at this point in the history
  • Loading branch information
toaster committed Sep 22, 2020
1 parent b69f249 commit 0b06e76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions canvasobject.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ type Draggable interface {
// It will receive the FocusGained and FocusLost events appropriately.
// When focused it will also have TypedRune called as text is input and
// TypedKey called when other keys are pressed.
//
// Note: You must not change canvas state (including overlays or focus) in FocusGained or FocusLost
// or you would end up with a dead-lock.
type Focusable interface {
FocusGained()
FocusLost()
Expand Down

0 comments on commit 0b06e76

Please sign in to comment.