Commit Graph
137 Commits
Author SHA1 Message Date
Kovid Goyal 6f40b8d0a1 Simplify Wayland cursor theme handling
Now themes are loaded once per scale and stored centrally not per
window. They are not unloaded till application shutdown. Since there
is unlikely to be more than two or three scales this is not a big waste
of resources. Since cursor lifetime is tied to theme lifetime and cursors
are stored per window, destroying a theme requires destroying all
cursors win all windows referring to that theme, which is too much work.

Should hopefully fix #2810
2020-07-25 15:36:46 +05:30
Kovid Goyal dc4762a69a Dont crash if Wayland returns a cursor image array with some null images 2020-07-21 19:33:05 +05:30
Luflosi b1c3999a81 GLFW: Wayland: Fix partial framebuffer size retrieval
From upstream: https://github.com/glfw/glfw/commit/5f60c22cfa5c3d62e2cb2f281fd057384fc58f54.
2020-07-17 21:10:32 +02:00
Luflosi 805921d6a3 GLFW: Move management of shared state to shared code
From upstream: https://github.com/glfw/glfw/commit/6d2003d07a3e502050d51b04c8b9aeb37840f4e3.
2020-07-16 23:54:16 +02:00
Luflosi d0c6ce9fd7 GLFW: Add support for mouse input transparency
From upstream: https://github.com/glfw/glfw/commit/d285a9fdeb5e7f4688ebbd8f8fa8f101b01b5bea.
2020-07-16 22:25:12 +02:00
Luflosi 973d98457f EGL: Add support for EGL_ANGLE_platform_angle
From upstream: https://github.com/glfw/glfw/commit/0dea8a4441828311af4c31de8ba798ba330c4755.
2020-06-30 00:34:32 +02:00
Kovid Goyal c68516ca8d Wayland: Fix a crash when using animated mouse cursors
Fixes #2810
2020-06-29 08:03:25 +05:30
Kovid Goyal cf2f8165eb Only ask application to abort once 2020-06-26 16:33:25 +05:30
Luflosi c39e9e9c61 EGL: Add support for EGL_EXT_platform_base
From upstream: https://github.com/glfw/glfw/commit/aec9fae8f34079561d408c8599e7ac08a7013041.
2020-06-26 12:39:17 +02:00
Luflosi d7a7509da6 EGL: Replace native handle macros with functions
From upstream: https://github.com/glfw/glfw/commit/d7f7b0e1b59d1fd53c68b4a6beb025af5d9786e6.
2020-06-26 12:17:13 +02:00
Kovid Goyal 064aa3a150 Wayland: Ensure cursor theme is loaded before trying to set cursor 2020-06-11 07:57:08 +05:30
Luflosi 5263f6598c Add feature available/implemented errors
From upstream: https://github.com/glfw/glfw/commit/9a87c2a4b49808d3666c7b093b77e8512fa23908.
2020-06-04 13:55:52 +02:00
Kovid Goyal 03b1484c96 Wayland: Abort on fatal error should bypass quit confirmation 2020-06-03 14:39:27 +05:30
TheDaemoness 7f226f2ea1 Avoid incrementing hidden cursors' images 2020-06-02 05:10:51 +00:00
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: https://github.com/glfw/glfw/commit/92b3fd02e58c5422c60f4f52499189e727969564.
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: https://github.com/glfw/glfw/commit/44af6bb9360df274b514f958f9a6a52a93c7fe32.
2020-05-25 18:21:32 +02:00
Luflosi c6b9cb759a Wayland: Rename handlers for more unicity
From upstream: https://github.com/glfw/glfw/commit/754b7feaa144b22383457f9c0561adc9ebb24fd7.

1fa66ca45d 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: https://github.com/glfw/glfw/commit/1155c83013d0f8b86d5a56193708dc00d6c53553.
2020-05-24 21:57:29 +02:00
Luflosi 48fb051253 Add GLFW_RAW_INPUT and glfwRawInputSupported
From upstream: https://github.com/glfw/glfw/commit/9e29f556fd78196dfc81aeb73657888fc0a6d68d.
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 841c907efc, 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