Commit Graph

760 Commits

Author SHA1 Message Date
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
Kovid Goyal
a3717436b6 macOS: Fix resize_in_steps not working correctly on high DPI screens
See #4114
2021-10-12 14:39:06 +05:30
Kovid Goyal
61a56a0561 macOS: Fix very first keypress after window creation being sent as a repeat instead of a press event
Now the dummy event on input source changed is sent with no key and only
after an actual change instead of on startup as well.
2021-10-11 12:30:42 +05:30
Kovid Goyal
820fb6dda9 Pass through all esc + modifier combinations since they arent generally used in macOS 2021-10-11 11:27:24 +05:30
Kovid Goyal
dc11b76bea Restrict the overridden cocoa global shortcuts 2021-10-11 06:46:59 +05:30
Kovid Goyal
2b9408c217 macOS: Fix ctrl or cmd with Esc or Function keys not working
Fixes #4109
2021-10-10 21:39:20 +05:30
Kovid Goyal
853f7cc59a Make handling of CC more robust
Allows multi-command compilers and makes detection of gcc more robust.
Fixes #4102
2021-10-07 13:35:56 +05:30
Kovid Goyal
1b42f69119 Allow specifying extra lib dirs as well
Also use the extra include and lib dirs when detecting librsync
2021-10-06 10:23:01 +05:30
Kovid Goyal
3728d2cfd9 Add changelog entry for previous PR 2021-09-29 19:43:33 +05:30
Park, Jeongmin
4232904055 ibus: Add support for ForwardKeyEvent signal
The ForwardKeyEvent ibus signal is used to maintain ordering between CommitText events and non-IME key events.
The ordering is important for Korean IMEs, where it automatically commits text whenever a character is fully composed. This is different from Chinese/Japanese IMEs, where user manually presses a key to commit each word.

Without this patch, kitty can't handle non-IME key events when used with ibus-hangul, which utilizes ForwardKeyEvent signal.

Without ForwardKeyEvent:
```
key | sequence of events from application's view
r   | UpdatePreeditText 'ㄱ'
k   | UpdatePreeditText '가'
1   | (receives the reply to ProcessKeyEvent call: "native_key: 0x31 release: 0 handled: 0")
    | -> UpdatePreeditText ''
    | -> CommitText '가'
```
Application receives "1가", which is incorrect.

With ForwardKeyEvent:
```
key | sequence of events from application's view
r   | UpdatePreeditText 'ㄱ'
k   | UpdatePreeditText '가'
1   | (receives the reply to ProcessKeyEvent call: "native_key: 0x31 release: 0 handled: 1", and kitty discards the event)
    | -> UpdatePreeditText ''
    | -> CommitText '가'
    | -> ForwardKeyEvent keysym=0x31("1")
```
Application receives "가1", which is correct.

Relevant ibus-hangul github issue to implement ForwardKeyEvent: https://github.com/libhangul/ibus-hangul/issues/42
Relevant changes in Qt to handle ForwardKeyEvent: https://codereview.qt-project.org/c/qt/qtbase/+/212179, https://codereview.qt-project.org/c/qt/qtbase/+/255587
2021-09-29 21:20:09 +09:00
Kovid Goyal
a038477ce0 Cleanup previous PR 2021-09-26 11:17:54 +05:30
unisgn
d078cb264a Update ibus_glfw.c 2021-09-25 00:10:53 +08:00
unisgn
c45a656153 ibus's dbus name owner changed detection
fcitx5 works fine with kitty, except that when you restart fcitx5, kitty stop working with fcitx5, because the dbus_connection_get_is_connected(ibus->conn) in #check_connection is always true when you use fcitx5.
this patch add a dbus name owner changed detection to detect the online status of ibus, in case the ibus backend uses the session bus, like fcitx5.
2021-09-24 23:10:38 +08:00
Kovid Goyal
bdebb19648 Merge branch 'wayland-hyper' of https://github.com/orki/kitty 2021-08-18 08:29:51 +05:30
Ravi R Kiran
75df0cbcf5 Gate Wayland modifier autodiscovery behind an environment variable 2021-08-17 21:46:09 -05:00
Ravi R Kiran
1b88a68b55 Be even more conservative in declaring success
This handles the nonsensical case of Alt_X being mapped to two
different modifiers.
2021-08-17 21:11:55 -05:00
Ravi R Kiran
b0c963b650 Heuristic to find hyper and meta on wayland 2021-08-16 21:59:53 -05:00
Kovid Goyal
be34af4555 Remove inline from .c files
It is ignored by compilers and hides unused static functions
2021-08-03 09:11:17 +05:30
Kovid Goyal
c797944923 Also set first underviced render frame request 2021-08-01 12:59:22 +05:30
Kovid Goyal
ade4e67b51 Possible fix for #3890
Try to ensure we have a functioning displaylink always.
GLFW skips over sleeping monitors during a poll and also
had a bug where the display link was not re-created for a monitor
that already had a glfw monitor entry.

Also add a bunch more debug reporting
2021-08-01 12:53:35 +05:30
Kovid Goyal
6bfb704f6f When going from csd->no csd increase window height to compensate for titlebar.
Sway will send the next configure event (for example when focus changes)
with titlebar height added, so to avoid a sudden resize at that time,
bump the height by the titlebar.
2021-07-31 14:56:45 +05:30
Kovid Goyal
80cebdefcd Better fix for CSD toggling on Wayland
Draw CSD if the compositor wants us to. See #3888
2021-07-31 14:15:38 +05:30
Kovid Goyal
c26665ec4d Wayland: If the compositor turns off server side decorations after turning them on do not draw client side decorations
This matches the behavior of GNOME based clients and in any case sway
seems to get very confused if CSD is drawn.

Fixes #3888
2021-07-31 11:41:27 +05:30
Kovid Goyal
91d82ebf4b Remove unused import 2021-07-31 11:27:29 +05:30
Kovid Goyal
303e4baa58 Add GLFW API to set WM_COMMAND
Also have create_os_window take keyword arguments
2021-07-30 08:35:40 +05:30
Danilo Horta
890181172f Fix "Cocoa: Failed to find service port...". 2021-07-28 00:39:50 +01:00
Kovid Goyal
2e01c1f37e Wayland: Inform compositor of new window geometry when setting window size 2021-07-25 12:26:09 +05:30
Kovid Goyal
8dfef58f29 Use a glfw specific name for memfd_create 2021-07-20 21:49:11 +05:30
Kovid Goyal
368bc91eed macOS: Render colors in the sRGB colorspace to match other macOS terminal applications
Fixes #2249
2021-07-12 17:34:03 +05:30
Kovid Goyal
219bf564f7 Fix #3719 2021-06-13 09:07:08 +05:30
Kovid Goyal
00828cb804 More reloading work for various options 2021-06-07 09:30:15 +05:30
Kovid Goyal
e4b4a35375 macOS: Fix rendering getting stuck on some machines after sleep/screensaver
This is caused, as far as I can tell, by CVDisplayLink getting stuck.
Apple apparently are incapable of writing a simple timer robustly.
So if it remains stuck after a second delete and recreate it to force it
to restart.

Fixes #2016
2021-05-12 07:30:17 +05:30
Kovid Goyal
e36f11385f Convert mouse buttons to an enum 2021-05-10 07:16:43 +05:30
Kovid Goyal
6b9b478492 Linux: Fix keyboard layout change keys defined via compose rules not being ignored 2021-05-01 08:09:26 +05:30
Kovid Goyal
62656b24eb GNOME: Add a new option to control the color of the kitty window titlebar 2021-04-25 11:22:23 +05:30
Ravi R Kiran
3c4460ca98 Give shift, control and caps lock precedence over other modifiers 2021-04-23 10:47:26 -05:00
Kovid Goyal
93dfe19c35 GNOME: Fix maximize state not being remembered when focus changes and window decorations are hidden
Apparently mutter needs window geometry set after the surface commit not
before, otherwise it doesnt "stick". When decorations are not hidden
there were other commits caused by the decorations, masking the issue.

Fixes #3507
2021-04-23 14:04:12 +05:30
Luflosi
6606f51636 Fix compilation on macOS 10.12
The constants `NSControlStateValueOn`, `NSControlStateValueOff` and `NSControlStateValueMixed` are only available for macOS 10.13 or above according to https://developer.apple.com/documentation/appkit/nscontrolstatevalueon?language=objc.
Without this commit, compilation fails with this message:
```
glfw/cocoa_window.m:1537:28: error: use of undeclared identifier 'NSControlStateValueOn'
              item.state = NSControlStateValueOn;
                           ^
glfw/cocoa_window.m:1539:28: error: use of undeclared identifier 'NSControlStateValueMixed'
              item.state = NSControlStateValueMixed;
                           ^
glfw/cocoa_window.m:1542:47: error: use of undeclared identifier 'NSControlStateValueOn'
          item.state = controller.isDesired ? NSControlStateValueOn : NSControlStateValueOff;
                                              ^
glfw/cocoa_window.m:1542:71: error: use of undeclared identifier 'NSControlStateValueOff'
          item.state = controller.isDesired ? NSControlStateValueOn : NSControlStateValueOff;
                                                                      ^
```
To fix this, simply redefine the constants to use the old and now deprecated constants on older macOS versions.

The code that causes this was introduced in 98519bf326.
2021-04-22 10:53:34 +02:00
Kovid Goyal
f3c559ea13 Cleanup secure keyboard entry logging 2021-04-22 09:41:01 +05:30
Kovid Goyal
84f6aabf5b Clean up debug keyboard on macOS 2021-04-22 09:28:11 +05:30
Kovid Goyal
cb41683f47 ... 2021-04-19 20:12:20 +05:30