Commit Graph

1874 Commits

Author SHA1 Message Date
Ivan Molodetskikh 6bcaaf9d21 Add layer matcher to layer-rule 2026-04-15 14:35:14 +03:00
Ivan Molodetskikh f022b3c504 damage: Remove set_size()
Changes in geometry already cause a repaint.
2026-04-15 14:35:14 +03:00
Ivan Molodetskikh ab10a260fa Rename Niri::render_inner() => render() 2026-04-15 14:35:14 +03:00
Ivan Molodetskikh 0eddd16b8a Rename Niri::render() => render_to_vec() 2026-04-15 14:35:14 +03:00
Ivan Molodetskikh d020d986ed shaders: Optimize rounding_alpha() a little
Simplified clamping exploiting half_px + half_px = 1.0 / niri_scale.

Makes the resize shader fit on a Eee PC ALU.
2026-04-15 14:35:14 +03:00
Ivan Molodetskikh 5abeb923de shaders: Extract niri_rounding_alpha() into a file
To have it in one place.
2026-04-15 14:35:14 +03:00
Ivan Molodetskikh dd1f28998f Bundle renderer and target into a RenderCtx 2026-04-15 14:35:14 +03:00
Jakob Hellermann 8f48f56fe1 ui/hotkey_overlay: prettify diaeresis keysyms 2026-03-27 16:00:18 +03:00
Ivan Molodetskikh a217ad6424 tty: Log on DrmScanEvent::Changed 2026-03-07 08:54:39 +03:00
Ivan Molodetskikh f4dc10e0b4 Upgrade Smithay (virtual_keyboard revert, clipboard destroy cleanup, xdg-shell v7)
The virtual keyboard is reverted to the same state as it was in v25.08, i.e.
cannot trigger compositor binds. A bigger Smithay refactor is necessary to
properly support them without breaking other things.

Fixes wtype being completely broken.
2026-03-07 08:17:52 +03:00
Ivan Molodetskikh b82d52705e Increase default Wayland buffer size
The buffer size matches the one used in other compositors, e.g.:

- https://gitlab.gnome.org/GNOME/mutter/-/blob/49.4/src/wayland/meta-wayland.c?ref_type=tags#L970-971
2026-03-07 08:03:28 +03:00
Ivan Molodetskikh c7fa5f29d6 Upgrade dependencies 2026-03-07 08:03:24 +03:00
Jon Heinritz e708f54615 winit: add an app-id when running niri in nested mode in nested mode 2026-02-27 23:53:51 +08:00
Tobias Heider 1fa0338a17 openbsd: implement close_range workaround
Since OpenBSD doesn't have close_range we have
to use close from and close the remaining
descriptors manually.
2026-02-16 03:00:17 +08:00
Ivan Molodetskikh 41b5de8769 Change all links from YaLTeR/niri to niri-wm/niri 2026-02-10 17:59:14 +03:00
Christian Meissl 6d5c5f12b2 Fix dead surface hook VRAM leak (#3404)
* remove pre-commit hook when surface is destroyed

this re-uses the already existing remove_default_dmabuf_pre_commit_hook
during surface destruction instead of just removing the hook from the
stored list of hooks.

* do not add dmabuf pre-commit hook for destroyed surfaces

this prevents surfaces getting stored indefinitely in case
some logic tries to add the hook for an already
destroyed surface.

* align surface/toplevel destruction order for client destruction

resource destruction has undefined order in case
the client does not explicitly destroy the resourced
and wait for destruction to complete.
the same applies for clients exiting unexpectedly.

* rearrange some things

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2026-02-10 05:55:49 +00:00
Ivan Molodetskikh ab47f5cec4 Remove obsolete FIXME 2026-02-06 19:22:39 +03:00
ジムワルド 549148d277 Add load-config-file --path to load a different config (#3395)
* ipc: allow load-config to relocate the path of the config

* doc: add info about alternative configuration paths and relocating

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>

* Update docs/wiki/Integrating-niri.md

* Update niri-ipc/src/lib.rs

* Update src/ipc/server.rs

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2026-02-06 19:22:16 +03:00
Ivan Molodetskikh f30db163b5 layout/tile: Remove redundant .to_f64() 2026-01-28 08:12:06 +03:00
Ivan Molodetskikh a78f07cd58 Remove ResolvedLayerRules::empty()
Same cleanup as ResolvedWindowRules earlier, but here we didn't even
have any reason to keep having it.
2026-01-28 08:12:06 +03:00
Ivan Molodetskikh a00b271a15 pw_utils: Lower default buffer count to 8
We certainly don't need 16 buffers.
2026-01-27 20:42:25 +03:00
Ivan Molodetskikh a34ed51586 Make debug_draw_opaque_regions work in screencasts again 2026-01-26 06:18:35 +03:00
Ivan Molodetskikh 5ddcf195dd Remove unused portable-atomic dep
Has been unused for a long while (since the animation clock refactor).
2026-01-25 20:49:07 +03:00
Ivan Molodetskikh 9261fd6342 layout/tests: Add test for second workspace y = 0 2026-01-25 18:28:35 +08:00
SAKURA fb2f66f361 layout/monitor: round workspace render geo to physical pixels 2026-01-25 18:28:35 +08:00
Ivan Molodetskikh d7184a04b9 render_helpers: Add Smithay Tracy GPU spans 2026-01-17 22:31:05 +03:00
Ivan Molodetskikh bdf394260a render_helpers: Add Tracy spans to draw() calls 2026-01-17 22:30:32 +03:00
Ivan Molodetskikh 74d14be01f Update Smithay (virtual keyboard, layer-shell geometry, GPU profiling)
Also includes the necessary code to handle the virtual keyboard
compositor-side. Similar to the virtual pointer, we have an InputDevice
impl that allows reusing the logic from process_input_event().

Co-authored-by: wxt <3264117476@qq.com>
2026-01-17 22:29:10 +03:00
Ivan Molodetskikh 3ccb06f564 Fix panic in screencopy manager destroyed() 2026-01-17 15:32:20 +03:00
Ivan Molodetskikh d9e755d575 screencasting: Only render pointer when it's within output 2026-01-17 13:59:23 +03:00
Ivan Molodetskikh 87e2dd0361 Revert "Move set_dynamic_cast_target() stub closer to the other ones"
This reverts commit dd93c39ed0.

Why did I do this, that function is on a different type
2026-01-15 17:29:37 +03:00
Ivan Molodetskikh dd93c39ed0 Move set_dynamic_cast_target() stub closer to the other ones 2026-01-15 13:14:23 +03:00
Ivan Molodetskikh 849788bb28 Add niri msg stop-cast --session-id 2026-01-15 13:13:50 +03:00
Ivan Molodetskikh 9015ff8e36 ipc: Add pw_node_id to PipeWire Casts 2026-01-15 08:42:25 +03:00
Ivan Molodetskikh e546b339a3 ipc: Add PID to screencopy Casts 2026-01-15 08:42:25 +03:00
Ivan Molodetskikh b39edf405a screencopy: Add timeout to casts considered stopped
Otherwise xdp-wlr never stops the cast after it first starts.
2026-01-15 08:42:25 +03:00
Ivan Molodetskikh b98f4906da ipc: Add CastKind 2026-01-15 08:42:25 +03:00
Ivan Molodetskikh e82830c68c ipc: Add screencopy cast tracking
Track wlr-screencopy sessions that use with_damage as screencasts. These
are used by tools like wl-screenrec for continuous recording.
2026-01-15 08:42:25 +03:00
Ivan Molodetskikh 238caaf8da ipc: Add screencast request and events for PipeWire casts
Allows desktop bars to show when screen recording is active.
2026-01-15 08:42:25 +03:00
Ivan Molodetskikh 9c79108afa Refactor wlr-screencopy state cleanup
Before we cleaned up when binding a new manager, meaning that after a
screencopy client exited, the queue kept existing until a new one is
bound. We'll need precise tracking for the screencast IPC, so this
commit refactors to do just that: clean up the queue immediately when
all referring objects no longer exist.

This commit also fixes an issue where destroyed frames (e.g. from a
killed client) didn't clean the corresponding screencopy objects,
leading them to exist forever.
2026-01-13 23:01:21 +03:00
Ivan Molodetskikh 2571242887 screencopy: Pop first screencopy instead of last
This was never found probably because no client submits multiple frames
at once.
2026-01-13 23:00:38 +03:00
Ivan Molodetskikh 6f92b3296a Store output name in CastTarget
Will be useful in the next commit to avoid fetching it every time.
2026-01-13 21:31:51 +03:00
Ivan Molodetskikh 570ea119ba Extract cast session/stream ID counters to global scope
Add CastSessionId and CastStreamId newtypes. This lifts the atomic
counters from the D-Bus mutter_screen_cast module to a shared location,
preparing for adding screencopy cast tracking which will need the same
ID types.
2026-01-13 21:31:51 +03:00
Ivan Molodetskikh df4614e62c screencasting: Use spans to reduce logging boilerplate 2026-01-12 21:33:29 +03:00
Ivan Molodetskikh 3672e79369 Delay starting dynamic casts until there's a target
This avoids a weird 1x1 stream as well as one renegotiation which is a
complex operation, and some clients apparently have a problem with it.
2026-01-12 08:45:03 +03:00
Ivan Molodetskikh 2d16abdaae Move dynamic_target set outside pw_utils 2026-01-12 08:37:58 +03:00
Ivan Molodetskikh ff081acddc screencasting: Extract some logic into functions 2026-01-12 08:37:58 +03:00
Ivan Molodetskikh afe27a143b Move xdp-gnome-screencast code into separate module 2026-01-12 07:59:56 +03:00
Ivan Molodetskikh fd2916eb72 Honor pointer visibility in screencasts
Regressed in 05599ce2c4.
2026-01-12 07:11:56 +03:00
abmantis 05599ce2c4 Implement cursor metadata in window screencast
Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2026-01-11 06:51:14 -08:00