update_selection_owner asserted ownership using self.copy_and_paste.time
That field only advances on key and button events delivered to that
particular window, so a window the user has not touched recently carries
a timestamp that predates the selection's lastTimeChanged.
The X server ignores SetSelectionOwner in that case, so the assertion was
previously dropped.
Use X's CURRENT_TIME constant instead which is always accepted.
This mirrors what focus() already does for the same underlying reason.
refs: #5917
Add mouse and focus accessors to TerminalState so downstream programs
using wezterm-term crate can introspect the state and act in it.
---------
Co-authored-by: Mark Shamis <mark.shamis@gmail.com>
Co-authored-by: Benoit de Chezelles <benoit.dechezelles@gmail.com>
Avoid creating a `&[u8]` reference over Windows _shared_ memory.
Instead, copy the mapped data directly with `ptr::copy_nonoverlapping`,
preventing aliasing violations.
refs: #8051
This was seemingly due to MacOS quirks, and was fixed by using
a slightly transparent bg color to fix WM composition.
refs: #5158
---
Co-authored-by: Adam Williams <adam.g.williams.nz@gmail.com>
ImageDataType::Rgba8 carries the sha256 of its pixels, set wherever one
is built and refreshed wherever the pixels are mutated.
compute_hash always re-hashed the pixels to produce same stored hash.
Image hashing ran 3 times for every transmitted image:
- once in new_single_frame on image creation
- once for the cache key in raw_image_to_image_data
- once more in ImageData::with_data on the miss path
A 2400x1440 RGBA frame is 13.18MiB, so a client transmitting frames at
60fps spends most of its time budget there.
AnimRgba8 keeps hashing, because its stored hashes are per-frame, not
global, which compute_hash needs (all frames + their durations).
---------
Co-authored-by: Ido Samuelson <i-am-logger@users.noreply.github.com>
Introduce two small conversion fns to easily convert to/from objc' BOOL
type.
Update all places that benefits from this conversion to/from Rust-bool
to more easily compare & manipulate boolean values in logic/conditions.