Commit Graph
749 Commits
Author SHA1 Message Date
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
Kovid Goyal 629a8ad055 Fix #3501 2021-04-19 19:58:02 +05:30
Kovid Goyal 8c4e426534 Silence some unused parameter warnings 2021-04-19 13:53:27 +05:30
Kovid Goyal 9a2b0b6995 Wayland CSD: Double clicking on titlebar should toggle window maximize 2021-04-19 08:58:29 +05:30
Kovid Goyal e6ccc2d178 Fix #3485 2021-04-15 08:57:47 +05:30
Kovid Goyal db719eafac Remove num/caps locks from modifier processing in mouse events 2021-04-14 10:08:33 +05:30
Kovid Goyal 111c123435 X11: Fix resize_in_steps being applied even when window is maximized
Fixes #3473
2021-04-13 12:48:23 +05:30
Kovid Goyal ea2db51bbb Output all modifier indices in debug 2021-04-13 10:21:26 +05:30
Kovid Goyal cdcf8ed3bd Add some colors to keyboad debug output 2021-04-13 07:41:47 +05:30
Kovid Goyal 572466eed1 XKB: Honor numlock state when reporting keypad keys 2021-04-13 07:35:13 +05:30
Kovid Goyal 4c644b8556 Add NumLock and CapsLock reporting to the keyboard protocol 2021-04-13 07:10:00 +05:30
Kovid Goyal c989a7198b Add support for the keypad Begin key
Fixes #3468
2021-04-11 07:58:27 +05:30