Thorsten Ball
a76aea4d0a
macOS: new split can inherit font size
2023-08-19 09:59:04 +02:00
Thorsten Ball
2e9b787668
macOS: new window can inherit font size
...
This is the second part of #281 and adds the same mechanism that was
added for tabs in #296 for windows.
It works exactly the same way.
2023-08-19 09:29:56 +02:00
Mitchell Hashimoto
4f5460475c
Merge pull request #296 from mitchellh/mrn/macos-inherit-font-size
...
macOS: inherit font size when creating new tab
2023-08-18 09:22:06 -07:00
Mitchell Hashimoto
a960faa2b8
apprt/embedded: use setfontsize so that the original font size is
...
retained
2023-08-18 09:13:59 -07:00
Mitchell Hashimoto
79971c62a6
macos: pass around a base surface_config_s rather than a new tab
2023-08-18 09:09:43 -07:00
Thorsten Ball
cda87a6963
embedded: use separate struct to pass options to new_tab_cb
2023-08-18 06:50:47 +02:00
Mitchell Hashimoto
72f5370066
apprt/glfw: always say alt is consumed on macos
2023-08-17 12:51:07 -07:00
Thorsten Ball
d2dae7a696
macOS: inherit font size when creating new tab
...
This is one part of #281 .
2023-08-17 20:56:56 +02:00
Mitchell Hashimoto
fe0e1f5ee8
input: key must provide unshifted codepoint
2023-08-17 09:40:32 -07:00
Mitchell Hashimoto
33bef28850
rename key2callback to keycallback
2023-08-16 13:40:57 -07:00
Mitchell Hashimoto
4e8f5d3997
remove charCallback/keyCallback
2023-08-16 13:39:44 -07:00
Mitchell Hashimoto
dd385cc633
apprt/glfw: convert to new key2callback
2023-08-16 13:34:31 -07:00
Mitchell Hashimoto
cd90b2a716
apprt/embedded: only call new key2callback
2023-08-16 13:26:22 -07:00
Mitchell Hashimoto
896d0e8fcf
apprt/gtk: only use key2callback
2023-08-16 13:02:31 -07:00
Mitchell Hashimoto
83ba2b9825
apprt/gtk: clean up keyval_unicode usage
2023-08-16 12:51:00 -07:00
Mitchell Hashimoto
1a918bc64b
apprt/gtk: call new key2callback using the all-in-one key event
2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
759ae94f15
macos: do not send ctrl or super into UCKeyTranslate
...
see comment
2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
e74a173704
apprt/gtk: translate keyval if there is no utf8
...
This is the same fix as #287 but for GTK.
2023-08-16 12:47:51 -07:00
Mitchell Hashimoto
2b2b23dcf6
apprt/embedded: keycallback should use nomod text to determine key
...
To determine the logical key that was pressed, we previously just
trusted that the translated text would have the right value. But if
modifiers are pressed, the text may not translate.
For example on macOS, Ctrl+C does not produce any text. As a result, we
would fall back to the physical key. On layouts like Dvorak, the
physical key for "C" is "I". This means "Ctrl+C" sequences weren't
working.
Instead, if there is no text or the text doesn't map to a key, we
translate again using no modifiers to try to get the raw text of the
input and then base the key on that.
2023-08-15 11:13:01 -07:00
Mitchell Hashimoto
cbd6a325e9
config: macos-option-as-alt now accepts "left", "right"
2023-08-14 12:50:21 -07:00
Mitchell Hashimoto
e7bb9c60b2
input: expand Mods size, convert everything to use it
2023-08-14 12:31:16 -07:00
Mitchell Hashimoto
49a9d626ec
apprt/gtk: convert keyval to unicode if input method doesn't process
...
See comment for details.
2023-08-13 16:27:46 -07:00
Mitchell Hashimoto
6fb9a113c1
apprt/glfw: send mods to charcallback
2023-08-13 15:12:25 -07:00
Mitchell Hashimoto
4a384aa272
parse and respect mode 1036
2023-08-13 15:12:13 -07:00
Mitchell Hashimoto
5e2fa50d0b
macos-option-as-alt config, handle alt-prefix for charCallback
2023-08-13 14:55:31 -07:00
Mitchell Hashimoto
81995fc078
apprt/gtk: inherit font size on new windows and tabs
2023-08-13 12:15:42 -07:00
Mitchell Hashimoto
619d2ade3e
only initialize font discovery mechanism once, cache on App
...
Fontconfig in particular appears unsafe to initialize multiple times.
Font discovery is a singleton object in an application and only ever
accessed from the main thread so we can work around this by only
initializing and caching the font discovery mechanism exactly once on
the app singleton.
2023-08-13 08:01:33 -07:00
Mitchell Hashimoto
55778a049b
apprt/gtk, opengl: render preedit
2023-08-11 12:37:27 -07:00
Mitchell Hashimoto
d62161e2c3
support preedit text rendering in core and metal
2023-08-11 12:20:48 -07:00
Mitchell Hashimoto
ce4eb2112c
core: get rid of ignore_char, apprt must handle this now
2023-08-11 12:02:01 -07:00
Mitchell Hashimoto
38477ed547
apprt/gtk: use manual translation, handle dead key states
2023-08-11 12:02:01 -07:00
Mitchell Hashimoto
7ea8feea69
apprt/embedded: fix char callback ignore when key is consumed
2023-08-11 12:02:00 -07:00
Mitchell Hashimoto
4fe739cae0
core: note when keyCallback processed the input
2023-08-11 12:02:00 -07:00
Mitchell Hashimoto
d5df8aea9a
apprt/embedded: handle repeat events
2023-08-11 12:02:00 -07:00
Mitchell Hashimoto
d02bf322f8
apprt/embedded: remove old _key api, new only!
2023-08-11 12:02:00 -07:00
Mitchell Hashimoto
1e1ad7deb9
macos: use the new self-hosted translation
2023-08-11 12:02:00 -07:00
Mitchell Hashimoto
1f4a80aa93
apprt/embedded: keymap state is per surface, not per app
2023-08-11 12:02:00 -07:00
Mitchell Hashimoto
57a527b0c9
macos: detect keyboard layout change and reload the keymap
2023-08-11 12:01:59 -07:00
Mitchell Hashimoto
3d23f26326
input, macos: initial work on keymapper and macos usage of it
2023-08-11 12:01:58 -07:00
Mitchell Hashimoto
7b33ee6b71
Merge pull request #266 from mitchellh/primary-clipboard
...
Primary (selection) clipboard support
2023-08-09 15:14:59 -07:00
Mitchell Hashimoto
ecb9563f2a
apprt/glfw: warn that the macos version has bugs
2023-08-09 15:14:39 -07:00
Mitchell Hashimoto
688ab84661
apprt/embedded: allow noting that selection clipboard is not supported
2023-08-09 14:52:22 -07:00
Mitchell Hashimoto
afc6a9976f
apprt/embedded: support selection clipboard
2023-08-09 14:29:39 -07:00
Mitchell Hashimoto
ca008df73d
apprt/glfw: support primary clipboard
2023-08-09 14:22:17 -07:00
Mitchell Hashimoto
f012b908b7
apprt/gtk: use glfw for reading primary clipboard (see comment)
2023-08-09 14:17:03 -07:00
Mitchell Hashimoto
347c60d9bd
selection copies to the selection clipboard
2023-08-09 14:00:48 -07:00
Mitchell Hashimoto
f3996ff0f8
apprt: primary clipboard awareness (selection clipboard)
2023-08-09 13:41:22 -07:00
moderation
b33b2bb6a4
gtk: apply background opacity
...
Signed-off-by: moderation <michael@sooper.org>
2023-08-09 12:03:05 -07:00
Thorsten Ball
147d5b0f3e
gtk: fix arrow-up stealing focus
...
This fixes #253 -- with essentially a single line! Just took me a while
to find out where to add this line.
Turns out we already solved this problem for `<Tab>` so now we do the
same thing for `<Up>`: we tell the `GtkApplication` we handled the event
so it doesn't propagate any further.
2023-08-09 20:11:03 +02:00
Mitchell Hashimoto
42735bd0e0
apprt/embedded: new resources dir api
2023-08-08 09:55:23 -07:00