223 Commits

Author SHA1 Message Date
Kovid Goyal
1c82a39a6e
Merge branch 'glfw_upstream' of https://github.com/Luflosi/kitty 2020-06-02 08:13:33 +05:30
Kovid Goyal
b70cf276b4
Change the cursor image immediately on scale change 2020-06-02 08:09:27 +05:30
Kovid Goyal
80b2df2ef4
Better code when using a stack cursor 2020-06-02 07:59:32 +05:30
Kovid Goyal
ad27452275
Wayland: Avoid infinite timer fires if arrow cursor is animated 2020-06-02 07:53:15 +05:30
Luflosi
f356f63994
wayland: save serial from all input sources
From upstream: 92b3fd02e5.
2020-06-01 21:29:14 +02:00
TheDaemoness
4947fb6b57
Fix a missing cursorWayland-scale assignment. 2020-06-01 17:41:16 +00:00
Kovid Goyal
c1f84ce603
cleanup for wayland hidpi cursors merge 2020-06-01 21:14:56 +05:30
Kovid Goyal
14912461ad
Use left_ptr as default arrow cursor on Wayland
Matches X11.
2020-06-01 20:33:54 +05:30
Kovid Goyal
a9f265e8b7
Initialize a couple of local vars 2020-06-01 20:33:54 +05:30
TheDaemoness
199ee20adb
Fixed an instance of eager cursor loading.
Also fixed a minor formatting issue.
2020-06-01 20:33:53 +05:30
TheDaemoness
7c3c87abf6
Initial implementation of proper HiDPI cursor support on Wayland. 2020-06-01 20:33:53 +05:30
Luflosi
3846286bee
Wayland: Implement raw mouse motion control
From upstream: 44af6bb936.
2020-05-25 18:21:32 +02:00
Luflosi
c6b9cb759a
Wayland: Rename handlers for more unicity
From upstream: 754b7feaa1.

1fa66ca45d6234e9a56ecb6616e8af9f9442479d didn't include the changes to `wl_window.c`.
2020-05-25 15:29:17 +02:00
Luflosi
55ad228166
Rename raw input to raw mouse motion, cleanup
From upstream: 1155c83013.
2020-05-24 21:57:29 +02:00
Luflosi
48fb051253
Add GLFW_RAW_INPUT and glfwRawInputSupported
From upstream: 9e29f556fd.
2020-05-24 20:49:52 +02:00
Luflosi
7931654a7c
Ensure valid UTF-8 when cutting string 2020-05-23 13:59:23 +02:00
Kovid Goyal
2458c3a7c6
Implement drag and drop of text/plain for Wayland as well 2020-03-19 13:28:21 +05:30
Kovid Goyal
eb12511646
The uber-fussy sway does not like calling wl_data_offer_finish on a version 1 data manager 2020-03-14 09:12:06 +05:30
Kovid Goyal
aa11ddf32c
Wayland: Fix a crash when drag and dropping into kitty
Fixes #2432
2020-03-14 08:20:44 +05:30
Luflosi
90a8ba3789
Fix typo in comment 2020-02-15 18:52:18 +01:00
Kovid Goyal
8f1ec053ef
... 2020-01-27 08:50:29 +05:30
Kovid Goyal
2e3037ce3a
Wayland: Fix window titles being set to very long strings on the order of 8KB causing a crash
Fixes #1526
2020-01-27 08:49:25 +05:30
Kovid Goyal
1b5daf930a
Make the comment explaining wayland polling more detailed 2020-01-23 15:08:54 +05:30
Kovid Goyal
748ca81d4b
Wayland: Fix a freeze in rare circumstances when having multiple OS Windows
Fixes #2307
Fixes #1722
2020-01-23 15:07:22 +05:30
Kovid Goyal
c68b302fa2
Merge branch 'wayland' of https://github.com/kennylevinsen/kitty 2020-01-15 06:51:24 +05:30
Kenny Levinsen
ca7cab1a2d wayland: Consistently use errno for errors 2020-01-14 20:06:13 +01:00
Kenny Levinsen
083b294659 wayland: Simplify dispatch_pending error handling
wl_display_dispatch_pending does not return EAGAIN, and always sets an
error when it fails. This allows us to handle errors in a simpler
manner.
2020-01-14 20:04:23 +01:00
Kenny Levinsen
bc24716476 wayland: errno does not have to be cleared
As long as errno is only read on error from an errno-setting function,
then there is no need to reset errno between uses.
2020-01-14 20:04:23 +01:00
Kenny Levinsen
4acab65016 wayland: Only cancel display read after prepare success
The display reader count only increments when wl_display_prepare_read
succeeds.  Calling wl_display_cancel_read when wl_display_prepare_read
has not succeeded results in a negative reader count, which does not
have well-defined behavior.
2020-01-14 20:00:47 +01:00
Kenny Levinsen
f6b03f106c wayland: Cancel display read before abortOnFatalError
Calling wl_display_cancel_read immediately ensures that other readers
waiting on us will have a chance to wake up and discover the error in a
timely manner.
2020-01-14 19:59:02 +01:00
Kovid Goyal
ac72ac7af2
Wayland: On dispatch error cancel read before running fatal error handlers
Might help #1722
2020-01-14 19:48:28 +05:30
Anders Eurenius
4619259e26 Implement resize by increment 2019-12-09 08:33:32 +01:00
Kovid Goyal
d8dd22048a
Wayland: Ensure that glfw window content scale and kitty window content scale are in sync after the window is placed on a monitor 2019-11-16 10:47:05 +05:30
Kovid Goyal
65fa7da24a
Wayland: Use the primary monitor scale for windows on creation
This is needed because on creation the window may not have been assigned
to any monitors, so we fallback to using the scale of the primary
monitor. Fixes #2133. Fixes #2135
2019-11-16 10:00:41 +05:30
Luflosi
b42f4ac288
Restore proper error reporting functionality
In 841c907efc643a4f4f06b2686d0d1e6022710600, the `%m` format specifier was replaced by `%%m`, which just prints `%m`. To keep the functionality of `%m` without using `%m`, the error string can be printed manually.
2019-11-05 00:42:29 +01:00
Benoit de Chezelles
7f2b98fad7 Rename all uses of 'scancode' to 'native_key' where relevant 2019-10-16 02:25:20 +02:00
Kovid Goyal
0d68b7078c
Check for float conversion issues on build
Useful to catch any errors left over from the migration of times from
double to int64_t
2019-09-27 19:47:25 +05:30
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
6cc720a350
Fix typos
Inspired by 4d3ee554b3.
Found using `codespell`.
2019-08-26 12:31:15 +02:00
Luflosi
94d56d1a9e
Correct indentation for two _glfwInputError() messages
This commit changes the indentation of two error messages to match the indentation in the rest of the code.
2019-08-25 21:29:58 +02:00
Luflosi
28bb123be8
Update the GLFW version number from 3.3 to 3.4
Closes https://github.com/kovidgoyal/kitty/issues/1884.
From a337c56848.
2019-08-02 11:00:16 -05:00
Luflosi
489f3e6c9d
Add C dialect reminders to each glfw source file
Reduces the difference to upstream.
From 56aad76b16.
2019-07-20 21:07:27 -05:00
Kovid Goyal
fb0d98ead1
Add more debugs to Wayland handleEvents() 2019-07-20 14:48:28 +05:30
Kovid Goyal
4096caba64
Cancel read if dispatch_pending fails 2019-07-20 14:32:57 +05:30
Kovid Goyal
38f77144fa
Wayland: dont abort the event handler early if there are no pending events from the compositor. This ensures that the tick callback and other event sources are dispatched. 2019-07-20 14:09:09 +05:30
Kovid Goyal
b8041ce17f
Wayland: Fix infinite loop if the compositor dies 2019-07-20 13:55:38 +05:30
Kovid Goyal
1cb15dedac
Simplify the event loop code
Also reduce input latency by ignoring repaint_delay when
there is actual pending input.

Gets rid of request_tick_callback(). Now empty events
result in the tick callback being called so there is only a
single mechanism for waking up the main loop and getting
the tick callback called.
2019-07-18 15:51:54 +05:30
Kovid Goyal
0fb1481038
Move event loop wakeup code into backend_utils 2019-07-05 09:34:51 +05:30
Kovid Goyal
841c907efc
Build glfw with all warnings enabled 2019-07-01 10:42:07 +05:30
Luflosi
8be698681c
Reduce the difference of glfw/wl_* to upstream
This only changes some formatting, whitespace, etc.. There are no
changes to the functionality.
Let me know if you don't like some of those changes.
2019-06-12 14:55:56 +02:00