aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
| * ci (gitlab+builds.sr.ht): execute foot{,client} --versionDaniel Eklöf2021-12-11-0/+13
| | | | | | | | | | This runs our builtin unit tests (debug builds only), and verifies it runs, at all. (and also logs the version in the build logs...)
| * test: config: cover all basic (primitive) options in [main]Daniel Eklöf2021-12-11-14/+193
| |
| * test: initial external unit test suite for ‘config.c’Daniel Eklöf2021-12-11-0/+102
|/ | | | | | | | | | | | This patch adds a separate (external) test binary with unit tests for config.c This is achieved by having the test’s source file include config.c (yes, the C file, not the header file). This allows us to call e.g. parse_section_*() directly, without having to go through config_load() (which requires having a readable file at “path”).
* changelog: kitty kbd: add link to codeberg issueDaniel Eklöf2021-12-08-1/+1
|
* Merge branch 'releases/1.10'Daniel Eklöf2021-12-08-2/+1
|\
| * changelog: kitty: alternate keys: base layout key is implementedreleases/1.10Daniel Eklöf2021-12-08-2/+1
| |
* | Merge branch 'releases/1.10'Daniel Eklöf2021-12-08-8/+16
|\|
| * meson: bump version to 1.10.31.10.3Daniel Eklöf2021-12-08-1/+1
| |
| * changelog: prepare for 1.10.3Daniel Eklöf2021-12-08-9/+3
| |
| * kitty: simplify: always calculate alternate/base keysDaniel Eklöf2021-12-08-14/+9
| | | | | | | | But only _emit_ them if report alternate has been enabled.
| * kitty: when emitting associated text, don’t report mods/events unless necessaryDaniel Eklöf2021-12-08-6/+8
| |
| * kitty: report-alternate: apply base-layout key to composed charactersDaniel Eklöf2021-12-08-13/+15
| |
| * kitty: implement “base layout key” in “report alternate key”Daniel Eklöf2021-12-08-5/+31
| |
| * kitty: initial support for “report alternate key”Daniel Eklöf2021-12-08-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In this mode, the “shifted” and “base layout” keys are added to the CSIs, as sub-parameters to the “key” parameter. Note that this PR only implements the “shifted” key, not the “base layout key”. This is done by converting the original XKB symbol to it’s corresponding UTF-32 codepoint. If this codepoint is different from the one we use as “key” in the CSI, we add it as a sub-parameter. Related to #319
| * kitty: only emit plain text on key press- and repeat eventsDaniel Eklöf2021-12-08-1/+1
| | | | | | | | That is, release events always generate CSIs
| * kitty: add ISO_Level{3,5}_Shift keysDaniel Eklöf2021-12-08-0/+4
| |
| * kitty: composed characters with “report associated text”Daniel Eklöf2021-12-08-18/+20
| | | | | | | | | | | | | | | | | | | | The generic input handler now converts the composed character to it’s UTF-32 equivalent. This means we now provide a valid UTF-32 codepoint for both composed characters, and non-composed (plain-text) characters. Use this in the kitty protocol to simplify the logic around composed characters, by simply treating them as plain text.
| * kitty: implement “report associated text”Daniel Eklöf2021-12-08-18/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this mode, key events that generate text now add a third CSI parameter, indicating the actual codepoint. Remember that we always use the *unshifted* key in the CSI escapes. With this mode, those CSI escapes now also included the text codepoint. I.e. what would have been emitted, had we not generated a CSI escape. As far as I can tell, this mode has no effect unless “report all keys as escape sequences” is enabled (reason being, without that, there aren’t any text events that generate CSIs - they’re always emitted as-is). Note that Kitty itself seems to be somewhat buggy in this mode. At least on Wayland, with my Swedish layout. For example ‘a’ and ‘A’ does generate the expected CSIs, but ‘å’ and ‘Å’ appears to be treated as non-text input. Furthermore, Kitty optimizes away the modifier parameter, if no modifiers are pressed (e.g. CSI 97;;97u), while we always emit the modifier (CSI 97;1;97u). Related to #319
| * grid: reload pointers into the uri range vector after insertingDaniel Eklöf2021-12-08-2/+41
| | | | | | | | | | | | | | Inserting elements into the URI range vector typically triggers a vector resize. This is done using realloc(). Sometimes this causes the vector to move, thus invalidating all existing pointers into the vector.
| * input: kitty: add support for “report all keys as escape codes”Daniel Eklöf2021-12-08-26/+60
| |
| * term: ensure cell dimensions are non-zeroDaniel Eklöf2021-12-08-0/+10
| | | | | | | | Closes #830
| * changelog: move entry to ‘unreleased’Daniel Eklöf2021-12-08-1/+6
| |
| * input: kitty: merge handling of plain-text and composed charactersDaniel Eklöf2021-12-08-88/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All plain-text and composed characters are now printed as-is, in a single place. Also fix handling of “generic” keys when emitted as escapes; don’t use the raw XKB symbol as key in the escape, convert it to a unicode code point first. For many symbols, these are the same. But not all. For now, we fallback to using the symbol as is if XKB fails to convert it to a codepoint. Not sure if we should simply drop the key press instead. Composed characters also need special treatment; we can’t use the symbol as is, since it typically refers to the last key pressed (i.e. not the composed character). And, that key is also (usually) a special “dead” key, which cannot be converted to a unicode codepoint. So, what we do is convert the generated utf8 string, and (try to) convert it to a wchar. If it succeeds, use that. If not, fallback to using the XKB symbol (as above).
| * input: reset compose state on key *releases*, not pressesDaniel Eklöf2021-12-08-1/+1
| |
| * input: kitty: treat repeating == pressed when report-events is offDaniel Eklöf2021-12-08-1/+1
| |
| * changelog: kitty: report eventsDaniel Eklöf2021-12-08-1/+2
| |
| * input: kitty: add support for the “report event” mode (0b10)Daniel Eklöf2021-12-08-14/+39
| |
| * input: don’t ignore key release eventsDaniel Eklöf2021-12-08-43/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | Before this, key release events stopped the repeat timer, and then returned. Now, we run through the entire function. Most things are still only done on key press events. But, the goal here is to get to the keyboard protocol functions (and the kitty protocol in particular), and call them on release events too. This is in preparation for the kitty protocol mode 0b10, report event types.
| * install: add UTF-8 locate to runtime depsDaniel Eklöf2021-12-08-0/+1
| |
| * install: update instructions on how to manually compile the terminfoDaniel Eklöf2021-12-08-9/+4
| |
| * changelog: add new ‘unreleased’ sectionDaniel Eklöf2021-12-08-0/+11
| |
* | Merge branch 'kitty-report-alternate-key-part-1'Daniel Eklöf2021-12-08-7/+44
|\ \ | | | | | | | | | Closes #319
| * | kitty: simplify: always calculate alternate/base keysDaniel Eklöf2021-12-08-14/+9
| | | | | | | | | | | | But only _emit_ them if report alternate has been enabled.
| * | kitty: when emitting associated text, don’t report mods/events unless necessaryDaniel Eklöf2021-12-08-6/+8
| | |
| * | kitty: report-alternate: apply base-layout key to composed charactersDaniel Eklöf2021-12-08-13/+15
| | |
| * | kitty: implement “base layout key” in “report alternate key”Daniel Eklöf2021-12-08-5/+31
| | |
| * | kitty: initial support for “report alternate key”Daniel Eklöf2021-12-08-1/+13
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | In this mode, the “shifted” and “base layout” keys are added to the CSIs, as sub-parameters to the “key” parameter. Note that this PR only implements the “shifted” key, not the “base layout key”. This is done by converting the original XKB symbol to it’s corresponding UTF-32 codepoint. If this codepoint is different from the one we use as “key” in the CSI, we add it as a sub-parameter. Related to #319
* | Merge branch 'kitty-report-associated-text'Daniel Eklöf2021-12-08-24/+52
|\ \ | | | | | | | | | Related to #319
| * | kitty: only emit plain text on key press- and repeat eventsDaniel Eklöf2021-12-08-1/+1
| | | | | | | | | | | | That is, release events always generate CSIs
| * | kitty: add ISO_Level{3,5}_Shift keysDaniel Eklöf2021-12-08-0/+4
| | |
| * | kitty: composed characters with “report associated text”Daniel Eklöf2021-12-08-18/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The generic input handler now converts the composed character to it’s UTF-32 equivalent. This means we now provide a valid UTF-32 codepoint for both composed characters, and non-composed (plain-text) characters. Use this in the kitty protocol to simplify the logic around composed characters, by simply treating them as plain text.
| * | kitty: implement “report associated text”Daniel Eklöf2021-12-08-18/+40
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this mode, key events that generate text now add a third CSI parameter, indicating the actual codepoint. Remember that we always use the *unshifted* key in the CSI escapes. With this mode, those CSI escapes now also included the text codepoint. I.e. what would have been emitted, had we not generated a CSI escape. As far as I can tell, this mode has no effect unless “report all keys as escape sequences” is enabled (reason being, without that, there aren’t any text events that generate CSIs - they’re always emitted as-is). Note that Kitty itself seems to be somewhat buggy in this mode. At least on Wayland, with my Swedish layout. For example ‘a’ and ‘A’ does generate the expected CSIs, but ‘å’ and ‘Å’ appears to be treated as non-text input. Furthermore, Kitty optimizes away the modifier parameter, if no modifiers are pressed (e.g. CSI 97;;97u), while we always emit the modifier (CSI 97;1;97u). Related to #319
* | Merge branch 'uri-range-erase-overwrite-crash'Daniel Eklöf2021-12-08-2/+41
|\ \
| * | grid: reload pointers into the uri range vector after insertingDaniel Eklöf2021-12-08-2/+41
|/ / | | | | | | | | | | | | Inserting elements into the URI range vector typically triggers a vector resize. This is done using realloc(). Sometimes this causes the vector to move, thus invalidating all existing pointers into the vector.
* | Merge branch 'kitty-kbd-report-all-keys-as-escape-codes'Daniel Eklöf2021-12-06-26/+60
|\ \ | | | | | | | | | Related to #319
| * | input: kitty: add support for “report all keys as escape codes”Daniel Eklöf2021-12-06-26/+60
|/ /
* | Merge branch 'ensure-cell-dimensions-are-non-zero'Daniel Eklöf2021-12-06-0/+10
|\ \ | | | | | | | | | Closes #830
| * | term: ensure cell dimensions are non-zeroDaniel Eklöf2021-12-04-0/+10
| | | | | | | | | | | | Closes #830
* | | Merge branch 'kitty-kbd-event-types'Daniel Eklöf2021-12-04-138/+184
|\ \ \ | |/ / |/| | | | | Related to #319
| * | changelog: move entry to ‘unreleased’Daniel Eklöf2021-12-04-1/+3
| | |
| * | input: kitty: merge handling of plain-text and composed charactersDaniel Eklöf2021-12-04-88/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All plain-text and composed characters are now printed as-is, in a single place. Also fix handling of “generic” keys when emitted as escapes; don’t use the raw XKB symbol as key in the escape, convert it to a unicode code point first. For many symbols, these are the same. But not all. For now, we fallback to using the symbol as is if XKB fails to convert it to a codepoint. Not sure if we should simply drop the key press instead. Composed characters also need special treatment; we can’t use the symbol as is, since it typically refers to the last key pressed (i.e. not the composed character). And, that key is also (usually) a special “dead” key, which cannot be converted to a unicode codepoint. So, what we do is convert the generated utf8 string, and (try to) convert it to a wchar. If it succeeds, use that. If not, fallback to using the XKB symbol (as above).
| * | input: reset compose state on key *releases*, not pressesDaniel Eklöf2021-12-04-1/+1
| | |
| * | input: kitty: treat repeating == pressed when report-events is offDaniel Eklöf2021-12-04-1/+1
| | |
| * | changelog: kitty: report eventsDaniel Eklöf2021-12-04-1/+2
| | |
| * | input: kitty: add support for the “report event” mode (0b10)Daniel Eklöf2021-12-04-14/+39
| | |
| * | input: don’t ignore key release eventsDaniel Eklöf2021-12-04-43/+62
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Before this, key release events stopped the repeat timer, and then returned. Now, we run through the entire function. Most things are still only done on key press events. But, the goal here is to get to the keyboard protocol functions (and the kitty protocol in particular), and call them on release events too. This is in preparation for the kitty protocol mode 0b10, report event types.
* | pgo: stub get_current_modifiers()Daniel Eklöf2021-12-04-0/+5
| |
* | Merge branch 'configure-select-override-mods'Daniel Eklöf2021-12-04-41/+213
|\ \
| * | improve documentation for [mouse-bindings].selection-override-modifiersfeeptr@codeberg.org2021-12-04-8/+13
| | |
| * | config: improve error reporting when selection-override-modifiers conflict with mouse bindingsfeeptr@codeberg.org2021-12-04-7/+54
| | |
| * | config: move button_map out of value_to_mouse_combos for reusefeeptr@codeberg.org2021-12-02-17/+17
| | | | | | | | | | | | this mapping is only available here or in libevdev (libevdev_event_code_get_name) and it's simpler to factor it out here
| * | config, doc, changelog: move selection-override-modifiers to [mouse-bindings] and validate other ↵feeptr@codeberg.org2021-12-02-25/+41
| | | | | | | | | | | | | | | | | | case specifically, check for conflicts both when mouse bindings are set and when the selection-override-modifiers setting itself is set
| * | config: parse 'none' as empty modifiers valuefeeptr@codeberg.org2021-12-02-0/+5
| | |
| * | changelog: list new mouse.selection-override-modifiers optionfeeptr@codeberg.org2021-12-02-0/+6
| | |
| * | doc: document select-override-modsfeeptr@codeberg.org2021-12-02-3/+15
| | |
| * | config, input: allow configuring select-override modifiersfeeptr@codeberg.org2021-12-02-19/+100
| | |
* | | install: add UTF-8 locate to runtime depsDaniel Eklöf2021-12-03-0/+1
| | |
* | | install: update instructions on how to manually compile the terminfoDaniel Eklöf2021-12-03-9/+4
|/ /
* | changelog: add new ‘unreleased’ sectionDaniel Eklöf2021-12-02-0/+11
| |
* | Merge branch 'releases/1.10'Daniel Eklöf2021-12-02-7/+5
|\|
| * meson: bump version to 1.10.21.10.2Daniel Eklöf2021-12-02-1/+1
| |
| * changelog: prepare for 1.10.2Daniel Eklöf2021-12-02-6/+4
| |
| * Merge branch 'master' into releases/1.10Daniel Eklöf2021-12-02-447/+1228
| |\ | |/ |/|
* | Merge branch 'osc4-dont-modify-rgb-colors'Daniel Eklöf2021-12-01-11/+13
|\ \ | | | | | | | | | Closes #678
| * | osc-4: don’t update the color of cells with RGB fg/bg colorsDaniel Eklöf2021-12-01-11/+13
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSC 4/104 changes the 256-color palette. We also run a pass over the visible cells, and update their colors. This was previously done by comparing the actual color of the cell, with the “old” color in the palette. If they matched, the cell was updated. This meant that cells with an RGB color (i.e. not a palette based color) was also updated, _if_ its color matched the palette color. Now that each cell tracks its color *source*, we can ignore all non-palette based cells. Note that this still isn’t perfect: if the palette contains multiple entries with the same color, we’ll end up updating the “wrong” cells. Closes #678
* | input: always update the xcursor shape in pointer enter/motion eventsDaniel Eklöf2021-12-01-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that term_xcursor_update_for_seat() takes the current surface into account (i.e. doesn’t assume the cursor is over the main grid), there’s no longer any need to call render_xcursor_set() directly. Thus, we can simply call term_xcursor_update_for_seat() on **all** pointer enter and motion events. As long as we take care to update the internal state to reflect the, possibly new, current surface before doing so. Also make sure to **always** reset the seat’s “current” xcursor pointer on pointer leave events. This is done without actually sending anything to the compositor, but is necessary to ensure that we *do* send a request to update the xcursor on the next pointer enter event.
* | input: fix debug log format specifier; ‘count’ is a size_tDaniel Eklöf2021-12-01-1/+1
| |
* | pgo: add stub for xcursor_for_csd_border()Daniel Eklöf2021-11-30-1/+7
| |
* | term: xcursor_update_for_seat(): BUG on xcursor == NULLDaniel Eklöf2021-11-30-1/+4
| |
* | input: make csd_data variable ‘const’Daniel Eklöf2021-11-30-2/+1
| |
* | term: xcursor_update_for_seat(): remove duplicate check for term->is_searchingDaniel Eklöf2021-11-30-1/+0
| |
* | term: xcursor_update_for_seat(): remove switch default caseDaniel Eklöf2021-11-30-1/+0
| | | | | | | | Let the compiler catch missing enum values
* | changelog: window-menuDaniel Eklöf2021-11-30-0/+2
| |
* | Merge branch 'window-menu'Daniel Eklöf2021-11-30-22/+67
|\ \
| * | input: Add support for xdg_toplevl.show_window_menu()Jonas Ådahl2021-11-29-8/+20
| | | | | | | | | | | | | | | This makes, if the compositor supports it, the window menu appear when right clicking on the title bar.
| * | input: Update mouse x/y coordinates on wl_pointer_enterJonas Ådahl2021-11-29-5/+9
| | | | | | | | | | | | | | | | | | | | | Otherwise if you don't receive motion event before e.g. button pressed, the coordinates will be incorrect. This happens when e.g. you get alt-tabbed so that the mouse cursor ends up on top of the terminal window, but the mouse never actually moved.
| * | terminal: Make seat xcursor update focus awareJonas Ådahl2021-11-29-9/+38
| | | | | | | | | | | | | | | | | | | | | When term_xcursor_update_for_seat() was called on e.g. keyboard focus loss, it'd update the curret xcursor to 'text' even if it was e.g. on top of the window title, or resize areas. This makes the function a bit more focus aware, and will not be so eager to set the text xcursor.
* | | Merge branch 'csd-border-render-glitch'Daniel Eklöf2021-11-29-4/+25
|\ \ \ | | | | | | | | | | | | Closes #823
| * | | render: fix csd border rendering glitch when width > 5pxDaniel Eklöf2021-11-29-4/+25
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CSD borders are always *at least* 5px. If url.border-width=0, those 5px are all fully transparent (and act as interactive resize handles). As csd.border-width increases, the number of transparent pixels decrease. Once csd.border-width >= 5, the border is fully opaque. When csd.border-width > 5, then width of the border is (obviously) more than 5px. But, when rendering the opaque part of the border, we still used 5px for the invisible part, which caused some pixman rectangles to have negative x/y coordinates. This resulted in rendering glitches due to overflows in pixman when rendering the borders. The fix is to ensure the total border size is always at least, but not *always* 5px. That is, set it to max(5, csd.border-width). This patch also fixes an issue where the CSD borders were not dimmed (like the titlebar) when the window looses input focus. Closes #823
* | | input: regression: reset view (and cancel selection) on “handled” inputDaniel Eklöf2021-11-29-16/+18
| | | | | | | | | | | | | | | | | | This fixes a regression, where the view (and selection) was only reset if the keyboard input resulted in plain text. That is, key presses like enter, arrows etc did not.
* | | input: regression: special keys don’t reset view and cancel selectionDaniel Eklöf2021-11-28-2/+4
| | | | | | | | | | | | | | | This fixes an issue where e.g. holding down ctrl would cancel the selection, thus making it impossible to copy text to the clipboard.
* | | Merge branch 'kitty-kbd'Daniel Eklöf2021-11-28-149/+619
|\ \ \ | | | | | | | | | | | | Part of #319
| * | | changelog: kitty keyboard protocol - disambiguate escape codesDaniel Eklöf2021-11-28-0/+3
| | | |
| * | | input: kitty: use `XKB_CONSUMED_MODE_GTK` when retrieving consumed modsDaniel Eklöf2021-11-28-1/+2
| | | |
| * | | input: get_current_modifiers(): use xkb_state_key_get_consumed_mods2()Daniel Eklöf2021-11-28-2/+4
| | | | | | | | | | | | | | | | Explicitly request consumed modifiers using the `XKB` mode.
| * | | term: rename: KITTY_KBD_MASK -> KITTY_KBD_SUPPORTEDDaniel Eklöf2021-11-28-3/+3
| | | |
| * | | input: legacy: use ALEN(mod_param_map)Daniel Eklöf2021-11-28-1/+1
| | | |
| * | | input: grammar: “an UTF-8” -> “a UTF-8”Daniel Eklöf2021-11-28-4/+4
| | | |
| * | | input: legacy: reduce size of reply bufferDaniel Eklöf2021-11-28-1/+1
| | | | | | | | | | | | | | | | | | | | Its maximum size is known; the only two variables are two integers. We know the maximum length of an integer converted to a string.
| * | | csi: kitty: remove unneeded xassertsDaniel Eklöf2021-11-28-2/+0
| | | | | | | | | | | | | | | | | | | | ‘idx’ is calculated just above, and the logic is simple enough that we don’t really need to assert it.