Commit Graph

203 Commits

Author SHA1 Message Date
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
Kovid Goyal
1bfc46a24f ... 2022-01-08 09:16:32 +05:30
Kovid Goyal
26b976d17d Merge branch 'fix-mouse-scroll' of https://github.com/page-down/kitty 2022-01-04 18:01:30 +05:30
pagedown
3141fc3f05 Update mouse cursor position when scrolling without OS window focus 2022-01-04 19:39:36 +08:00
pagedown
6afabf7e2a Fix mouse scrolling kitty window without OS window focus 2021-12-17 23:57:38 +08:00
Kovid Goyal
a4d4cf5819 Fix #4367 2021-12-17 17:35:13 +05:30
pagedown
b91809eaa4 Allows to open the command output in pager by mouse click 2021-11-17 22:25:49 +08:00
pagedown
aebf654e15 Add command output mouse selection 2021-11-16 18:15:53 +08:00
Kovid Goyal
b316e97a4f Allow middle clicking on a tab to close it
Fixes #4151
2021-10-24 22:56:30 +05:30
Kovid Goyal
a16ffcdde2 Handle mouse clicks when displaying focus window overlay 2021-10-15 09:55:15 +05:30
Kovid Goyal
967aaad482 ... 2021-10-14 10:07:54 +05:30
Kovid Goyal
9c4942b190 Ensure mouse cursor shape is correct
Previously, the shape was only set on focus in events and when hovering
urls. However, on macOS there are no focus events generated when the
mouse moves between the window and the titlebar/menubar, thus causing
incorrect mouse shape.

Fix #4118
2021-10-14 10:05:44 +05:30
Kovid Goyal
463133abbe Fix #4095 2021-10-05 07:20:40 +05:30
Kovid Goyal
a402a3ad12 Fix release not reporting button in sgr pixel protocol 2021-09-28 16:20:32 +05:30
Kovid Goyal
3efa8b6322 In SGR_PIXEL_MODE report pixel co-ords outside of window when dragging 2021-09-28 15:14:29 +05:30
Kovid Goyal
9a3d99515f Add support for reporting mouse events with pixel co-ordinates using the SGR_PIXEL_PROTOCOL introduced in xterm 359 2021-09-28 11:41:35 +05:30
Kovid Goyal
f61b8608de Fix mouse click event using current mouse co-ords rather than the co-ords at the time of the click 2021-08-18 10:06:08 +05:30
Kovid Goyal
fa327d618d Cursor movement at shell prompts on click
Fixes #3825
2021-08-18 10:06:07 +05:30
Kovid Goyal
bc202aec6e Dont discard information on whether a click hit a URL 2021-08-18 10:06:07 +05:30
Kovid Goyal
be34af4555 Remove inline from .c files
It is ignored by compilers and hides unused static functions
2021-08-03 09:11:17 +05:30
Kovid Goyal
a5b293401d Add an action to restore move-end behavior when extending selections 2021-07-04 19:02:33 +05:30
Kovid Goyal
e732df46b8 Have right clicking to extend selection operate on the nearest selection boundary instead of the selection end. This matches both vim and xterm 2021-07-04 18:00:41 +05:30
Kovid Goyal
ad5d14c672 Fix #3703 2021-06-10 16:53:27 +05:30
Kovid Goyal
caa44b3d4a Position tab bar as per new margin options
Also mouse clicking anywhere in the tab bar margins should be the same
as clicking in the tab bar, for ease of use.
2021-06-05 09:02:01 +05:30
Kovid Goyal
81411e6b54 Fix trailing parentheses in URLs not being detected
Also fix URLs starting near the end of the line not being detected.

Fixes #3688
2021-06-04 18:13:36 +05:30
Kovid Goyal
76c9f46438 Disambiguate between click and doublepress
A doubleprpess should not generate a click event
2021-05-23 13:38:19 +05:30
Kovid Goyal
85ef3724f1 Proper prefix when reporting Move events 2021-05-11 14:02:17 +05:30
Kovid Goyal
cb21422836 Add click and doubleclick events as well 2021-05-11 13:59:52 +05:30
Kovid Goyal
1c9674cec9 SPlit up add_click into two functions 2021-05-11 13:19:34 +05:30