Luflosi
b6ee88056e
Minor grammar correction
2019-10-16 00:46:52 +02:00
Luflosi
81f31ca215
Reduce difference of glfw/glfw3.h to GLFW upstream
2019-10-15 15:37:35 +02:00
Luflosi
087376b44d
GLFW: Documentation work
...
From upstream: https://github.com/glfw/glfw/commit/a43d1a4937d77fe9ee4560084840fd8f3e960aba .
2019-10-15 14:37:41 +02:00
Luflosi
c117f36009
GLFW: Cleanup
...
From upstream: https://github.com/glfw/glfw/commit/d5ab3e919a4f163f4010f7112a9cf1bdcd80f805 .
2019-10-15 14:25:46 +02:00
Luflosi
410165c14d
GLFW: Improve (?) reference documentation for callbacks
...
From upstream: https://github.com/glfw/glfw/commit/51bb76c7c3de934b2dd3affcdc297a32e4817835 .
2019-10-15 12:11:01 +02:00
Luflosi
63c4f64bf5
Reduce difference to GLFW upstream
...
From upstream: https://github.com/glfw/glfw/commit/773f4495f005004ea17fbc4a96b6b1ce758e79d6 .
2019-10-12 15:19:44 +02:00
Luflosi
114b8cff93
Cleanup
...
From upstream: https://github.com/glfw/glfw/commit/62b7fe831179428c3fa1d7939d48562772ee5647 .
2019-10-11 20:26:27 +02:00
Luflosi
506f2f7db7
Replace weird character with space
...
In 4c4c6ab0e6 you added a weird unicode character, which is apparently called an Object Replacement Character, instead of a space.
2019-10-09 18:32:49 +02:00
Kovid Goyal
f476c56f91
Drop support for the gtk_primary_selection wayland protocol
...
sway recently decided to start complaining when binding
wp_primary_selection_device_manager interface to gtk_primary_selection
name, which means we either have to maintain an in-tree version
of the gtk_primary_selection protocol or drop support for sway.
Sway has not quite annoyed me enough yet for the latter.
See #1977
2019-10-09 07:37:03 +05:30
Luflosi
7ddbb613fe
Cocoa: Fix window creation blocking after re-init
...
From https://github.com/glfw/glfw/commit/2fbb560eb72fea695687d33066c91a329d6d0465 .
2019-10-08 13:41:10 +02:00
Luflosi
1f8631cc99
Cocoa: Move app delegate and menu creation to init
...
From https://github.com/glfw/glfw/commit/ea7eb2ddab823e21c846c68d112d90f91fcba318 .
2019-10-07 21:24:58 +02:00
Luflosi
5b008163af
Cocoa: Add NSApplicationDelegate protocol
...
From https://github.com/glfw/glfw/commit/c3ed70a4b77a2a4a08ef9a7cac7ac64a1835118d .
2019-10-06 16:58:06 +02:00
Kovid Goyal
4a8f9efe79
Wayland: Resume key repeat on focus gained if the previously repeated key is pressed
2019-09-30 18:47:43 +05:30
Kovid Goyal
19d36fbe69
Wayland: Fix key repeat not being stopped when focus leaves window. This is expected behavior on Wayland, apparently
...
Fixes #2014
2019-09-30 16:45:39 +05:30
Luflosi
a8f6615380
Fix broken paste on X11
...
Fixes https://github.com/kovidgoyal/kitty/issues/2008 .
2019-09-29 02:48:09 +02:00
Kovid Goyal
97fe38fbbc
monotonic_start_time needs to be a global symbol, not local to each translation unit
2019-09-28 08:18:21 +05:30
Kovid Goyal
3378175450
Hopefully the last macOS float conversion fix
2019-09-27 20:14:05 +05:30
Kovid Goyal
46d49e18c0
More macOS float fixes
2019-09-27 20:07:09 +05:30
Kovid Goyal
f68339c571
float conversion fixes for macOS
2019-09-27 19:56:48 +05:30
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
Kovid Goyal
4ec1a8d9c3
Merge branch 'extract-glfw-key-event-data' of https://github.com/bew/kitty
2019-09-25 15:44:56 +05:30
Benoit de Chezelles
aadab38487
Fix compilation for macos
2019-09-24 22:03:55 +02:00
Benoit de Chezelles
53275c9137
Extract key event data to struct
2019-09-24 19:15:35 +02:00
Kovid Goyal
fb1c318a09
macOS: Fix a regression in the previous release that caused a crash when pressing a unprintable key, such as the POWER key
...
Fixes #1997
2019-09-24 16:07:52 +05:30
Kovid Goyal
fe807dd66f
Fix missing parameter name in docs
2019-09-22 19:39:22 +05:30
Luflosi
628e6cc87f
Mark unused parameters in glfw/null_*.c
...
kitty didn't compile on FreeBSD for me because of unused parameters in glfw/null_joystick.c, so I added the `UNUSED` attribute to them.
I also added `UNUSED` to the unused parameters in glfw/null_monitor.c and glfw/null_window.c as well even though they are probably not used.
2019-09-19 20:21:09 +02:00
Luflosi
e619eb9cbb
Add more keyboard keys
2019-09-08 12:32:19 +02:00
Luflosi
a65ee155c5
Indent lookup table in _glfwGetKeyName() to allow for longer keyboard key names
2019-09-08 12:32:19 +02:00
Luflosi
97e6978ed8
Order keyboard keys by their ASCII value
2019-09-08 12:32:19 +02:00
Luflosi
f05eefcc20
Allow adding keys with Unicode names on macOS
2019-09-08 12:32:19 +02:00
Kovid Goyal
c398d3d16e
Cocoa: Fix glfwSetWindowSize anchor point
...
This makes glfwSetWindowSize use the top-left corner as anchor point
instead of the bottom-left corner.
Upstream: https://github.com/glfw/glfw/commit/7f02898264d6077738f0e8032f027eb7e252c90e
2019-09-08 09:16:07 +05:30
Kovid Goyal
9dbc54aad6
Fix comparison of video modes of equal area
...
This fixes the bug of video modes being discarded if they had
a different resolution but the same area as another mode.
Upstream: https://github.com/glfw/glfw/commit/2777f6a754a469eb9b71b4d241ca5f3b1ce5a9b1
2019-09-08 09:12:39 +05:30
James McCoy
34350af61c
Only use linux_joystick.c on Linux
...
Rather than using null_joystick.c when _plat is a bsd, use
linux_joystick.c when _plat is a linux. This fixes a build issue with
other non-BSD, non-Linux platforms.
2019-09-03 23:02:16 -04:00
Luflosi
b3b830bb5f
Make adding more printable keys slightly easier
...
When adding keys after `GLFW_KEY_UNDERSCORE`, one now needs to change a `#define` right below the last printable key instead of changing it elsewhere in the code.
This commit now also marks `GLFW_KEY_PLUS` and `GLFW_KEY_UNDERSCORE` as printable characters.
2019-09-01 11:24:14 +02:00
Luflosi
0459dda5c2
Fix bool indentation
...
The wrong indentation was caused by the removal of GLFWbool in https://github.com/kovidgoyal/kitty/commit/fe62700825ef4b9bb143b3792797959d85181b29 .
2019-08-30 15:32:20 +02:00
Luflosi
c0c7cfacc2
Fix NSLog() printing of unicode format strings
...
See https://stackoverflow.com/questions/720052/nslog-incorrect-encoding .
The `%s` format placeholder for `NSLog()` expects an encoding other than UTF-8, which leads to garbled Unicode characters when trying to print a UTF-8 encoded string.
```Objective-C
NSLog(@"Ä %s %@", "Ä", @("Ä"));
```
prints `Ä √Ñ Ä`.
As can be seen in the example above, the workaround is to convert the UTF-8 encoded C-string to an `NSString` object and print that instead.
`debug_key()` calls `NSLog()`.
2019-08-30 15:03:51 +02:00
Kovid Goyal
90a985b73a
Make format_text() more secure
2019-08-28 05:41:20 +05:30
Luflosi
902fc22670
Simplify GLFW compilation code
...
This commit removes the need for `is_macos` in `glfw/glfw.py` by moving a few lines of code. Instead of relying on the information that the compilation is or isn't happening on macOS, the code now does the right thing based on which `module` is being built.
This changes the order of the compilation flags slightly.
2019-08-26 16:47:19 +02:00
Luflosi
6cc720a350
Fix typos
...
Inspired by https://github.com/glfw/glfw/pull/1549/commits/4d3ee554b31e734a7c341d4aa5e47d85306f7d74 .
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
06c2263657
macOS: implement drag and drop of text into kitty
...
Closes #1368 .
2019-08-24 01:29:33 +02:00
Luflosi
599be7ddc9
Don't add Apple Frameworks twice
...
These Frameworks are added again a couple lines below in the check for `module == 'cocoa'`.
2019-08-11 02:26:12 +02:00
Luflosi
28bb123be8
Update the GLFW version number from 3.3 to 3.4
...
Closes https://github.com/kovidgoyal/kitty/issues/1884 .
From https://github.com/glfw/glfw/commit/a337c568486025d22443535b7c047a563bc34373 .
2019-08-02 11:00:16 -05:00
Luflosi
5f855ce547
Use context managers to open files
...
Inspired by https://github.com/kovidgoyal/calibre/commit/d50a6ddc1b71a575283e344a0d7bc539539bc5d1 .
2019-08-01 13:21:26 -05:00
Kovid Goyal
9cbb726566
Fix #1865
2019-07-30 06:20:54 +05:30
Kovid Goyal
d218900b57
Remove unused header
2019-07-29 09:45:02 +05:30
Kovid Goyal
cab949a939
Fix building with compilers that dont support __has_include
2019-07-29 09:44:05 +05:30
Luflosi
464a6c1441
Fix indentation of bool variables in glfw/egl_context.h
...
Caused by https://github.com/kovidgoyal/kitty/commit/fe62700825ef4b9bb143b3792797959d85181b29 .
2019-07-28 00:23:17 -05:00
Luflosi
b8d2b76ee4
Reduce the difference of glfw to upstream
2019-07-28 00:10:50 -05:00