Commit Graph
971 Commits
Author SHA1 Message Date
Kovid Goyal 4c9bd368c6 Implement alternate keys on macOS 2021-01-16 20:52:16 +05:30
Kovid Goyal 86ce72e725 Port the Cocoa backend to use unicode key numbers 2021-01-16 20:52:16 +05:30
Kovid Goyal 3c648c05ec Report shifted and alternate keys from the XKB backend 2021-01-16 20:52:15 +05:30
Kovid Goyal c12680895e Fix key state tracking regression 2021-01-16 20:52:15 +05:30
Kovid Goyal abc1e3f289 Remove the function used to init glfw key events
Instead use C99 struct initializers. Much less error prone.
2021-01-16 20:52:14 +05:30
Kovid Goyal 0714fd376b Fix handling of ctrl key in legacy mode
Also change the glfw constants used for the modifiers to match those
used in the terminal encoding. Less likely to make mistakes translating
that way.
2021-01-16 20:52:14 +05:30
Kovid Goyal 5297f7474d Remove another use of GLFW_KEY 2021-01-16 20:52:13 +05:30
Kovid Goyal 774a6c8c8b Remove glfw key constants 2021-01-16 20:52:12 +05:30
Kovid Goyal c8a9336160 Code to encode key events 2021-01-16 20:52:12 +05:30
Kovid Goyal c0b6078438 Add more keypad keys 2021-01-16 20:52:11 +05:30
Kovid Goyal ccce8c32a3 Mapping to unicode and back for XKB keys 2021-01-16 20:52:11 +05:30
Kovid Goyal 8f8be9c2b1 Add notice to not edit generated code 2021-01-16 20:52:11 +05:30
Kovid Goyal eb8e2225e5 Add some more functional keys
Also define aliases for XKB codes
2021-01-16 20:52:11 +05:30
Kovid Goyal 397d7d044b Change key data type in some functions 2021-01-16 20:52:11 +05:30
Kovid Goyal a681162326 Start work on supporting arbitrary unicode keys 2021-01-16 20:52:11 +05:30
Kovid Goyal cb5ac1fcf8 DRYer 2020-11-22 12:24:00 +05:30
Kovid Goyal 53797b9ead Wayland: Fix key repeat being stopped by the release of an unrelated key
Fixes #2191
2020-11-22 12:14:52 +05:30
Kovid Goyal 9193a20b44 macOS: Fix minimize not working for chromeless windows
Fixes #3112
2020-11-20 07:30:46 +05:30
Kovid Goyal bdcac9aed3 Partial fix for traditional full screen on Big Turd 2020-11-16 10:23:01 +05:30
Luflosi 3ccc2f538d Fix memory leak in unlikely failure condition
Found with the Clang Static Analyzer.
2020-11-01 13:41:52 +01:00
Leonard König bc2dcdf9db wl: Fix destroying CSDs in correct order (#3051)
On Wayland, some compositors refuse to implement SSDs in which case we draw
primitive CSDs.  However, the destructors were called in the wrong order,
leading to a dereference of an already freed object.
2020-10-28 18:57:37 +01:00
Luflosi 3df80545bd Reduce the difference of GLFW to upstream 2020-10-26 11:02:55 +01:00
Luflosi 60719e7bff Remove extra space 2020-10-26 10:22:14 +01:00
Luflosi 2832a73285 GLFW: Wayland: Assume 96 DPI if physical size is <= 0
From upstream: https://github.com/glfw/glfw/commit/0ef149c8f2451fbc8e866834675a075cfc295b6c.
2020-10-14 14:43:40 +02:00
Luflosi 0edfa88755 Reduce the difference of GLFW to upstream 2020-10-04 17:34:51 +02:00
Kovid Goyal 229134cf31 Misc. fixes for issues reported by clang's static analyzer
Most of them are false positives. A couple of mem leaks after unlikely
failure conditions.
2020-09-10 10:47:28 +05:30
Luflosi eb5ebfd304 GLFW: Fix typo in GLFWwindowmaximizefun documentation
From upstream: https://github.com/glfw/glfw/commit/1ed1489831e32337c13fbcbac2c2562ac4163bd3.
2020-09-08 12:57:00 +02:00
Luflosi e8d8ced006 GLFW: Null: Fix out parameters not being set
From upstream: https://github.com/glfw/glfw/commit/cd0dc76c7c979fdec0b7b3721e3a91de7a730d0d.
2020-09-07 21:26:02 +02:00
Kovid Goyal e2b1ca10c9 Save a line :P 2020-08-24 12:08:09 +05:30
Kovid Goyal 11942ed6dc Fix compilation on OpenBSD
Fixes #2935
2020-08-24 12:05:39 +05:30
Ayan George 076ad850bb Declare _glfwPlatformInitJoysticks() to return bool
This patch declares _glfwPlatformInitJoysticks() to return bool which
matches its prototype in glfw/internal.h.
2020-08-04 20:24:35 -04:00
Kovid Goyal 6b421fabd1 Wayland: Fix a typo in the previous release that broke reading mouse cursor size
Fixes #2895
2020-08-03 17:08:08 +05:30
Weng Xuetian b1387d50f0 Register to bus when connect to ibus.
This is required when the actual dbus is not from ibus but session bus.
This may happen when other run a shim layer for ibus, or ibus is
running with flatpak mode.
2020-07-31 17:54:10 -07:00
Kovid Goyal 069f09c43c Move wlc destructor to just before the functions are unloaded 2020-07-29 17:18:03 +05:30
Kovid Goyal 35f821f6a1 Ensure wl_cursor_theme_destroy is called before it is released
Fix #2884
2020-07-29 17:13:00 +05:30
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
Luflosi a45651933c GLFW: Cocoa: Support some sim page joystick elements
From upstream: https://github.com/glfw/glfw/commit/0d355379e070d094a6b9e0894f4fa51e00e1364f.
2020-07-24 11:28:53 +02:00
Luflosi 6b3f774f05 GLFW: Cocoa: Fix potential leak of CFNumber object
From upstream: https://github.com/glfw/glfw/commit/a2674a903434b7dfc0b0bcc5d0b479da417367ff.
2020-07-24 10:59:04 +02:00
Luflosi bc61a81d7a GLFW: X11: Fix joystick detection before joystick init
From upstream: https://github.com/glfw/glfw/commit/c01acc267ad7f5e016d905276ba38917a1fa64bb.
2020-07-23 23:57:03 +02:00
Luflosi 06b30d1cc3 GLFW: Cleanup
From upstream: https://github.com/glfw/glfw/commit/f771d412925f64c351167e7a1e6a7d35770d3ecf.
2020-07-23 23:56:32 +02:00
Luflosi 785973bb5e GLFW: Make joystick platform code init on demand
From upstream: https://github.com/glfw/glfw/commit/782e6b6cefc9ac2a2b6779f9e658ab948809253b.
2020-07-23 23:56:30 +02:00
Luflosi 78efefcea1 Revert "Linux: Fix slow startup on some systems caused by GLFW searching for joysticks. Since kitty does not use joysticks, disable joystick support."
This reverts commit ab960ea12d.
2020-07-23 23:56:21 +02:00
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 1342767805 GLFW: Wayland: Fix scroll offsets being inverted
From upstream: https://github.com/glfw/glfw/commit/f760b124ca849d99effbedb91fb8d10a828aea00.

This commit does not actually change any behaviour, it merely makes the code style of the two lines more similar to the new upstream code.
2020-07-18 19:32:03 +02:00
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 4d1b537f78 GLFW: Documentation work for GLFW_MOUSE_PASSTHROUGH
From upstream: https://github.com/glfw/glfw/commit/a122d913039c2ff4bd668ad4f5cd051a1aa2f230.
2020-07-17 00:08:22 +02:00
Luflosi dd54db47a9 GLFW: Move mouse passthrough before window showing
From upstream: https://github.com/glfw/glfw/commit/dfeacee00010fef20f8b15853302d352c1bfe0fc.
2020-07-17 00:07:36 +02:00
Luflosi 44775e4644 GLFW: Remove no-op call at window creation
From upstream: https://github.com/glfw/glfw/commit/1095a43708d98190afdc5dfbfc40086c333f7f72.
2020-07-16 23:55:24 +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 d7cd6edaa5 GLFW: X11: Include X Shape extension headers
From upstream: https://github.com/glfw/glfw/commit/68e4261d73295cc280ee3d060d421e0ace5d8d11.
2020-07-16 23:50:26 +02:00