diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2022-02-07 12:23:56 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2022-02-07 12:23:56 +0000 |
| commit | 3baf7de3b8e313a008d248a39175c0cad58d08fd (patch) | |
| tree | 354f8a3e4e2030e23aeaf7a5fc16523ed9d3aeee /render.c | |
| parent | changelog: “(null)” being logged as font-name (diff) | |
| parent | changelog: mouse selections are finalized on window resize (diff) | |
Merge branch 'finalize-selection-on-window-resize'
Closes #922
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -3681,7 +3681,23 @@ maybe_resize(struct terminal *term, int width, int height, bool force) if (term->grid == &term->alt) 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[] = { &term->selection.start, &term->selection.end, |
