mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-21 16:05:02 +02:00
Extend the SGR Pixel mouse reporting protocol to also report when the mouse leaves the window
This commit is contained in:
@@ -72,6 +72,10 @@ func Run(args []string) (rc int, err error) {
|
||||
return
|
||||
}
|
||||
lp.ClearScreen()
|
||||
if current_mouse_event.Event_type == loop.MOUSE_LEAVE {
|
||||
lp.Println("Mouse has left the window")
|
||||
return
|
||||
}
|
||||
lp.Printf("Position: %d, %d (pixels)\r\n", current_mouse_event.Pixel.X, current_mouse_event.Pixel.Y)
|
||||
lp.Printf("Cell : %d, %d\r\n", current_mouse_event.Cell.X, current_mouse_event.Cell.Y)
|
||||
lp.Printf("Type : %s\r\n", current_mouse_event.Event_type)
|
||||
|
||||
Reference in New Issue
Block a user