I know, this is a bit crappy. This variable is intended to help
with logical/physical mapping for RTL text. It is calculated
but not used.
Ideally we'd just delete this code, but this particular bit
of logic is thorny enough that I want to preserve it for
when someone does sit down to finish this bit.
Draws a braille spinner in the tab title when a pane reports
Indeterminate progress, advancing one frame every 100ms.
This only shows when no format-tab-title event is used, and
leverages some of the infra we have for git animation scheduling.
- Separate perSystemOutputs & globalOutputs in flake.nix
(lots of indent changes!)
- Add NixOS VM configs for Gnome & Plasma testing
- Add section in contrib docs
During workspace switches, the mux subscription callback would cancel itself when receiving WindowRemoved notifications for a stale mux_window_id.
This caused the render loop to stop receiving PaneOutput events, freezing
the display until next user input.
So we keep the subscription alive during transient "window not found"
conditions instead of cancelling it, and only mark it as dead when the Window
is Drop'ed.
* Add ext-background-effect-v1 support for wayland
* Deprecate `kde_window_background_blur`; use `wayland_window_background_blur`
* Update changelog (replace old kde… option entry with wayland…)
---------
Co-authored-by: Benoit de Chezelles <benoit.dechezelles@gmail.com>
Building individual crates like `cargo build -p mux` failed with:
error[E0599]: no associated function or constant named `now`
found for struct `Utc`
The workspace declares chrono with `default-features=false` and only
`["unstable-locales", "serde"]`.
Starting with chrono 0.4.43 (we now resolve 0.4.44, up from 0.4.42),
`Utc::now()` and `Local::now()` were moved behind a new `now` cargo feature
(`#[cfg(feature = "now")]`), which is pulled in by the `clock` feature.
Since neither was enabled, those constructors no longer exist.
A full `cargo build` kept working only by accident: Cargo unifies the
features of a shared dependency across the whole build graph, and other
crates in the tree (`spa`, pulled by `time-funcs`, and `serde_with`'s
`std` feature) request chrono with `clock` feature
(which transitively enabled `now` for every crate).
Assisted-by: Claude Opus 4.8 (1M context)
Introduce a session-based approach for drag-and-drop, replacing the
previous state management with a clearer DragAndDropSession type.
This improves readability and makes the lifecycle of a drag operation
more explicit.
- Replace DragAndDrop with Option<DragAndDropSession> in pointer state.
- Rename SurfaceAndOffer and SurfaceAndPipe to reflect their roles.
- Minor: adjust visibility and add doc comments for public types.
Previously each window held its own CopyAndPaste (one per surface),
causing the data_device selection handler to broadcast the incoming
offer to every window on each clipboard change.
Since the compositor sends one selection event per client (not per
surface), a single shared CopyPasteOffer on WaylandState is sufficient.
The broadcast loop is replaced by a single confirm_selection() call.
Also add doc comments on all clipboard-related fields in WaylandState.
Assisted-by: Claude Sonnet 4.6; iterated, reviewed & tested manually
ref: #6685
assign_image_to_cells contained two unguarded divisions that could panic
with 'attempt to divide by zero' and take down the pane (and, under the mux,
the pane's reader thread):
1. A Kitty graphics escape requesting a zero-sized placement (eg: an explicit
w=0/h=0, or a source origin outside the image bounds) yields a
draw_width/draw_height of 0, used as a divisor when sizing the image.
This is the case reported in #6344.
2. Displaying a cell-sized image (one without explicit c=/r=) on a pane whose
pty reported no pixel dimensions makes cell_pixel_width/height 0, which is
then used as a divisor. A zero pixel size is the default PtySize and is what
tmux/headless domains report, so a perfectly valid image crashes there.
Guard both: refuse the placement when the drawable region or the cell pixel
size is zero.
The error flows into the existing logging handlers for the Kitty, iTerm and
Sixel paths, so no callers change.
Real GUI panes always have a non-zero pixel size, so valid images are
unaffected.
Adds regression tests for both cases (each panics on main, passes with the
fix) and enables kitty graphics in the test terminal config (off by default)
so the path is exercised.
Closes#6344
---------
Co-authored-by: Benoit de Chezelles <benoit.dechezelles@gmail.com>
`fancy_regex` returns Err (e.g. backtracking limit exceeded)
without advancing the iterator position, causing `captures_iter`
to loop forever on the same offset. 😬👉 Break out and warn instead.
fixes: #7773
In Wayland, when something is copied to the clipboard, an "offer"
is given to every "device". WezTerm holds these offers in a
'CopyAndPaste' struct, and reads from the offer when the user presses
paste. WezTerm has one 'CopyAndPaste' for each window.
When WezTerm receives a data offer, it previously only saved it to
one 'CopyAndPaste' based on the active surface id.
With this change, it writes it to every CopyAndPaste.
Fixes#6685
Replaces #7034
---------
Co-authored-by: XeroOl <xerool@protonmail.com>
- ci/cd: Update nix-related workflows
- nix: Simplify flake.nix
With recent enough Nix we can now remove the explicit submodules
dependencies and let Nix do the heavy lifting.
Improve Nix code to match modern Nix standards (finalAttrs).
- Includes #4986 with comments, for nicer package version
- Lock actions to a major branch, at least
- Various tweaks and readability improvements
- Only push built result to Cachix if workflow triggered
by schedule or manual workflow_dispatch event
The `build_proc` function in procinfo recursively walks the process
tree to build child process information. If a cycle exists in the
parent PID chain (which can happen on Windows in particular due to PID
reuse or race conditions during process snapshot enumeration),
the recursion never terminates and overflows the stack.
Add a `visited` HashSet to track already-visited PIDs and skip them,
preventing infinite recursion. Applied to all three platforms (Windows,
Linux, macOS)
Fixes#7705
Related: #6671
* Fix RefCell borrow conflict when toggling IME on Windows
When IME is active, the `key` function was holding a borrow on the
window's inner RefCell while calling `TranslateMessage`. This Windows
API can trigger other window messages (like WM_SIZE) via
`CtfImeCreateInputContext`, which then attempt to borrow the same
RefCell, causing a panic with "RefCell already borrowed".
Similarly, `ime_set_context` was holding a borrow while calling
`DefWindowProcW`, which can also trigger recursive window messages.
Fix by dropping the borrow prior to triggering potentially recursive calls.
Fixes the crash that occurred when toggling IME (e.g., pressing
Hankaku/Zenkaku key) after splitting a pane on Windows.
The OSTYPE isn't matching in the deploy script any longer, which
suggests that "something changed" in the image. Let's explicitly
point to a newer image: that was previously blocked because the
installer tools were not present. The associated issue has been
closed, so since we're broken right now anyway, let's move this
up and troubleshoot on the newer image.