aboutsummaryrefslogtreecommitdiff
path: root/spawn.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-07-18 06:08:44 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-07-19 04:55:28 +0000
commit45c7cd3f7472b11d50622b10867a329b4d8e2451 (patch)
treec40953eba0fc3dd41712a0a8522c8157c5ccb639 /spawn.h
parentcsi: in-band window resize notifications, private mode 2048 (diff)
input: allow mouse selections to start inside the margins
Before this, margins were special cased: * The mouse cursor was always a pointer, and never an I-beam (thus signaling selections cannot be made). * The internal mouse coords where set to -1 when the cursor was inside the margins, causing: - text selections from being made - mouse events being passed to mouse grabbing applications In particular, even with a one-pixel margin, making selections was unnecessarily hard in e.g. fullscreen mode, where you'd expect to be able to throw the cursor into the corner of the screen and then start a selection. With this patch, the cursor is treated as if it was in the first/last column/row, when inside the margin(s). An unintended side-effect of this, initially, was that auto-scrolling selections where way too easy to trigger, since part of its logic is checking if the cursor is inside the margins. That problem has been reduced by two things: * auto-scrolling does not occur unless a selection has been started. That is, just holding down the mouse in the margins and moving up/down doesn't cause scrolling. You have to first select at least one cell in the visible viewport. * A selection isn't fully started (i.e. a cell is actually selected) unless the cursor is inside the actual grid, and *not* in the margins. What does the last point mean? We now allow a selection to be _started_ when clicking in the margin. What this means internally is we set a start coordinate for a selection, but *not* and end coordinate. At this point, we don't have an actual selection. Nothing is selected, and no cells are highlighted, graphically. This happens when we set an end coordinate. Without the last bullet point, that would happen as soon as the cursor was _moved_, even if still inside the margins. Now, we require the cursor to leave the margins and touch an actual cell before we set an end coordinate. Closes #1702
Diffstat (limited to 'spawn.h')
0 files changed, 0 insertions, 0 deletions