Commit Graph

1874 Commits

Author SHA1 Message Date
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
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
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
Ivan Molodetskikh ddb9dd407d Change xwl-s spawning error messages from info! to warn! 2025-08-29 19:06:16 +03:00
Ivan Molodetskikh 082d0581b7 Improve filtering for tests that need EGL
This way we don't skip the layout animation tests.
2025-08-29 10:07:15 +03:00
Ivan Molodetskikh dfe463ed7d layout/floating: Fix resetting preset width idx instead of height 2025-08-29 09:13:52 +03:00
Said Kadrioski 0c3223ac72 Add cycle back feature for presets of column/window width/height. 2025-08-29 09:13:52 +03:00
Horu 1ffda91e0c feat: cubic-bezier curve for animation (#2059)
* feat: bezier curve for animation

* fixes

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-08-29 05:31:50 +00:00
Ivan Molodetskikh 5b26f58285 Fix typos 2025-08-27 15:01:56 +03:00
Ivan Molodetskikh e5188da1f8 config: Clean up animations struct names 2025-08-27 11:22:27 +03:00
Ivan Molodetskikh 82697773f8 config: Move workspace into its own module 2025-08-27 11:16:36 +03:00
Ivan Molodetskikh 66584ab466 config: Extract debug 2025-08-27 10:46:46 +03:00
Ivan Molodetskikh 1e3ab8a880 config: Extract window_rule 2025-08-27 10:43:57 +03:00
Ivan Molodetskikh efa2ae2d3f pw_utils: Add session/stream id to logs
Signed-off-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-08-27 09:37:43 +03:00
gibberish e038b8770a Fix focus=false for move-column-to-workspace*, add to move-window-to-workspace-up/down 2025-08-27 09:17:58 +03:00
Ivan Molodetskikh 43638df235 Save & restore num lock across layout changes
In particular, this makes the numlock option work with locale1.
2025-08-26 21:08:17 +03:00
Ivan Molodetskikh 4ba79d94ac input: Don't hide overlays on a11y-consumed key presses 2025-08-26 21:03:54 +03:00
Ivan Molodetskikh d4dad2939d Remove redundant comment 2025-08-26 21:03:54 +03:00
Ivan Molodetskikh 1f76dce345 Implement screen reader announcements via AccessKit 2025-08-26 21:03:54 +03:00
Ivan Molodetskikh e1afa71238 ui/hotkey_overlay: Reorganize bind formatting logic a bit
Let the caller call tail functions.
2025-08-26 21:03:54 +03:00
Ivan Molodetskikh 8b73910a11 tty: Don't print successful max bpc/HDR
These are not really that useful
2025-08-24 16:06:06 +03:00
Michael Yang 969f382e3e feat: reset HDR connector properties 2025-08-24 16:06:06 +03:00
Ivan Molodetskikh 210d5e90fe exit_confirm_dialog: Add open/close animation 2025-08-22 08:57:08 +03:00
Ivan Molodetskikh 9d3beb4931 exit_confirm_dialog: Add backdrop
Makes it more obvious that the focus is taken by the dialog. Makes it easier to
tell if you're about to close nested vs. host compositor.
2025-08-22 08:54:28 +03:00
Ivan Molodetskikh 7aba44a019 exit_confirm_dialog: Return ArrayVec and add render elements 2025-08-22 08:51:33 +03:00
Ivan Molodetskikh d662811bf6 Unfocus layout when exit confirm dialog is open
Screen readers expect closing a modal dialog to reannounce the previous focus.
This makes the exit confirm dialog more modal in this sense: it will unfocus
the layout and then focus it back when closed, giving the desired behavior.
2025-08-21 12:26:32 +03:00
Ivan Molodetskikh c9e85a0fe2 Simplify/deduplicate hot corner computation 2025-08-21 09:15:49 +03:00
Ivan Molodetskikh 0a8b4e036d Move fallibility inside ExitConfirmDialog
Makes it less annoying on the outside.
2025-08-21 09:07:16 +03:00
Ivan Molodetskikh 34b05e8671 Rename spawn-at-startup-sh => spawn-sh-at-startup
Makes a bit more sense
2025-08-20 15:10:05 +03:00
Ivan Molodetskikh e81f356908 Add spawn-sh, spawn-at-startup-sh
Our top 10 most confusing config moments
2025-08-20 14:43:50 +03:00