| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
| |
I.e. save/restore cursor-blink state.
|
| |
|
|
|
|
|
|
| |
E.g. only set mouse reporting to NONE, if mouse reporting mode is SGR
and an DECRST SGR is issued.
Do *not* reset the mouse mode if e.g. mouse reporting mode is SGR and
an DECRST URXVT is issued.
|
| | |
|
| | |
|
| |
|
|
|
| |
These shouldn't be accessed in any performance critical paths, so lets
save some memory and use a bitfield.
|
| | |
|
| | |
|
| |
|
|
| |
This function stores the current state of DECSET private modes.
|
| | |
|
| | |
|
| | |
|
| |\ |
|
| |/ |
|
| | |
|
| |\ |
|
| |/ |
|
| |\ |
|
| | | |
|
| |\ \
| |/
|/| |
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| | |
Closes #79. Closes #75.
|
| | |
| |
| |
| |
| | |
When we are doing a scrollback search, the selection *is* ongoing. We
still don't want to update the selection when the mouse moves.
|
| | | |
|
| | |
| |
| |
| | |
Typo: should be a '+', not a '='.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Shift is used to enable selection when the client application is
grabbing the mouse.
As such, mouse bindings *never* have Shift as a modifier, but should
still trigger when Shift is being pressed.
|
| | |
| |
| |
| |
| | |
Shift is a special modifier that is used to enable selection when the
client application is grabbing the mouse.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We shouldn't start or modify a selection if selection isn't
possible (i.e. client application is grabbing the mouse, and user
isn't holding Shift).
We also shouldn't start or modify a selection if the pointer is
outside the grid (updating an ongoing selection on motion events is an
exception to this).
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Check for ongoing selection, and *clear* it before bailing out due to
the selection not having an end-point.
This fixes an issue where a selection was kept as ongoing, even though
the button had been released. Typically triggered by clicking without
moving the mouse; this started a new selection, then (tried to)
finalize it, but failed since the selection didn't have an end-point.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This extends the "normal" bind action enum with mouse specific
actions.
When parsing key bindings, we only check up to the last valid keyboard
binding, while mouse bindings support *both* key actions and mouse
actions.
The new actions are:
* select-begin: starts an interactive selection
* select-extend: interactively extend an existing selection
* select-word: select word under cursor
* select-word-whitespace: select word under cursor, where the only
word separating characters are whitespace characters.
The old hard-coded selection "bindings" have been converted to instead
use these actions, via default bindings added to the configuration.
|
| | | |
|
| |/ |
|
| |\
| |
| |
| | |
Closes #78
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Specified by appending "-X", where X is a number.
|
| |/
|
|
| |
This allows us to use these macros in if-statement without braces.
|
| |\ |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This simplifies the handling of mouse and keyboard bindings.
Before, the bindings where parsed *both* when loading the
configuration, and then on every keyboard enter event. This was done
since keys require a keymap to be decoded. Something we don't have at
configuration time. The idea was that at config time, we used a
default keymap just to verify the key combo strings were valid.
The following has changed:
* The bindings in the config struct is now *one* key combo per
entry. Previously, it was one *action* per entry, and each entry
had one or more key combos.
Doing it this way makes it easier when converting the binding in the
keyboard enter event (which previously had to expand the combos
anyway).
* The bindings in the config struct no longer contains any unparsed
strings.
A key binding contains a decoded 'modifier' struct (which specifies
whether e.g. ctrl, or shift, or ctrl+shift must be pressed for the
binding to be used).
It also contains a decoded XKB keysym.
* A mouse binding in the config struct is similar to a key binding,
except it contains the button, and click count instead of the XKB
key sym.
* The modifiers in the user-specified key combo is decoded at config
time, by using the pre-defined XKB constants
XKB_MOD_NAME_<modifier>.
The result is stored in a 'modifiers' struct, which is just a
collection of booleans; one for each supported modifier.
The supported modifiers are: shift, ctrl, alt and meta/super.
* The key sym is decoded at config time using
xkb_keysym_from_name(). This call does *not* depend on a keymap.
* The mouse button is decoded at config time using a hardcoded mapping
table (just like before).
* The click count is currently hard-coded to 1.
* In the keyboard enter event, all we need to do is pre-compute the
xkb_mod_mask_t variable for each key/mouse binding, and find all the
*key codes* that map to the (already decoded) symbol.
For mouse bindings, the modifiers are the *only* reason we convert
the mouse bindings at all.
In fact, on button events, we check if the seat has a keyboard. If
not, we use the mouse bindings from the configuration directly, and
simply filter out those with a non-empty set of modifiers.
|
| | |
| |
| |
| |
| | |
Using memset() also clears the mouse bindings. This is both incorrect,
and leaked memory.
|
| | | |
|
| | |
| |
| |
| |
| | |
Don't call it when we have keyboard focus, call it when we have mouse
focus.
|
| | |
| |
| |
| |
| |
| |
| | |
Mouse bindings can now include modifiers. They are specified in pretty
much the same way as in keyboard bindings:
Control+BTN_LEFT
|
| |/ |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This can be set to 'none' (the default), 'osd', 'log' or 'both'.
When 'osd' is enabled, we'll render the frame rendering time to a
sub-surface after each frame.
When 'log' is enabled, the frame rendering time is logged on stderr.
|
| | |
|
| | |
|
| |
|
|
|
| |
* Don't assume multi-column characters are exactly *two* columns
* Check for CELL_MULT_COL_SPACER values instead of using wcwidth()
|
| | |
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Without this, the initial cell will always be selected, regardless of
how the selection is moved to the left or right.
With this patch, the initial cell will only be selected while the
selection is being made in the original direction. Changing direction
of the selection moves the start point to next/previous character.
|
| |\ \
| |/
|/| |
|
| |/
|
|
|
|
|
|
|
| |
The default is still to inverse the regular foreground/background
colors.
If the user sets *both* of the new options, selection-foreground and
selection-background, those colors will *always* be used for selected
cells, instead of inverting the regular foreground/background colors.
|
| |
|
|
| |
This used to be necessary, but isn't anymore.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
If the match was somewhere near the scrollback beginning, and if the
entire scrollback hadn't yet been filled, we ended up trying to move
the viewport past the beginning of the scrollback, which we then
adjusted in the wrong direction, causing the viewport to not move at
all.
Besides being a bad user experience, since the new match wasn't
visible, foot would also crash if you manually scrolled up to the
match.
|
| |
|
|
| |
This reverts commit b7b7b56b3d64d1eca008082331d94eecfd60dfdf.
|
| | |
|
| |
|
|
| |
timeval.tv_usec is an 'unsigned long long' on 32-bit
|
| | |
|
| | |
|
| |
|
|
|
| |
This ensures we don't issue a warning if we fail, something that will
just confuse users, as SHM scrolling is disabled in 32-bit anyway.
|
| |\ |
|
| | | |
|
| |/ |
|
| | |
|
| |\
| |
| |
| | |
Closes #70
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While refactoring this code, the check for LMB or RMB got changed to
LMB or "any button".
This fixes that.
It also adds a boolean 'cursor_is_on_grid', which should make the code
easier to read and understand.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't send mouse button escapes to a mouse grabbing client when the
cursor is outside the grid (i.e. when it is inside the margins).
Also don't do *any* kind of selection when the cursor is outside the
grid. Previously, we only checked this for selection_start(), but
e.g. double clicking would run selection_extend(), or
selection_mark_word() etc.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, the selection was only updated when the mouse cursor was
inside the grid. This makes it difficult to e.g. do large selections
fast, since you often end up moving the cursor outside the grid, or
outside the terminal window even.
Now, we update the selection regardless of *where* the cursor is. This
is done by bounding the row/col we pass to 'selection_update()' to the
grid, while still setting the seat's row/col to -1 when the cursor is
outside the grid, to ensure the xcursor etc are set correctly.
Care must also be taken to *not* pass any motion events to a mouse
grabbing client, when the cursor is outside the grid.
Closes #70.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes an issue where the col/row were incorrectly set to 0
instead of -1, when the mouse cursor was inside the grid margins.
This resulted in e.g. the mouse cursor having the wrong shape, and
foot incorrectly handling mouse events as if they were inside the
grid.
|
| |\ \ |
|
| |/ / |
|
| |\ \
| |/
|/| |
|
| |/ |
|
| |\ |
|
| | | |
|
| |\ \
| |/
|/| |
|
| |/ |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| | |
The desktop entry specification lists 'Keywords' to acilitate searching
through entries.
https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html
These initial values are based on the keywords from gnome-terminal.
|