mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-31 07:11:09 -04:00
commit
3baf7de3b8
3 changed files with 27 additions and 0 deletions
|
|
@ -40,6 +40,11 @@
|
||||||
## Unreleased
|
## Unreleased
|
||||||
### Added
|
### Added
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
* Mouse selections are now finalized when the window is resized
|
||||||
|
(https://codeberg.org/dnkl/foot/issues/922).
|
||||||
|
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
### Removed
|
### Removed
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
@ -48,6 +53,8 @@
|
||||||
(https://codeberg.org/dnkl/foot/issues/918).
|
(https://codeberg.org/dnkl/foot/issues/918).
|
||||||
* “(null)” being logged as font-name (for some fonts) when warning
|
* “(null)” being logged as font-name (for some fonts) when warning
|
||||||
about a non-monospaced primary font.
|
about a non-monospaced primary font.
|
||||||
|
* Rare crash when the window is resized while a mouse selection is
|
||||||
|
ongoing (https://codeberg.org/dnkl/foot/issues/922).
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
||||||
16
render.c
16
render.c
|
|
@ -3681,7 +3681,23 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
|
||||||
|
|
||||||
if (term->grid == &term->alt)
|
if (term->grid == &term->alt)
|
||||||
selection_cancel(term);
|
selection_cancel(term);
|
||||||
|
else {
|
||||||
|
/*
|
||||||
|
* Don’t cancel, but make sure there aren’t any ongoing
|
||||||
|
* selections after the resize.
|
||||||
|
*/
|
||||||
|
tll_foreach(term->wl->seats, it) {
|
||||||
|
if (it->item.kbd_focus == term)
|
||||||
|
selection_finalize(&it->item, term, it->item.pointer.serial);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TODO: if we remove the selection_finalize() call above (i.e. if
|
||||||
|
* we start allowing selections to be ongoing across resizes), the
|
||||||
|
* selection’s pivot point coordinates *must* be added to the
|
||||||
|
* tracking points list.
|
||||||
|
*/
|
||||||
struct coord *const tracking_points[] = {
|
struct coord *const tracking_points[] = {
|
||||||
&term->selection.start,
|
&term->selection.start,
|
||||||
&term->selection.end,
|
&term->selection.end,
|
||||||
|
|
|
||||||
|
|
@ -1158,6 +1158,10 @@ term_init(const struct config *conf, struct fdm *fdm, struct reaper *reaper,
|
||||||
.selection = {
|
.selection = {
|
||||||
.start = {-1, -1},
|
.start = {-1, -1},
|
||||||
.end = {-1, -1},
|
.end = {-1, -1},
|
||||||
|
.pivot = {
|
||||||
|
.start = {-1, -1},
|
||||||
|
.end = {-1, -1},
|
||||||
|
},
|
||||||
.auto_scroll = {
|
.auto_scroll = {
|
||||||
.fd = -1,
|
.fd = -1,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue