forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on a6baef7b68fcb60dfc57a9fc04e983cfd8a028ac

2026-01-10

Fix typoAnton Kesy · a6baef7Browse files

2026-01-07

fix(pw_utils): prevent write-after-free by reordering Cast struct fieldsManuel Romei · Unverified10df9f4
fix(pw_utils): prevent write-after-free by reordering Cast struct fields

The Cast struct fields were ordered such that `stream` was dropped before
`_listener`. In Rust, struct fields are dropped in declaration order.

Because `StreamListener` attempts to unregister itself from the stream on
drop, and `StreamRc` destroys the underlying PipeWire stream on drop, the
previous order caused `_listener` to access the stream after it had
already been freed.

This reorders the fields so `_listener` is declared before `stream`,
ensuring the listener unregisters itself while the stream is still valid.

* Apply suggestion from @YaLTeR

---------

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

2026-01-06

2026-01-07

2026-01-05

Replace TODO with FIXMEIvan Molodetskikh · d060b06
Replace TODO with FIXME

We use TODO for things to be fixed before committing.

2026-01-04

utils/spawning: Remove unnecessary cfgsIvan Molodetskikh · 54c2e2a
utils/spawning: Remove unnecessary cfgs

Forgotten when this was refactored.
layout/scrolling: Preserve gesture anim in dnd_scroll_gesture_end()Ivan Molodetskikh · df3f397
layout/scrolling: Preserve gesture anim in dnd_scroll_gesture_end()

Fixes interactive move unmaximize/unfullscreen into floating skipping
the view offset anim.
doc: link DMS compositor setup in Quick Start (#3179)Vishal · Unverified6215b5f
doc: link DMS compositor setup in Quick Start (#3179)

* doc: add `dms setup` command in Getting Started section along with clarification

* mention DMS setup page

* Update docs/wiki/Getting-Started.md

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
Improve dinit service files (#3193)Mark Karlinsky · Unverified3bfa4a7
Improve dinit service files (#3193)

* Improve dinit service files and niri-session

Two main changes were made:
 - After a discussion in davmac314/dinit#496, 2 dinit services are now
   provided. The first one is 'niri', which runs niri itself, and the
   second one is 'niri.target' which brings up all the dependences from
   user configuration.
 - Made the behaviour of 'niri-session' when running under dinit closer
   to the behaviour when running under systemd. In particular, now the
   script wait for service completion, because some login managers shut
   the session down the moment the startup script completes.

* Update paths in docs

2026-01-03

2025-12-31

Fix missing redraw when floating DnD in overview scrolls workspacesIvan Molodetskikh · cf0b4bc
Fix missing redraw when floating DnD in overview scrolls workspaces

Regressed in 396097c3ab67a5482a9d7614992c2c603c90e313

2025-12-29

tty: Load libinput plugins if availableIvan Molodetskikh · 1ab1737
tty: Load libinput plugins if available

Some distros like Fedora build libinput with plugin autoloading, however
by default, the compositor needs to explicitly load them. Plus, we need
to load manually if we want to also load from
$XDG_CONFIG_HOME/libinput/plugins.

Ref. https://gitlab.gnome.org/GNOME/mutter/-/commit/c5b12fbf6313d51f3279901bb561023e56181e36

2025-12-26

2025-12-25

Fix consume-or-expel-left anim to the left of active columnIvan Molodetskikh · 2a9d0e4
Fix consume-or-expel-left anim to the left of active column

Regressed in c4462d0c7fddfc11c9e98d43e3ef68a5b3c844ca.
Refactor rendering to push-based instead of pull-based (#3113)Ivan Molodetskikh · Unverified7f132ec
Refactor rendering to push-based instead of pull-based (#3113)

Our current rendering code constructs and returns complex
`-> impl Iterator<Item = SomeRenderElement>` types that are collected
into a vector at the top level Niri::render(). This causes some
problems:
- It's hard to write logic around returning iterators. Especially things
  like conditions, since the returned iterator must have a single type,
  you can't branch and return different iterators. This will be solved
  by gen fn but alas it's not here yet.
- In many cases, the returned `-> impl Iterator` will borrow from &self
  leading to complex lifetimes. In certain cases, it is also desirable
  for it to borrow the &mut NiriRenderer, which causes a lot of issues
  because it's exclusive (&mut).
- Sometimes those issues are too hard to deal with, leading to the
  escape hatch of allocating and returning a temporary
  Vec<SomeRenderElement>, like in
  Scrolling/FloatingSpace::render_elements(). These allocations are
  unfortunate because they are not really necessary.
- It's impossible to use some downstream combinators with this
  `-> impl Iterator` approach, leading to functions like Smithay's
  render_elements_from_surface_tree() returning a Vec. This is extra
  unfortunate because it results in a temporary allocation per Wayland
  toplevel/popup.
- It's hard to properly create profiling spans for the rendering
  functions since the spans are dropped when the (lazy) iterator is
  returned and not when all the code actually completes.
- The code compiles down to complex state machines in generated iterator
  types with logic located in Iterator::next(), which makes it annoying
  to follow in debuggers and profiling tools.

This refactor changes the code to push-based iteration: rendering
functions receive a push() closure that they call to push their render
elements. It solves all of the aforementioned problems:
- The logic becomes simpler. Just use conditionals and loops as normal.
- No borrowing and lifetimes since we're not returning anything.
- All temporary Vecs are removed because the problems they worked around
  no longer exist.
- The new push_elements_from_surface_tree() helper is the same as
  render_elements_from_surface_tree() but doesn't allocate a temporary
  Vec since it's not necessary; the push() closure can be passed down.
- Profiling spans work normally since the function returns when it ran
  all of the logic.
- The code compiles down to normal functions and calls as expected.

Generally, the iterator approach gives these advantages:
- You can wrap the returned items in the upstream logic. This is
  possible in exactly the same way with the push closure.
- You can decide to cut the iterator short in the upstream logic. This
  is not possible with push-based iteration, but we don't actually use
  it anywhere.

I chose the push closure type to be &mut dyn FnMut(SomeRenderElement).
It's deliberately not a generic impl FnMut() to avoid duplicating the
rendering logic when it's called from several different places. But it's
still a normal closure that can capture the outside context.

While my original idea for this refactor was to simplify the logic while
getting rid of temporary Vecs, it also appears to have brought a
consistent 2-3x speedup to the whole render list construction. On an old
Eee PC laptop I even observed a 8x speedup.

The refactor also results in smaller binary size, presumably due to
removing many iterator combinators and state tracking.
Fix tracy span namesIvan Molodetskikh · 1a63089Browse files
Remove redundant clippy allowIvan Molodetskikh · 88dc6e2Browse files
scrolling: Don't forget to call tab_indicator.update_shaders()Ivan Molodetskikh · 9d62b94
scrolling: Don't forget to call tab_indicator.update_shaders()

This didn't actually break anything since those shaders aren't
configurable.

2025-12-23

clipped surface: Compute uniforms on-demandIvan Molodetskikh · 4d29541
clipped surface: Compute uniforms on-demand

Removes two allocations for every clipped surface.
ci: user Cachix nix installerHigherOrderLogic · f01d48bBrowse files
ci: remove flake check actionHigherOrderLogic · 31ca509Browse files

2025-12-22

shader: Store uniforms in Rc instead of VecIvan Molodetskikh · 9e73beb
shader: Store uniforms in Rc instead of Vec

It's frequently cloned (e.g. every border piece every render) and we
don't change it.

2025-12-21

2025-12-20

Don't override IME grab with popup keyboard grabIvan Molodetskikh · 19e55a2
Don't override IME grab with popup keyboard grab

Fixes menu in Telegram. Some weird behavior is still possible e.g. with
gtk4-widget-factory and dropdowns on entries, but things seem to be
slightly less broken this way.
Comment out spammy trace!()Ivan Molodetskikh · 6472209Browse files
Remove IME grab check, fix GTK 4 popups with IMEIvan Molodetskikh · d9ceff7
Remove IME grab check, fix GTK 4 popups with IME

The wording in the deleted comment still stands: Smithay doesn't handle
overlapping grabs. However, in this case things appear to more or less
work themselves out. IME seems to re-request its grab every time an
input field is focused, replacing the popup keyboard grab. And the popup
keyboard grab doesn't seem to mind being replaced this way.
Use relative motion in move and spatial movement grabIvan Molodetskikh · 47e217c
Use relative motion in move and spatial movement grab

Will be used for pointer warping.
layout: Synchronize unfullscreen view movement anim to resizeIvan Molodetskikh · 9b52465
layout: Synchronize unfullscreen view movement anim to resize

Before this commit, maximize/fullscreen was synchronized, but
unmaximize/unfullscreen wasn't.
Implement include optional=true (#3022)John Rinehart · Unverified7a237e5
Implement include optional=true (#3022)

* feat(niri): support `include optional=true "filename.kdl"`

* chore: warn if optional include ENOENT

* chore: validate include directive arguments and properties

Add proper validation to reject:
- Extra arguments beyond the path
- Unknown properties (other than "optional")
- Unexpected child nodes

* docs: implement suggested typographical/prose changes

* fixes

---------

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

2025-12-18

layout/scrolling: Fix add_column() skipping activate_column() sometimesIvan Molodetskikh · c4462d0
layout/scrolling: Fix add_column() skipping activate_column() sometimes

When the column was added immediately to the left of the current column
and activated, the new idx would be equal to active_column_idx, which
would skip activate_column() with its variable resets.
dependabot: Add cooldownIvan Molodetskikh · f85cb5cBrowse files
Use is_none_or()Ivan Molodetskikh · f913219Browse files
Bump MSRV to 1.85, upgrade depsIvan Molodetskikh · 80469abBrowse files
Use Grabbing cursor for Mod+LMB interactive move (#3045)Kirill Chibisov · Unverified890935d
Use Grabbing cursor for Mod+LMB interactive move (#3045)

* Use Grabbing cursors for interactive move

There was no real indication that something can be dragged and thus
it's generally harder to discover for someone not familiar with Mod+LMB
to start dragging window around.

* fixes

---------

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

2025-12-16

2025-12-14

Remove url dependencyIvan Molodetskikh · 7c08985
Remove url dependency

Just use the glib function.

Turns out url comes with a huge dep tree. Well, I guess back when I
wrote this, we didn't have glib in our deps, but we had for a long time.

2025-12-13

CI: Remove Rust install from FreeBSD actionIvan Molodetskikh · d9a9e6d
CI: Remove Rust install from FreeBSD action

We don't need it since we removed the cache.