1000 Commits

Author SHA1 Message Date
Kovid Goyal
f9d2167c97
macOS: Respect the users system-wide global keyboard shortcut preferences
Note that we currently dont handle live reload of global shortcut
preferences. I cant be bothered. Patches welcome.
Fixes #4501
2022-01-13 13:36:58 +05:30
Nathan Pearson
7c33d7ef17 Bumps version from 10.15 to 10.15.7 (latest minor) 2022-01-11 07:31:37 -07:00
Nathan Pearson
2ccfecb5ae Fixes comment 2022-01-11 06:39:48 -07:00
Nathan Pearson
a40ff85e1a Fixes traditional fullscreen hide for Mac OS >= 10.15 2022-01-11 06:25:39 -07:00
Kovid Goyal
7023c7a8ae
... 2022-01-10 21:15:24 +05:30
pagedown
4293325539
Cleanup previous PR
Revert the changes related to set_options debug_keyboard.
Remove the Carbon framework flag for glfw.
2022-01-10 10:24:10 +08:00
pagedown
f7be4fab48
macOS: Allow mapping secure keyboard entry shortcut 2022-01-09 22:54:03 +08:00
Kovid Goyal
356897a32d
macOS: Persist "Secure Keyboard Entry" across restarts to match the behavior of Terminal.app
Fixes #4471
2022-01-08 14:13:14 +05:30
Kovid Goyal
ac0c10c170
Simplify if condition 2022-01-08 14:06:22 +05:30
Kovid Goyal
e228f5105e
Merge branch 'refactor' of https://github.com/page-down/kitty 2022-01-02 09:23:25 +05:30
Kovid Goyal
719760fd7b
Remove unused UNUSED 2022-01-02 09:19:40 +05:30
pagedown
15615a4cd1
Avoid defining variables with the same name that already exist
Avoid using existing parameter names for local variables.
Avoid using variable names from upper level for nested loops.
Avoid local variables hiding existing global variables.
2022-01-01 21:29:32 +08:00
Kovid Goyal
99d06f0714
See if 0 makes Apple happy 2021-12-15 13:14:02 +05:30
Kovid Goyal
e973c45968
Fix build on XCode 13.1
Apple go on making it harder and harder to support multiple
versions of their pathetic operating system in one code base.

kIOMainPortDefault is the "non-deprecated" replacement for
kIOMasterPortDefault. However, it is now marked as being available only
on macOS 12 and later so it refuses to build in a codebase designed to
run on earlier versions of macOS. Le bubbling sigh.

According to https://developer.apple.com/documentation/iokit/kiomasterportdefault?language=objc
passing NULL has the same effect and avoids the stupid warning.
Hopefully this will work till Apple decides to spend their trillion
dollars doing more stupid shit.
2021-12-15 12:57:46 +05:30
pagedown
d0fa0516f5
macOS: Fix keyboard input not working after toggling full screen 2021-12-13 08:58:52 +08:00
pagedown
8ed6ee97b2
Docs: replace http url with https, use ripgrep project url and fix typo 2021-11-30 18:53:58 +08:00
Kovid Goyal
bd288bd18f
Linux: Fix release event for the final key in a compose sequence not being reported. Fixes #4285 2021-11-29 19:26:16 +05:30
Kovid Goyal
acdf06bf5d
Tell cocoa the previous character range is invalid when updating IME position
Without this IME popup position is sometimes incorrect, for instance, at
startup
2021-11-28 22:11:21 +05:30
pagedown
088b7cde4f
Update IME status when window lost focus 2021-11-28 23:09:35 +08:00
pagedown
8e87b639fa
Use macOS 11.0 version number 2021-11-19 14:41:19 +08:00
Kovid Goyal
0965fc45f2
macOS: Fix keyboard input not working after toggling traditional fullscreen till the window is clicked in 2021-11-13 14:20:18 +05:30
Kovid Goyal
181178b0ea
macOS: use a consistent technique to get window size
This fixes an issue where restoring from traditional fullscreen to a
maximized state was resulting in an incorrectly sized frame buffer. Now
all framebuffer and window size calculation happens in the same way in
all the various glfw codepaths that do it.
2021-11-13 13:42:12 +05:30
Kovid Goyal
3483722475
Remove pointless code 2021-11-13 12:13:28 +05:30
Kovid Goyal
56e63baf5a
macOS: manually trigger windowDidResize when fullscreening
Fixes #4230
Fixes #4229
2021-11-13 11:49:55 +05:30
Kovid Goyal
f24dc80c49
Send IME events in the correct sequence when cocoa both inserts text and marks new text in response to the same key event 2021-11-12 17:27:37 +05:30
Kovid Goyal
9a9de0038c
Remove unused code 2021-11-12 15:10:33 +05:30
Kovid Goyal
ffa755c723
macOS: Ensure IME position is correct on startup 2021-11-12 09:18:34 +05:30
Kovid Goyal
a060bf7223
Also unmark text on pressing esc
As with backspace, without this the preedit text is not cleared when the
IME is canceled by esc
2021-11-12 08:52:32 +05:30
Kovid Goyal
fac76ddedd
DRYer 2021-11-11 22:41:59 +05:30
Kovid Goyal
f34cc1861a
Clear marked text when text is inserted
This is apparently what Cocoa expects. Fixes committing pre-edit text no
longer working.
2021-11-11 22:35:02 +05:30
Kovid Goyal
bd4ed38a3c
Dump more informatin about what cocoa does when processing key events 2021-11-11 22:32:30 +05:30
Kovid Goyal
8644fed534
Only unmark on backspace key 2021-11-11 22:05:39 +05:30
Kovid Goyal
ca9fdadf3c
Dont clear marked text on every keyDown event
Let the input system do it for us. That wy we can hopefully use calls to
unmarkText as a signal to commit the pre-edit text.

Hopefully not clearing the marked text on key down doesnt break anything
else.
2021-11-11 21:14:53 +05:30
Kovid Goyal
228364e317
oops 2021-11-11 20:53:14 +05:30
Kovid Goyal
e65aee4533
Cleanup calls to unmarkText 2021-11-11 20:44:43 +05:30
Kovid Goyal
9be37f7d2d
cocoa is weird 2021-11-11 12:45:03 +05:30
Kovid Goyal
d95a00df73
GLFW API to check if window is fullscreen 2021-11-11 12:33:12 +05:30
Kovid Goyal
6da5a8073c
Wayland: Apparently Java doesnt even set text/plain as a mimetype when copying text. Instead it uses UTF8_STRING and STRING.
So check for those as well. Am guessing whoever wrote this code in Java
just copied their old X11 shit without checking the specs. See #4183
2021-11-03 20:46:33 +05:30
Kovid Goyal
ebaac70b27
Fix #4183 (paste in wyland with mime type text/plain) 2021-11-03 07:00:06 +05:30
Luflosi
a1d24028b8
Fix Clang warning
Without this, kitty fails to compile:
```
glfw/cocoa_init.m:462:14: error: case value not in enumerated type
      'NSEventModifierFlags' (aka 'enum NSEventModifierFlags')
      [-Werror,-Wswitch]
        case (NSEventModifierFlagShift | NSEventModifierFlagOption):
             ^
glfw/cocoa_init.m:465:14: error: case value not in enumerated type
      'NSEventModifierFlags' (aka 'enum NSEventModifierFlags')
      [-Werror,-Wswitch]
        case (NSEventModifierFlagShift | NSEventModifierFlagCommand):
             ^
```
I thought about changing the type of the `modifierFlags` function parameter from `NSEventModifierFlags` to `NSUInteger` since `NSEventModifierFlags` is defined as an enum according to https://developer.apple.com/documentation/appkit/nseventmodifierflags?language=objc and is technically not the proper type for a bit field. But since Apple themselves define `modifierFlags` as `NSEventModifierFlags` according to https://developer.apple.com/documentation/appkit/nsevent/1534405-modifierflags?language=objc, I think the fix in this commit is better.
This warning was introduced with commit f9944e614088c4977ad9c9f1d1b44d97643e8d5b.
2021-10-30 16:25:20 +02:00
Kovid Goyal
69e903a4c4
Add more type annotations 2021-10-27 11:13:28 +05:30
Kovid Goyal
9c2f96f7eb
Add more type annotations 2021-10-27 08:45:45 +05:30
Kovid Goyal
c381716ecf
Specify we need alpha as well 2021-10-25 17:15:46 +05:30
Kovid Goyal
6c7420f4e7
Add a comment explaining why we do 1,1,1,0 2021-10-24 13:40:18 +05:30
Kovid Goyal
80a357623d
Linux X11: Add support for 10bit colors
Fixes #4150
2021-10-24 13:19:05 +05:30
Kovid Goyal
0a4dfa8fd2
macOS: Prevent resizing of fullscreen OS windows as it leads to visual artifacts 2021-10-24 12:38:44 +05:30
Kovid Goyal
edd423aad6
macOS; Fix restoring from fullscreen when resize increments are enabled 2021-10-23 13:06:47 +05:30
Kovid Goyal
f9944e6140
Pass through more modifier+tab variants 2021-10-17 11:31:54 +05:30
Kovid Goyal
f28d9bcd8c
Change sybolic constant for insert key 2021-10-14 21:05:21 +05:30
Kovid Goyal
c6039fc399
Also passthrough Insert and Shift+Insert which cocoa seems to intercept 2021-10-14 20:27:22 +05:30