Also set the motion indicator bit for mouse leave events
This commit is contained in:
parent
4d3bbd82e0
commit
7fb0350fa7
2 changed files with 3 additions and 2 deletions
|
|
@ -37,7 +37,8 @@ Reporting when the mouse leaves the window
|
|||
kitty extends the SGR Pixel mouse reporting protocol created by xterm to
|
||||
also report when the mouse leaves the window. This is event is delivered
|
||||
encoded as a normal SGR pixel event except that the eight bit is set on the
|
||||
first number. bits 1-7 are used to encode button and modifier information.
|
||||
first number. Additionally, bit 5 is set to indicate this is a motion related event.
|
||||
The remaining bits 1-7 (except 5) are used to encode button and modifier information.
|
||||
When bit 8 is set it means the event is a mouse has left the window event,
|
||||
and all other bits should be ignored. The pixel position values must also
|
||||
be ignored as they may not be accurate.
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ encode_mouse_event_impl(const MousePosition *mpos, int mouse_tracking_protocol,
|
|||
break;
|
||||
case LEAVE:
|
||||
if (mouse_tracking_protocol != SGR_PIXEL_PROTOCOL) return 0;
|
||||
cb = LEAVE_INDICATOR;
|
||||
cb = LEAVE_INDICATOR | MOTION_INDICATOR;
|
||||
break;
|
||||
default:
|
||||
if (cb == UINT_MAX) return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue