Luflosi
f3b9ff5f9f
Use datatype monotonic_t instead of double to keep track of time
...
The time is stored in a signed 64 bit integer with nanosecond accuracy. This eliminates the possibility of floating-point inaccuracies.
`monotonic_t` can currently hold values large enough to work correctly for more than 200 years into the future.
Using a typedef instead of directly using `int64_t` everywhere will also allow easily changing the datatype in the future should the need arise for more precise or bigger time values.
2019-09-25 17:43:11 +02:00
Luflosi
d0ac218c05
Remove empty line
2019-07-25 20:41:08 -05:00
Luflosi
546dd9b225
Remove unnecessary call to monotonic()
...
Assuming the call to `update_drag()` returns basically instantly, this call to `monotonic()` can be safely removed.
2019-07-24 23:12:50 -05:00
Kovid Goyal
87ed774cb4
Add a new option :opt:pointer_shape_when_grabbed that allows you to control the mouse pointer shape when the terminal programs grabs the pointer
...
Fixes #1808
2019-07-19 19:34:32 +05:30
Kovid Goyal
195d987331
Make handle_in_kitty consistent between the button and motion handlers
2019-07-19 18:58:46 +05:30
Kovid Goyal
1e172caea3
- Add an option :opt:terminal_select_modifiers to control which modifiers are used to override mouse selection
...
Fixes #1774
2019-07-03 10:50:07 +05:30
Luflosi
07beb53b37
Add space after "if"
2019-06-21 12:12:13 +02:00
Kovid Goyal
9849a69afd
Allow extending word selections to non-word chars
2019-05-16 20:20:03 +05:30
Kovid Goyal
4fff84b4b9
Add void to all function declarations for functions that take no arguments
...
Micro-optimization for some architectures. Enforced via
-Wstrict-prototypes
2019-05-13 11:04:21 +05:30
Kovid Goyal
2cc779b667
Merge branch 'fix-mouse-release-other-window' of https://github.com/eepp/kitty
2019-04-03 10:59:54 +05:30
Philippe Proulx
fd2515da5c
Do not focus window when mouse button is released
...
It is useless to focus a window on mouse button release. This behaviour
makes this scenario possible:
1. Have at least two visible windows in the current tab.
2. Select text in a window with the left mouse button, dragging, and
release the mouse button within the other window.
The focus is changed to the other window. I believe this is unexpected.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com >
2019-04-02 19:36:26 -04:00
Philippe Proulx
db1f53fc29
Double-click + drag to select multiple words
...
This patch reverts part of cb095be0cc to
allow again to double-click and then drag to select multiple words.
With this patch, the primary selection is still not updated until you
release the mouse's left button, but the selection does not "block" on
the first word while trying to double-click and drag.
I believe this behaviour has come to be expected by users, since GNOME
Terminal, Terminator, xterm, rxvt, major browsers, LibreOffice, and many
more significant applications have it.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com >
2019-04-02 18:31:32 -04:00
Kovid Goyal
cb095be0cc
Only update the selected text to clipboard when the selection is finished, not continuously as it is updated.
...
Fixes #1460
Fixes #1492
2019-03-24 08:44:12 +05:30
Luflosi
0e2a5c63c6
Convert some tabs to spaces
2019-02-02 22:08:32 +01:00
Kovid Goyal
de130787f6
Make the charsets code useable in kittens
2019-01-23 11:33:45 +05:30
Kovid Goyal
63ff3cfb9f
Merge branch 'negative_scroll_alternate_mode' of https://github.com/Luflosi/kitty
2019-01-14 10:10:22 +05:30
Luflosi
7421a0b9e3
Apply negative scroll multiplier in alternate screen mode
...
Fixes kovidgoyal/kitty#1299
2019-01-14 00:11:19 +01:00
Luflosi
e0246044b7
Add remaining momentum scroll phases to switch statement
...
According to https://developer.apple.com/documentation/appkit/nsevent/1533550-phase the momentum phase may end with "cancelled" instead of "ended"
2018-12-28 09:03:16 +01:00
Kovid Goyal
a038f62a5b
Fix #1272
2018-12-28 07:52:29 +05:30
Luflosi
43a25c49c4
Micro optimization
2018-12-27 15:19:22 +01:00
Luflosi
e47e2b2560
Move check for zero scroll distance to scroll_event()
2018-12-27 15:17:18 +01:00
Luflosi
7652065134
Add more momentum scroll phases
2018-12-27 15:12:57 +01:00
Kovid Goyal
d0da418e49
...
2018-12-27 08:19:06 +05:30
Kovid Goyal
77e72cfd9a
Fix #1270
2018-12-27 08:05:31 +05:30
Kovid Goyal
7b2ecb0498
Forgot a break
2018-12-27 08:02:24 +05:30
Luflosi
d52da934ca
Fix typo in bitshift
2018-12-26 22:47:23 +01:00
Kovid Goyal
21951e3668
Add explicit default case
2018-12-26 20:39:39 +05:30
Kovid Goyal
64bef38813
macOS: Fix momentum scrolling continuing when changing the active window/tab
...
Fixes #1267
2018-12-26 20:39:04 +05:30
Kovid Goyal
b881364c50
Merge branch 'mouse_scroll_acceleration_alternate_screen_mode' of https://github.com/Luflosi/kitty
2018-12-23 20:41:48 +05:30
Luflosi
76059882c4
Allow for scrolling acceleration in alternate screen mode when using low-resolution input devices like mice
2018-12-23 14:37:50 +01:00
Luflosi
021dfcad39
Fix broken downward scrolling
2018-12-23 12:49:00 +01:00
Kovid Goyal
494035c94b
remove redundant code
2018-12-23 08:15:57 +05:30
Kovid Goyal
703a1b83a8
macOS: Fix scrolling very slowly with wheel mice not working
...
Fixes #1238
2018-12-18 11:15:22 +05:30
Kovid Goyal
c17c801a31
Detect URL when clicking to activate URL
...
Makes the case where the screen contents have changed
between the last mouse move and the click work. See #1203
2018-12-05 14:43:01 +05:30
Kovid Goyal
a0ff625f61
When double or triple clicking ignore clicks if they are "far" from each other
...
Fixes #1093
2018-11-23 11:46:02 +05:30
Maxim Baz
5e27c21856
Implement touch_scroll_multiplier
2018-11-10 12:33:47 +01:00
Maxim Baz
3f77a2044e
Make high resolution scrolling more responsive and configurable
2018-11-09 13:22:03 +01:00
Kovid Goyal
ea9af96d2b
Fix using focus_follows_mouse causing text selection with the mouse to malfunction when using multiple kitty windows
...
Fixes #1002
2018-09-22 18:15:03 +05:30
Kovid Goyal
2ec84969dd
Fix drag-scrolling not working when the mouse leaves the window confines
...
Fixes #917
2018-09-09 14:30:32 +05:30
Kovid Goyal
4d2d9d5574
Do not change wheel event reporting when not using high resolution scroll events
2018-08-31 15:28:48 +05:30
Luflosi
2454ecd586
Allow for faster scrolling in alternate screen mode
2018-08-29 14:04:12 +02:00
Kovid Goyal
0f594ef950
Ensure multiplication is not unsigned
2018-08-27 15:47:32 +05:30
Kovid Goyal
d19b29ced0
Fix incorrect calculation of pending_scroll_pixels
2018-08-27 06:51:25 +05:30
Kovid Goyal
009ef54de7
Implement high precision scrolling with the trackpad on platforms such as macOS and Wayland that implement it.
...
Fixes #819 . Note that I have no idea whether the code works well on
retina screens, might have to multiple the pixel count by the scale
factor on those screens?
2018-08-24 11:00:58 +05:30
Kovid Goyal
a92b20f85a
Only do manual focus follows mouse on macOS
2018-08-07 07:56:56 +05:30
Kovid Goyal
e5a720c6fa
Fix detection of URLs in HTML source code (URLs inside quotes)
...
Fixes #785
2018-08-03 12:28:23 +05:30
Kovid Goyal
9af3081f45
The focus_follows_mouse option now also works across top-level kitty OS windows
...
Fixes #772
2018-07-30 21:26:20 +05:30
Kovid Goyal
5ae2406a03
macOS: Allow scrolling window contents using mouse wheel/trackbar even when the window is not the active window
...
Fixes #729
2018-07-18 10:34:36 +05:30
Kovid Goyal
fcb0033d25
When drag-scrolling stop the scroll when the mouse button is released.
2018-07-06 13:01:49 +05:30
Kovid Goyal
c8b1e76783
When clicking in the margin/border area of a window map the click to the nearest cell in the window. Avoids selection with the mouse failing when starting the selection just outside the window.
2018-07-06 12:32:08 +05:30