231 Commits

Author SHA1 Message Date
Kovid Goyal
9c7c432560 macOS: Fix a regression causing a crash when using focus_follows_mouse
Fixes #8437
2025-03-13 08:36:40 +05:30
Kovid Goyal
27df509206 Nicer fix for enter event mouse tracking
Send an explicit mouse event to child when pointer enters window instead
of relying on GLFW to send a cursor position update event.
2025-03-04 11:29:29 +05:30
Kovid Goyal
2a714928db When dragging in rectangle select mode use a crosshair mouse cursor 2025-02-23 10:32:54 +05:30
Kovid Goyal
8993386399 Store font related cell metrics in a single struct 2025-02-03 10:56:44 +05:30
Jesse Weaver
b8f28d7a10 Add special flag to shell integration protocol to request real click events 2024-09-06 00:08:55 -06:00
Kovid Goyal
fc13b06b35 Implement proper unit bezier easing function
Code based on WebKit
https://github.com/WebKit/WebKit/blob/main/Source/WebCore/platform/graphics/UnitBezier.h
2024-07-18 22:25:02 +05:30
Kovid Goyal
d6e24d4af7 ... 2024-07-08 06:43:37 +05:30
Kovid Goyal
f8beaa0a4b Dispatch any clicks waiting for click_interval on key events
Fixes #7601
2024-07-07 20:17:22 +05:30
Kovid Goyal
48070ff38e Fix #7481 2024-05-28 15:14:13 +05:30
Kovid Goyal
85280b0304 ... 2024-05-27 10:53:41 +05:30
Kovid Goyal
c57f65079f Forgot Apple likes to scroll backwards
Fixes #7475
2024-05-27 10:51:40 +05:30
Kovid Goyal
85a64f2934 Scrolling with mouse wheel when a selection is active should update the selection
Fixes #7543
2024-05-20 09:58:48 +05:30
MithicSpirit
71a958f6f6 fix: horizontal scrolling direction
Fixes kovidgoyal#7439.
2024-05-16 16:22:45 -04:00
Kovid Goyal
8fc96c5bd7 Make the debug logging functions consistent
They now all output the same format of:
[time since program start] msg
2024-04-08 12:53:55 +05:30
Kovid Goyal
1f149861f9 Mouse reporting: Fix drag release event outside the window not being reported in legacy mouse reporting modes
Fixes #7244
2024-03-21 20:32:58 +05:30
Kovid Goyal
f596351bc1 Pause selection rendering 2024-02-25 09:57:33 +05:30
Kovid Goyal
5f809bf249 Get kitty building with the new VT parser 2024-02-25 09:57:22 +05:30
Pavel Solovev
99b3d0727d Fix build with gcc14 2024-01-19 11:25:53 +03:00
Kovid Goyal
0a2fcf1805 Mouse reporting: Fix incorrect position reported for windows with padding
Fixes #6950
2023-12-26 22:27:20 +05:30
Kovid Goyal
b1ec1c2678 ... 2023-10-24 18:39:28 +05:30
Kovid Goyal
d94a5bd386 Fix #6746 2023-10-24 07:21:30 +05:30
Kovid Goyal
1693107608 A new escape code to change the shape of the mouse pointer
Fixes #6711
2023-10-15 19:57:36 +05:30
Kovid Goyal
4f1971c480 Rationalize mouse cursor shape handling
Now can use the full range of standard mouse cursor shapes similar to
those supported by browsers via the CSS cursor property.

Still needs to be fully implemented for cocoa backend.
2023-10-15 09:17:31 +05:30
Kovid Goyal
cae19bba60 ... 2023-10-14 06:05:32 +05:30
Eric Myhre
d310acc780 Add word-and-line-from-point feature to possible mouse selection actions. 2023-10-05 17:47:53 +02:00
olzhasar
d0a5d1b3a4 Fix misspellings 2023-06-14 03:39:53 +06:00
Luofan Chen
130315ce8d Use strict function prototypes
Fixes clang error:
error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
2023-02-09 13:16:00 +08:00
Kovid Goyal
f4ac03b791 Show the target of terminal hyperlinks when hovering over them with the mouse
Fixes #5830
2022-12-29 16:43:45 +05:30
Kovid Goyal
2a2dca8a58 ... 2022-09-18 08:26:40 +05:30
Kovid Goyal
e1f3cb85c0 Window for id should not fail when not called from a callback 2022-09-18 08:24:02 +05:30
Kovid Goyal
5180a41e87 Fix a use-after-free when handling fake mouse clicks and the action causes windows to be removed/re-allocated
Fixes #5506
2022-09-17 18:21:10 +05:30
Kovid Goyal
58a3baaf0f Wayland: Use XDG_ACTIVATION_TOKEN when present at launch 2022-09-11 13:43:52 +05:30
Kovid Goyal
6912d8c086 No need for entire screen object when scaling a scroll 2022-06-18 06:55:28 +05:30
Kovid Goyal
a89e1b5573 Fix horizontal wheel events not being reported to client programs when they grab the mouse
Fixes #2819
2022-06-18 06:47:42 +05:30
Kovid Goyal
3a9c6088b2 Add debug output for scroll events 2022-06-18 05:54:26 +05:30
Kovid Goyal
8fcd5e40d4 Proper fix for reporting button in drag events to children 2022-04-21 11:41:57 +05:30
Kovid Goyal
55b21b741e Fix a regression in the previous release that caused mouse move events to be incorrectly reported as drag events even when a button is not pressed
Fixes #4992

Will need to investigate a different fix for #4925. xterm does report
the button press that caused the drag to start with move events, so we
will have to track that to match its behavior as glfw does not track it
for us.
2022-04-21 07:53:37 +05:30
Kovid Goyal
e7b216ba68 DRYer 2022-04-07 16:24:57 +05:30
Kovid Goyal
838a85ee8b Fix drag event reporting not specifying the current button.
xterm does this, so in the absence of a spec we copy xterm. Fixes #4925
2022-04-07 16:22:26 +05:30
Kovid Goyal
f63dbc0ebd clamp min_lines when mouse is grabbed 2022-02-15 07:24:12 +05:30
Kovid Goyal
88630731dc Cleanup previous PR 2022-02-14 20:21:17 +05:30
pagedown
d2f522277c Add wheel_scroll_min_lines to set the minimum scrolling lines 2022-02-14 21:53:02 +08:00
Kovid Goyal
3be00bd712 Reduce radius for detection of double click 2022-02-13 15:51:59 +05:30
Kovid Goyal
da5111a267 Cleanup mouse debug input reporting 2022-02-13 11:14:41 +05:30
Kovid Goyal
b931b06941 Add mouse co-ords to debug output for move events 2022-02-11 15:09:43 +05:30
Kovid Goyal
275ede6f0a Fix a fast click, move mouse, click sequence causing the first click event to be discarded
Fix #4603
2022-02-11 14:46:37 +05:30
Kovid Goyal
60f675758f Fix touch_scroll_multiplier also taking effect in terminal programs such as vim that handle mouse events themselves
Fixes #4680
2022-02-11 06:22:00 +05:30
Kovid Goyal
5f4e519d61 ... 2022-01-22 15:13:53 +05:30
Kovid Goyal
720bf7efd6 Fix mouse position reported incorrectly on click event in a newly created window if the mouse has never moved in that window 2022-01-22 15:10:14 +05:30
Kovid Goyal
8622c47348 Fix #4430 2022-01-08 10:00:25 +05:30