Get rid of request_id. Instead use the x, y, and Y fields to
disambiguate requests. Specify error handling a little more robustly.
Implementation needed.
During a window title-bar drag, render a semi-transparent tint over
the destination window to preview the drop outcome:
- Full-window tint (quadrant=5) when hovering any window in swap-based
layouts (Tall, Stack, Fat, etc.) or over a title bar — swap is the
result so the whole window is highlighted.
- Half-window directional tint (quadrant 1-4) when hovering in the
Splits layout — a real directional insert happens so only the target
half is highlighted.
- 150ms fade-in; clears immediately on drop or drag exit.
Implementation follows the visual_bell TINT_PROGRAM infrastructure:
two new Screen fields (start_drag_overlay_at, drag_overlay_quadrant),
draw_drag_preview_overlay() in shaders.c called from draw_cells() after
both render paths, set_window_drag_overlay() C→Python bridge in state.c,
and the same child-monitor.c needs_render + set_maximum_wait hooks that
visual_bell uses to keep frames firing during animation.
Layout detection uses hasattr(layout, 'insert_window_next_to') — the
same guard _insert_window_in_direction uses internally — so the overlay
always matches the actual drop behavior.
This was needed to fix various corner cases when doing blending of colors
in linear space. The new architecture has the same performance as the
old in the common case of opaque rendering with no UI layers or images.
In the case of only positive z-index images there is a performance
decrease as the OS Window is now rendered to a offscreen texture and
then blitted to screen. However, in the future when we move to Vulkan or
I can figure out how to get Wayland to accept buffers with colors in
linear space, this performance penalty can be removed. The performance
penalty was not significant on my system but this is highly GPU
dependent. Modern GPUs are supposedly optimised for rendering to
offscreen buffers, so we will see. The awrit project might be a good
test case.
Now either we have 1-shot rendering for the case of opaque with only ext
or all the various pieces are rendered in successive draw calls into an
offscreen buffer that is blitted to the output buffer after all drawing
is done.
Fixes#8869
monotonic() is extremely slow. This call was halving the CSI parsing
speed benchmark. Instead we use the time at which parsing of the current
input chunk was started. This should be within a few microseconds and
accurate enough for the cursor trail for which it is used.
Needed by the execrable ncurses. Adds an extra branch in the hot path,
sigh. Thanks to branch prediction it doesnt have any measurable impact
on the benchmark, thankfully.