| Commit message (Collapse) | Author | Age | Lines | ||
|---|---|---|---|---|---|
| ... | |||||
| * | input: cleanup | Daniel Eklöf | 2020-02-29 | -71/+69 | |
| | | |||||
| * | input: don't update xcursor on keyboard enter/leave | Daniel Eklöf | 2020-02-29 | -4/+2 | |
| | | | | | | | | | | I'm not sure why I added this in the first place... our cursor doesn't depend on keyboard focus. Furthermore, with CSDs, we may get keyboard enter events for the CSD surfaces, and these should definitely *not* update the xcursor as if it was inside the main surface. | ||||
| * | input: csd: add a small delay before initiating a move | Daniel Eklöf | 2020-02-29 | -5/+36 | |
| | | | | | | This ensures the user has time to double-click to toggle the maximized state. | ||||
| * | wayland: remove all usages of wayl_terminal_from_surface() | Daniel Eklöf | 2020-02-29 | -3/+6 | |
| | | | | | Use the 'user data' pointer from the wayland surface instead. | ||||
| * | wayland: store pointer to window instance in all surfaces | Daniel Eklöf | 2020-02-29 | -1/+7 | |
| | | |||||
| * | input: reset mouse state on pointer leave | Daniel Eklöf | 2020-02-29 | -0/+3 | |
| | | |||||
| * | input: toggle maximized state when double-clicking the title bar | Daniel Eklöf | 2020-02-29 | -12/+11 | |
| | | |||||
| * | input: handle double/triple click state regardless of surface | Daniel Eklöf | 2020-02-29 | -21/+23 | |
| | | |||||
| * | input: handle CSD border corners correctly | Daniel Eklöf | 2020-02-29 | -31/+87 | |
| | | | | | That is, change to correct cursor, and do resize correctly. | ||||
| * | input: temporary code to trigger maximize/minimize | Daniel Eklöf | 2020-02-26 | -0/+12 | |
| | | |||||
| * | input: wip: trigger move/resize when left-clicking CSD | Daniel Eklöf | 2020-02-25 | -5/+73 | |
| | | |||||
| * | input: pointer-motion/button: ignore actions in non-main surfaces | Daniel Eklöf | 2020-02-24 | -0/+7 | |
| | | |||||
| * | input: pointer-leave: reset 'active-surface' in terminal | Daniel Eklöf | 2020-02-24 | -1/+3 | |
| | | |||||
| * | input: pointer-enter: differentiate between the surfaces | Daniel Eklöf | 2020-02-24 | -3/+33 | |
| | | |||||
| * | term: resize: pre-calculate right/bottom margins | Daniel Eklöf | 2020-02-24 | -2/+2 | |
| | | |||||
| * | input: fix xcursor getting stuck | Daniel Eklöf | 2020-02-15 | -0/+8 | |
| | | | | | | | | | | | | Apparently, a frame callback for the cursor surface is *never* triggered if we get a pointer-leave event *before* the callback is triggered. At least on Sway 1.4. This caused the cursor being stuck, and never updating once this state was reached. Fix by destroying the cursor frame callback on pointer-leave. | ||||
| * | input: ctrl+= increases font size, not resets it | Daniel Eklöf | 2020-02-10 | -2/+2 | |
| | | |||||
| * | input: hook ctrl+{=,0} to term_font_size_reset() | Daniel Eklöf | 2020-02-08 | -0/+5 | |
| | | |||||
| * | input: hook ctrl+{plus/KP-Add/minus/KP-Subtract} to term_font_size_{increase,decrease} | Daniel Eklöf | 2020-02-08 | -0/+12 | |
| | | |||||
| * | presentation: store input timestamp in a per-commit context | Daniel Eklöf | 2020-01-21 | -2/+3 | |
| | | | | | | This should reduce the risk of mixing up an input timestamp with the corresponding rendered frame. | ||||
| * | input: implement metaSendsEscape and eightBitMeta | Daniel Eklöf | 2020-01-20 | -31/+69 | |
| | | |||||
| * | input: reset XKB compose state on keyboard leave | Daniel Eklöf | 2020-01-14 | -0/+1 | |
| | | |||||
| * | Revert "input: generate key down events on keyboard-enter" | Daniel Eklöf | 2020-01-14 | -9/+1 | |
| | | | | | This reverts commit 84739d78c626ad12543417dc1e3038abd6a4e2d5. | ||||
| * | input: generate key down events on keyboard-enter | Daniel Eklöf | 2020-01-13 | -1/+9 | |
| | | |||||
| * | input: reset modifier state on keyboard-leave | Daniel Eklöf | 2020-01-13 | -0/+5 | |
| | | |||||
| * | input: comments | Daniel Eklöf | 2020-01-11 | -45/+57 | |
| | | |||||
| * | input: keymap_lookup: only do lookup, don't sent to client | Daniel Eklöf | 2020-01-11 | -11/+12 | |
| | | |||||
| * | input: add a switch-based function that translates XKB keysym to escape data | Daniel Eklöf | 2020-01-11 | -19/+105 | |
| | | |||||
| * | input: break out keymap lookup to a separate function | Daniel Eklöf | 2020-01-11 | -25/+35 | |
| | | |||||
| * | input: scroll: call term_mouse_up() once, after all term_mouse_down() | Daniel Eklöf | 2020-01-04 | -0/+1 | |
| | | | | | | Note that scroll button release events are not actually sent to the client, but this makes the code more correct, logically. | ||||
| * | selection: track selection type; normal or block selection | Daniel Eklöf | 2020-01-03 | -1/+3 | |
| | | |||||
| * | input: keyboard-leave: move comment to where it belongs | Daniel Eklöf | 2020-01-02 | -3/+3 | |
| | | |||||
| * | term: rename term_focus_{in,out} -> term_kbd_focus_{in,out} | Daniel Eklöf | 2020-01-02 | -2/+2 | |
| | | |||||
| * | wayland: rename focused/moused to kbd_focus/mouse_focus | Daniel Eklöf | 2020-01-02 | -17/+17 | |
| | | |||||
| * | wayland: optionally use the presentation time protocol to measure input lag | Daniel Eklöf | 2019-12-31 | -0/+2 | |
| | | | | | | | | | | | | | | | | | | | | This adds a flag, -p,--presentation-timings, that enables input lag measuring using the presentation time Wayland protocol. When enabled, we store a timestamp when we *send* a key to the slave. Then, when we commit a frame for rendering to the compositor, we request presentation feedback. We also store a timestamp for when the frame was committed. The 'presented' callback then looks at the input and commit timestamps, and compares it with the presented timestamp. The delay is logged at INFO when the delay was less than one frame interval, at WARN when it was one frame interval, and at ERR when it was two or more frame intervals. We also update statistic counters that we log when foot is shut down. | ||||
| * | term: term_spawn_new(): new function, spawns a new foot/footclient process | Daniel Eklöf | 2019-12-21 | -0/+5 | |
| | | | | | Bind ctrl+shift+return to it | ||||
| * | cursor blink: move reset to pty input | Daniel Eklöf | 2019-12-19 | -3/+0 | |
| | | |||||
| * | input: restart cursor blink on keyboard input | Daniel Eklöf | 2019-12-16 | -0/+3 | |
| | | | | | This makes the cursor stay unblinking while typing. | ||||
| * | input: discard canceled compose sequences | Daniel Eklöf | 2019-12-02 | -0/+2 | |
| | | |||||
| * | term: mouse reporting functions no longer take modifier state | Daniel Eklöf | 2019-11-30 | -8/+4 | |
| | | | | | | | | | | | | | | | | | The mouse reporting functions are called from input when we receive Wayland mouse events. We used to pass the current keyboard modifier (shift, alt, ctrl, etc) to the terminal functions. This however is wrong, since we may receive Wayland mouse events without having keyboard focus. When we don't have keyboard focus, the modifier state doesn't apply to us. Remove the modifier arguments from the terminal mouse reporting functions. These functions now read this state directly instead, but only when the terminal instance in question has keyboard focus. | ||||
| * | input: doh! mouse_scroll: first argument to keyboard_key() is a struct wayland | Daniel Eklöf | 2019-11-30 | -2/+2 | |
| | | | | | This is the problem with void* user data pointers in callbacks... | ||||
| * | input: mouse_scroll: cache XKB_KEY_Up and XKB_KEY_Down | Daniel Eklöf | 2019-11-30 | -2/+9 | |
| | | |||||
| * | input: update xcursor on terminal with *keyboard* focus when modifiers change | Daniel Eklöf | 2019-11-30 | -4/+2 | |
| | | |||||
| * | input: pointer-leave: reset moused *before* doing anything else | Daniel Eklöf | 2019-11-29 | -3/+8 | |
| | | | | | And update xcursor. This is currently not necessary, but doesn't hurt. | ||||
| * | input: pointer-enter: add debug log | Daniel Eklöf | 2019-11-29 | -0/+2 | |
| | | |||||
| * | input: keyboard_leave: reset focused *before* doing anything else | Daniel Eklöf | 2019-11-29 | -4/+6 | |
| | | | | | | | And update xcursor. This is necessary since we may still have mouse focus. But without keyboard focus, we don't display the 'text' xcursor. | ||||
| * | input: keyboard/pointer_leave: warn if we didn't see corresponding enter event | Daniel Eklöf | 2019-11-28 | -0/+10 | |
| | | |||||
| * | input: keyboard/pointer_enter: assert surface != NULL | Daniel Eklöf | 2019-11-28 | -0/+5 | |
| | | |||||
| * | terminal: use the 'text' xcursor pointer whenever selection is possible | Daniel Eklöf | 2019-11-28 | -1/+7 | |
| | | |||||
| * | input: pointer_button: apply same workaround as in pointer_motion | Daniel Eklöf | 2019-11-28 | -1/+18 | |
| | | | | | | Sway 1.2 has been seen to send pointer_button events without first having sent pointer_enter. | ||||
| * | input: sway 1.2 bug: keyboard_leave() called with surface == NULL | Daniel Eklöf | 2019-11-28 | -2/+4 | |
| | | |||||
| * | input: document why wayl->focused may be NULL | Daniel Eklöf | 2019-11-23 | -1/+7 | |
| | | |||||
| * | input: improve behavior when sway bugs out | Daniel Eklöf | 2019-11-22 | -3/+17 | |
| | | | | | | | | | | | | | | | | When we receive a keyboard_key or pointer_motion event without first having received a keyboard_enter or pointer_enter event (that being the "sway bugs" part), we generally don't know _which_ terminal window the event was intended for. However, if we only have *one* window open (always the case for a regular 'foot' process, or when there's a single footclient connected to a foot server process), then obviously we can "guess" which window the event was intended for... so do that. Now, the only time the event is ignored is when we're a server process with more than one window open (= more than one footclient connected). | ||||
| * | input: use xkb_keymap_key_repeats() to determine if we should start repeat timer | Daniel Eklöf | 2019-11-22 | -19/+19 | |
| | | |||||
| * | input: keyboard_key: don't start repeater unless we generated output | Daniel Eklöf | 2019-11-22 | -54/+57 | |
| | | | | | | | | | | | | I.e. what we're effectively doing is *not* repeating modifier keys. Besides being the "right" thing to do, this also works around another Sway 1.2 bug, where being in a focused foot window and then switching to a vt and back would cause us to be stuck in an endless key repeat loop that would only stop when unfocusing, focusing back and then unfocusing once again. | ||||
| * | input: workaround buggy Sway sending bad input events | Daniel Eklöf | 2019-11-22 | -0/+21 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sway 1.2 has been seen sending keyboard_key() events without first sending a keyboard_enter() event. This can be triggered by: 1. start a foot terminal 2. unfocus it (move focus to another window) 3. switch to a vt 4. switch back to sway 5. focus the foot terminal At this point, Sway will *not* send the keyboard_enter() event, but instead send a keyboard_key() event. (furthermore, if you now unfocus the window again, sway will send a keyboard_leave() event, still without having sent a keyboard_enter() event). Sway has _also_ been seen crashing in wl_pointer_motion(). Though this was in a build without proper debug information, everything points to a similar issue - i.e. sway is sending a motion event without first having sent an enter event. Workaround this by detecting this and logging a warning the first time it happens. The event is then ignored. | ||||
| * | keyboard repeat: pass current input serial to keyboard_key() | Daniel Eklöf | 2019-11-22 | -1/+3 | |
| | | | | | | | | This fixes an assertion when holding in ctrl+shift+c (copy to clipboard); subsequent "presses" would set the clipboard serial to 0, which we would then assert on in the next iteration when we tried to cancel the previous copy. | ||||
| * | input: may get keyboard_exit() event with no focused terminal | Daniel Eklöf | 2019-11-21 | -1/+5 | |
| | | | | | | | | | This happens on Sway when exiting a screen locker. Or at least that's when we see the problem; it's unclear if the event occurs when starting the screen locker, or when exiting it. Or maybe its both. Anyway, don't try to unfocus a NULL-terminal. | ||||
| * | Revert "input: remove unneeded(?) term_reset_view() calls" | Daniel Eklöf | 2019-11-20 | -2/+2 | |
| | | | | | | | | | | | | | This reverts commit 739c5cf7f026bd7792f94276e8d6b2587a6ff597. The original commit stated: Not sure why these were added here; they don't appear to be needed (we're writing to the client - it's up to the client to echo stuff, in which case we redraw as usual). But, client output doesn't cause a scrollback/view reset. | ||||
| * | input: remove unneeded(?) term_reset_view() calls | Daniel Eklöf | 2019-11-04 | -2/+2 | |
| | | | | | | | Not sure why these were added here; they don't appear to be needed (we're writing to the client - it's up to the client to echo stuff, in which case we redraw as usual). | ||||
| * | Rename: vt_to_slave() -> term_to_slave() | Daniel Eklöf | 2019-11-02 | -4/+4 | |
| | | |||||
| * | wayland: move reload_cursor_theme() and update_cursor_surface() to wayland | Daniel Eklöf | 2019-10-27 | -1/+1 | |
| | | |||||
| * | input: input_repeat() takes a 'struct wayland' pointer | Daniel Eklöf | 2019-10-27 | -2/+2 | |
| | | |||||
| * | wayland: change all wayland callbacks to take a wayland pointer | Daniel Eklöf | 2019-10-27 | -121/+139 | |
| | | | | | | Instead of passing the terminal to the wayland callbacks, pass a 'struct wayland' pointer. | ||||
| * | kbd: move into wayland | Daniel Eklöf | 2019-10-27 | -68/+68 | |
| | | |||||
| * | input: scale coordinates in wl_pointer_enter() | Daniel Eklöf | 2019-09-26 | -2/+2 | |
| | | |||||
| * | main: initialize scale to '1' | Daniel Eklöf | 2019-09-26 | -3/+2 | |
| | | | | | | | | | | | This ensures we always have a valid (but possibly incorrect) scaling value. This allows us to simplify code that uses the scale - it doesn't have to verify the scale if valid. Furthermore, since render_resize() is the function that actually updates term->scale, make sure to call it *before* updating the cursor (otherwise, the cursor will use the old scaling value). | ||||
| * | input: take scale into account when converting mouse coords to row/col | Daniel Eklöf | 2019-08-30 | -2/+3 | |
| | | |||||
| * | input: bug: account for margins when converting mouse coords to row/col | Daniel Eklöf | 2019-08-30 | -2/+2 | |
| | | |||||
| * | input: call term_reset_view() instead of duplicating code | Daniel Eklöf | 2019-08-28 | -10/+3 | |
| | | |||||
| * | input: cancel search on mouse button events | Daniel Eklöf | 2019-08-27 | -0/+2 | |
| | | |||||
| * | search: wip: re-direct input while searching, and build a search buffer | Daniel Eklöf | 2019-08-27 | -3/+15 | |
| | | | | | | | | | | | | This adds a new state, 'is_searching'. While active, input is re-directed, and stored in a search buffer. In the future, we'll use this buffer and search for its content in the scrollback buffer, and move the view and create a selection on matches. When rendering in 'is_searching', everything is dimmed. In the future, we'll render the current search buffer on-top of the dimmed "regular" terminal output. | ||||
| * | input: back out accidental commit of debug code | Daniel Eklöf | 2019-08-19 | -1/+1 | |
| | | |||||
| * | csi: implement CSI ? 1007 h/l - alternateScroll | Daniel Eklöf | 2019-08-19 | -6/+22 | |
| | | | | | | When enabled, mouse scrolls in the alternate screen are converted to up/down key presses. | ||||
| * | input: remove debug output | Daniel Eklöf | 2019-08-15 | -1/+0 | |
| | | |||||
| * | input: handle meta modifier when modifying "other" keys | Daniel Eklöf | 2019-08-15 | -1/+12 | |
| | | | | | | | When handling keys without a specific map defined (i.e. keys corresponding roughly to xterm's "otherKeys"), recognize the meta modifier and report the correct modifier code. | ||||
| * | input: track meta modifier | Daniel Eklöf | 2019-08-15 | -2/+7 | |
| | | |||||
| * | input: free previous XKB state when we get a new one | Daniel Eklöf | 2019-08-12 | -0/+20 | |
| | | |||||
| * | input: don't paste from primary if client is mouse tracking | Daniel Eklöf | 2019-08-09 | -1/+1 | |
| | | |||||
| * | selection/input: triple click selects an entire row | Daniel Eklöf | 2019-08-06 | -12/+22 | |
| | | |||||
| * | input: use a timer fd to handle keyboard key repeat | Daniel Eklöf | 2019-08-05 | -29/+39 | |
| | | | | | | | | | | | | Instead of running a repeater thread that writes the key to repeat over a pipe, use a simple timer fd. No more locking or condition signalling. No need to track start/stop/exist states. We simply set up the initial timeout value to be the 'delay', and the interval to be the repeat 'rate'. | ||||
| * | selection: mark-word using spaces only as word separator | Daniel Eklöf | 2019-08-05 | -1/+2 | |
| | | | | | | When the user double-clicks with ctrl pressed, we now select the word under the cursor using spaces only as word separator. | ||||
| * | cell: pack more efficiently and store glyph as a wchar | Daniel Eklöf | 2019-08-02 | -24/+31 | |
| | | | | | | | | | | | | The 'attributes' struct is now 8 bytes and naturally packed (used to be 9 bytes, artificially packed). 'cell' struct is now 12 bytes, naturally packed (used to be 13 bytes, artificially packed). Furthermore, the glyph is stored as a wchar instead of a char*. This makes it easier (faster) to do glyph lookup when rendering. | ||||
| * | input: fix 'comparison ... is always true' warning (clang) | Daniel Eklöf | 2019-07-30 | -3/+3 | |
| | | |||||
| * | input: use keyboard enter serial only for selection serial | Daniel Eklöf | 2019-07-30 | -7/+0 | |
| | | |||||
| * | input: generate escape sequences for "other" keys | Daniel Eklöf | 2019-07-26 | -6/+34 | |
| | | | | | | This corresponds to xterm's modifyOtherKeys option, though the code needs more testing and cleanup. | ||||
| * | mouse: use discrete axis event if available | Daniel Eklöf | 2019-07-26 | -22/+33 | |
| | | | | | This improves the scroll experience with certain devices | ||||
| * | input: store last seen wayland input serial | Daniel Eklöf | 2019-07-19 | -1/+10 | |
| | | | | | We need this for clipboard data | ||||
| * | selection: implement double-click-to-select-word | Daniel Eklöf | 2019-07-17 | -4/+24 | |
| | | |||||
| * | csi: implement FocusIn/Out events | Daniel Eklöf | 2019-07-16 | -0/+2 | |
| | | |||||
| * | Use vt_to_slave() instead of calling write(term->ptmx, ...) everywhere | Daniel Eklöf | 2019-07-15 | -3/+4 | |
| | | |||||
| * | input: cancel selection on any mouse *except* BTN_LEFT | Daniel Eklöf | 2019-07-11 | -1/+1 | |
| | | |||||
| * | selection: implement copy *to* primary | Daniel Eklöf | 2019-07-11 | -1/+1 | |
| | | |||||
| * | selection: add selection_from_primary() API (stub for now) | Daniel Eklöf | 2019-07-11 | -1/+4 | |
| | | |||||
| * | selection: add support for pasting from clipboard | Daniel Eklöf | 2019-07-11 | -0/+5 | |
| | | |||||
| * | selection: initial copy-to-clipboard functionality | Daniel Eklöf | 2019-07-11 | -0/+7 | |
| | | |||||
| * | input: call selection_finalize() when BTN_LEFT is released | Daniel Eklöf | 2019-07-11 | -0/+2 | |
| | | |||||
| * | input: ignore mouse motion outside our window | Daniel Eklöf | 2019-07-11 | -0/+3 | |
| | | |||||
| * | selection: add a selection API | Daniel Eklöf | 2019-07-11 | -28/+17 | |
| | | |||||
| * | selection: only left button can be used for selection | Daniel Eklöf | 2019-07-11 | -6/+14 | |
| | | |||||
