Commit Graph

2418 Commits

Author SHA1 Message Date
Ivan Molodetskikh c353a7dae9 layout: Extract Layout::monitors{,_mut}() 2025-10-02 09:33:08 +03:00
Ivan Molodetskikh e3068cd483 layout/tests: Make UpdateConfig an actual Op
We can do it now that it's non-Copy. This also fixes a new stack
overflow when running the random test in debug mode (which somehow
occurs even though it's skipped in debug mode) that appeared after
adding LayoutPart for some unbeknownst to me reason.
2025-10-02 09:33:08 +03:00
Ivan Molodetskikh 6aa8146c32 layout/tests: Generate LayoutPart instead of Layout config
Necessary for future changes, also produces much shorter failing output due to
not having to include all the options.
2025-10-02 09:33:08 +03:00
Ivan Molodetskikh 4c524b4719 layout: Store Layout directly in Options 2025-10-02 09:33:08 +03:00
Ivan Molodetskikh 1fa9dd32ed config: Split Layout from LayoutPart 2025-10-02 09:33:08 +03:00
Ivan Molodetskikh 2781d3a743 config: Replace resolve_against with MergeWith 2025-10-02 09:33:08 +03:00
Ivan Molodetskikh e739ce8171 config: Add merge!() macros to reduce boilerplate 2025-10-02 09:33:08 +03:00
Ivan Molodetskikh a2727ba2c9 config: Introduce MergeWith trait 2025-10-02 09:33:08 +03:00
Ivan Molodetskikh 8df6231cc1 layout/tests: Make Op non-Copy 2025-10-02 09:33:08 +03:00
Ivan Molodetskikh e837e39623 FAQ: Mention how to escape from a dead screen locker 2025-09-24 08:31:01 +03:00
Ivan Molodetskikh 3850739e44 FAQ: Mention directly opening in column, and focus-follows-mouse on monitor edges 2025-09-23 15:40:39 +03:00
Malix 4d4d968d97 enhance(docs): NixOS - Intel graphics workaround wiki link 2025-09-22 17:42:12 +03:00
Ivan Molodetskikh 6451d6be4f config: Fix discrepancy in default shadow color 2025-09-20 15:08:15 +03:00
Ivan Molodetskikh 00a4e22566 config: Add a diff empty to default test 2025-09-20 15:08:15 +03:00
Ivan Molodetskikh 19d21fc9b1 config: Fix inability to override border/focus-ring/tab-indicator gradient with color in window rules 2025-09-20 15:08:15 +03:00
Ivan Molodetskikh a1dccedbb7 Update libdisplay-info and Smithay (popup destruction protocol check, constraints check) 2025-09-20 15:08:09 +03:00
Ivan Molodetskikh 37aea69715 Move workspace options check to workspace tests 2025-09-20 13:42:59 +03:00
Ivan Molodetskikh 7024a23d2c layout/workspace: Rearrange checks 2025-09-20 13:42:59 +03:00
Ivan Molodetskikh 86edeb3b0b Fix DnD icon offset from surface cursor
The offset is already relative to the hotspot, no need to offset twice.
2025-09-19 15:48:07 +03:00
Ross Smyth d9648e6bde Revert "revert nushell completion for flake.nix"
This reverts commit ed799f5afc.
2025-09-18 11:26:11 +03:00
Ross Smyth fcd10fea8e nix: Bump flake.lock 2025-09-18 11:26:11 +03:00
Ivan Molodetskikh ffb3030e36 Fix layer-shell initial commit logic
I didn't properly update it for the Smithay refactor. It was reading
initial_configure_sent too early. This worked before when niri had to reset it
manually, but it no longer works now that it is automatically reset already
before entering this function.
2025-09-18 08:11:08 +03:00
Ivan Molodetskikh 4808ba2b20 Update Smithay (last_acked refactor, Qt layer-shell popup grab fix, popup ordering fix) 2025-09-17 22:04:23 +03:00
Ivan Molodetskikh 35cbab476e Add unmap-from-floating test
Hits a code path that reads the last acked state after unmapping.
2025-09-17 22:04:23 +03:00
Ivan Molodetskikh 28d072d893 tests/client: Check and panic on protocol error
Otherwise it keeps inf-looping.
2025-09-17 22:04:23 +03:00
Ivan Molodetskikh 276275ff76 Add sending initial configure trace log 2025-09-17 22:04:23 +03:00
Ivan Molodetskikh 82276771a5 Downgrade lack of our initial configure from error! to debug!
This can happen if a surface unmaps by committing a null buffer and then
immediately does the initial commit without a sync roundtrip, while there are
pending configures from the compositor in-flight. In this case, the surface
cannot tell that the pending configures were meant for "before unmapping" and
considers them to be the new initial configure.

From our point of view, we don't get to do a proper initial configuration
sequence in this case, and receive a mapping commit without our initial
configure state. We cannot really do much about it, but it is not an error when
this specific situation happens.
2025-09-17 22:04:23 +03:00
Ivan Molodetskikh cd7108ef5d Improve commit handler trace logging 2025-09-17 22:04:23 +03:00
Ivan Molodetskikh d45b06385d layout/scrolling: Remove more redundant animate args
These were redundant before too.
2025-09-17 22:04:23 +03:00
Ivan Molodetskikh 919dcbe774 layout/scrolling: Remove now-redundant animate arg 2025-09-17 22:04:23 +03:00
Ivan Molodetskikh a0d002c318 layout/tile: Animate un/fullscreen resize
This turned out to require quite a few changes.

We keep track of the tile resize animation progress separately now, in order to
provide a resizing black fullscreen backdrop for non-resizable windows.

The window is always rendered in the middle of the tile, which once again aids
with the resizing black fullscreen backdrop.

The backdrop itself will fade in from transparency so that it's less jarring.

The resize animation now keeps track of the fullscreen progress to deal with
the case where an unfullscreen resize is interrupted by another non-fullscreen
resize. In this case, the fullscreen progress continues animating to avoid
sudden disappearance of the fullscreen backdrop.

Some things like border visibility switch to this fullscreen progress once again
to avoid jarring appearance/disappearance.

The border radius animates in accordance with the fullscreen progress to match
the visuals.
2025-09-17 22:04:23 +03:00
Ivan Molodetskikh d0e98d6e73 layout/tile: Remove unused function
As far as I can tell, it was unused even when it was first added.
2025-09-17 22:04:23 +03:00
Ivan Molodetskikh 0b500334f9 layout/tile: Extract two variables 2025-09-17 22:04:23 +03:00
Ivan Molodetskikh a3203d92ec layout/scrolling: Animate tiles_origin changing on un/fullscreen 2025-09-17 22:04:23 +03:00
Ivan Molodetskikh c832bdecdd layout/scrolling: Track pending vs. current fullscreen for Columns
We already did that for Tiles, but for Columns we only tracked what was
effectively pending fullscreen. We used it in several places where the current
fullscreen should've been used instead, like the tile origin or the view offset.

This commit splits the two and makes every place use the right one.

Fixes things like tiles briefly appearing at y=0 between issuing the fullscreen
command and the tile committing in response to the fullscreen configure.
2025-09-17 22:04:23 +03:00
Ivan Molodetskikh b8995a12d1 layout/scrolling: Store view_offset_before_fullscreen when column actually goes fullscreen
Simplifies the handling and correctly saves/restores view offset for clients
that are slow to fullscreen, as can be seen from the fixed test.
2025-09-17 22:04:23 +03:00
Ivan Molodetskikh 2f9832aa36 tests/fullscreen: Add broken slow client unfullscreen view offset restoration test 2025-09-17 22:04:23 +03:00
Ivan Molodetskikh 618c83c59f tests: Move complete_animations() to Fixture 2025-09-17 22:04:23 +03:00
Ivan Molodetskikh 318f6ca8cc layout/tests/fullscreen: Add broken removing tile view pos restore test 2025-09-17 22:04:23 +03:00
Ivan Molodetskikh c9c28aa497 Add unfullscreen view offset restoration tests 2025-09-17 22:04:23 +03:00
Ivan Molodetskikh 5357db39cd layout/tests: Extract fullscreen tests to submodule 2025-09-17 22:04:23 +03:00
Kai Koehler 08f5c6fecb Make hot corners configurable, including per-output (#2108)
* Add corner selection in config

* Add hot corner docs

* Working per-monitor hot corners

Handle defaults

* run cargo fmt --all

* Fix hot corners in is_sticky_obscured_under

* Change default to fall back to gesture hot corners if output hot corners are unset

* Add hot corner output config docs

* Support fractional scaling

* Trigger hot corners over widgets

* Improve float handling
Fixed YaLTeR/niri/pull/2108

* Refactor

* Bug Fixes

* Amend docs

Fix styling

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

* Integrate code review

Move is_inside_hot_corner

* fixes

---------

Co-authored-by: Aadniz <8147434+Aadniz@users.noreply.github.com>
Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-09-16 15:10:01 +00:00
Anagram bffc5c1377 Include play/stop/prev/next media keys in the default config. (#2395)
* Included example for media keys: play/pause, stop, previous and next in the default config

* Update resources/default-config.kdl

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-09-16 13:47:29 +00:00
Ivan Molodetskikh c30e5c9185 layout: End DnD gesture when toggling interactive move to floating
Effective behavior mostly unchanged (it would end on refresh()), but this was
failing the invariant checks.
2025-09-16 08:35:03 +03:00
Ivan Molodetskikh b2d2a766e4 layout: Fix crash when a window opens next-to an only interactively moved window with no outputs 2025-09-16 08:35:03 +03:00
Ivan Molodetskikh cd0d45fdb8 layout/tests: Mark operations_dont_panic as slow
It's by far the slowest test (disabling it cuts cargo test time by 2x), and it
hadn't caught much in the past months.
2025-09-15 09:06:34 +03:00
Ivan Molodetskikh e6a8ad3847 niri.spec.rpkg: Add xwayland-satellite dependency
It landed in stable Fedora.
2025-09-14 09:40:20 +03:00
Ivan Molodetskikh b7909dbf61 Update cargo-rpm version 2025-09-12 09:00:21 +03:00
ilyx bdee1a6576 Don't clear DISPLAY/WAYLAND_DISPLAY/WAYLAND_SOCKET on WSL with --session (#2354)
* use winit backend on WSL

* Update src/main.rs

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-09-08 19:13:04 +00:00
Jan Ivica 22f629c24b wiki: Remove rofi-wayland mention 2025-09-07 04:00:23 -07:00