Skip to content

Commit

Permalink
fix: Properly fix the focus lost tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
bric3 committed May 18, 2024
1 parent 217303f commit 214151d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import java.awt.Graphics2D
import java.awt.LayoutManager
import java.awt.RenderingHints
import java.awt.event.AWTEventListener
import java.awt.event.FocusEvent
import java.awt.event.FocusEvent.FOCUS_LOST
import java.awt.event.MouseAdapter
import java.awt.event.MouseEvent
import java.awt.event.MouseEvent.MOUSE_DRAGGED
import java.awt.event.MouseEvent.MOUSE_ENTERED
import java.awt.event.MouseEvent.MOUSE_EXITED
import java.awt.event.MouseEvent.MOUSE_MOVED
import java.awt.event.MouseEvent.MOUSE_WHEEL
import java.awt.event.WindowEvent.WINDOW_LOST_FOCUS
import java.util.*
import javax.swing.*

Expand Down Expand Up @@ -105,7 +106,7 @@ private class FollowingTip {
}
}

FocusEvent.FOCUS_LOST -> {
WINDOW_LOST_FOCUS, FOCUS_LOST -> {
tipWindow.isVisible = false
}

Expand All @@ -131,6 +132,7 @@ private class FollowingTip {
AWTEvent.MOUSE_EVENT_MASK
or AWTEvent.MOUSE_MOTION_EVENT_MASK
or AWTEvent.MOUSE_WHEEL_EVENT_MASK
or AWTEvent.WINDOW_FOCUS_EVENT_MASK
or AWTEvent.FOCUS_EVENT_MASK
)
}
Expand Down

0 comments on commit 214151d

Please sign in to comment.